First, my environment. zsh(0)% gmake -v GNU Make 3.81beta2 Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This program built for i686-pc-linux-gnu I was under the impression that I could count on being able to call a function before its definition because of the recursive expansion of variables. Here is an example. GNUmakefile $(warning result=$(call function,hello there)) function = $(findstring hello,$(1)) $(warning result=$(call function,hello there)) zsh(0)% gmake GNUmakefile:1: result= GNUmakefile:5: result=hello gmake: *** No targets. Stop. Here is a similar example with similar results which doesn't use $(call). GNUmakefile $(warning $(variable)) variable = hi $(warning $(variable)) zsh(0)% gmake GNUmakefile:1: GNUmakefile:3: hi gmake: *** No targets. Stop. Can anyone offer an explanation for this behavior? Since "function" in the first example, and variable in the second example are recursively expanded variables, I would have thought $(call)ing or referencing them would retrieve their eventual values. Many thanks, Ken Smith _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
