Most users of GNU make are familiar with its two types of variables: recursive variables, where the value is expanded every time the variable is referenced, and simple variables, where the value is expanded only once: when the variable is assigned. But what if you wanted a variable that was expanded only once, but not until the first time it was used? Such a thing is possible in GNU make… with a bit of trickery.
Continue reading