%% Anoneironaut <[EMAIL PROTECTED]> writes: a> toplevel: main.o $(MODULES) $(MODULE_LIBS)
a> .PHONY: $(MODULES) a> how can I avoid setting "foo" and "bar" to be phony? Assuming "foo" and "bar" are directories, then you can't do this. Even if you avoid having them phony it won't work correctly since directory timestamps are updated when files are added, removed, or renamed. There are various ways to solve this. One is to use order-only prerequisites, like this: toplevel: main.o $(MODULE_LIBS) | $(MODULES) This ensures that the $(MODULES) targets are built before "toplevel", but that toplevel won't be rebuilt because of them. See the GNU make manual for more info. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
