.SECONDEXPANSION:
AVAR = top
onefile: $(AVAR)
echo "make onefile";
twofile: $$(AVAR)
echo "make twofile";
AVAR = bottom
# make onefile
make: *** No rule to make target `top', needed by `onefile'. Stop.
==> $(AVAR) is expanded to "top"
# make twofile
make: *** No rule to make target `bottom', needed by `twofile'. Stop.
==> because of second expansion, the $$(AVAR) is expanded to "bottom"
make debug tips
we can use the following parameters added after make to verbose the debugging messages
-w Option: How the ‘-w’ or ‘--print-directory’ option helps debug use of recursive make commands.
沒有留言:
張貼留言