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.