I have below makefile and its output, ------------------------------------------------ fp := first_prerequisite
all: $(fp) $(sp) <------(1) $(info $+) <------(2) $(info $(sp)) <-------(3) $(fp) $(sp):; sp := second_prerequisite <-------(4) ------------------------------------------------ first_prerequisite second_prerequisite make: `all' is up to date. ------------------------------------------------ the $(sp) is undefined on line (1), so it is empty and the target "all" has only one prerequisite $(fp), what I expect are two $(fp) and $(sp). I know this can be fixed by moving line (4) above line (1). However, the line (3) outputs the correct defined variable $(sp) value "second_prerequisite", I'm wondering why "make" works in this way? is this related with the second expansion, if so, how I can let make the prerequisite $(sp) expansion later? -- Best Regards Linux user #384184 @ http://counter.li.org/ _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
