Well, it was nice of him to send you a blog link, rather than telling you to buy his book, which mentions this exact trick :)
Many of the things in my book are on line in different places. The technique I use in the book is here: https://www.cmcrossroads.com/article/makefile-optimization-e... It uses a different technique and requires replacing $(FOO) with $(call cache,FOO) everywhere.
The book comprises everything I've written about GNU make edited, rechecked and cleaned up with additions to cover new GNU make features and a couple of other things I hadn't written before.
If you start asking him too many questions he does eventually just throw the book at you (albeit a free autographed copy).
Yes, that's what happened. I was thinking about your response and left it in my inbox to respond to. Figured I'd write something up for public consumption instead and as I'd done it differently in my book figured a blog post was appropriate.
> John: This is very expensive. Can't it be calculated once (:=)?
> Me: The problem is that we don't want to calculate it if we don't need it, because we might run make before go is installed, and that would fail.
> John: http://blog.jgc.org/2016/07/lazy-gnu-make-variables.html
I think he wrote this piece to answer my question.
That's working with great people right there.