Hello everyone,
AFAIU, there are several things wrong with the following Makefile:
SUBDIRS = (a list of subdirectories)
default clobber clean debug:
for dir in $(SUBDIRS); do make -C $$dir $@; done
1) One shouldn't call make explicitely.
=> Instead, one should call $(MAKE) or prefix the whole command with +
2) The 'for' loop ignores errors, and runs to completion.
=> The manual suggests using .PHONY targets.
I don't see how I can use .PHONY targets to get rid of the loop.
For example, if I run 'make debug', make should recursively run
'make debug' within every subdirectory. Is there a simple way to
do that?
--
Regards, Grumble
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make