2 ms·
One starting place for some of these functions is: http://www.gnu.org/software/make/manual/html_node/Functions.html http://www.gnu.org/software/make/manual/htm
by mturmon 13y ago
One starting place for some of these functions is:
http://www.gnu.org/software/make/manual/html_node/Functions.html http://www.gnu.org/software/make/manual/html_node/Functions....
(note "foreach", "call", "eval") and:
http://www.gnu.org/software/make/manual/html_node/Multi_002dLine.html http://www.gnu.org/software/make/manual/html_node/Multi_002d...
For instance, from the "call" documentation --
"The call function is unique in that it can be used to create new parameterized functions."
Sometimes these types of functions are really important, and you have to be creative to use the builtins to set up the dependencies you want. For instance, by combining "foreach" with "call" or "eval", you can dynamically create sets of rules. This can be quite powerful.
And you don't have to use make only for software compilation. You can use it to create more general-purpose data transformations. When you get a batch of new images, for example, you type "make", and it just recomputes all the derived data (but only what depends on the new stuff). I have done this, and it was very slick, but it tends to stress the existing function set.