Hello, I'm using GNU make 3.79.1. The following makefile illustrates the problem I am observing:
FOO_LIB = -lm all : foo bar foo : foo.o $(FOO_LIB) bar : bar.o $(BAR_LIB) BAR_LIB = -lm whereas foo builds as expected, when GNU make tries to link bar.o to make bar, the expansion of $(BAR_LIB) is empty: $ gmake -f foo.mk cc -c -o foo.o foo.c cc foo.o /lib/libm.so -o foo cc -c -o bar.o bar.c cc bar.o -o bar Undefined first referenced symbol in file rint bar.o It is as if the variables are immediately expanded. Is that expected? -Derek _______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make