Good day, I came to the point where I cannot work around "default target hijacking" problem. So I am planning to do something about it in my -bk patch-set. I also hope this feature will end up in the main stream thus this RFC.
When makefile inclusion is used there is a recurring problem of default target hijacking by auxiliary targets. For example I have the following pattern: 1. User `makefile' includes `bootstrap.make' to bootstrap build system. 2. `bootstrap.make' includes configuration makefiles that are generated automatically. Rules for those configuration files hijack default target. # file: bootstrap.make out_root := initialize-output-root $(out_root)/configuration: configure $@ include $(out_root)/configuration # file: makefile include bootstrap.make $(out_root)/driver: driver.c A workaround for this problem would be to split `bootstrap.make': # file: makefile include bootstrap-part1.make # secure default target $(out_root)/driver: include bootstrap-part2.make $(out_root)/driver: driver.c However, this is not always possible and even when possible results in bloated user makefiles. This problem can be solved by specifying that particular target cannot be default: # file: bootstrap.make out_root := initialize-output-root .NOT_DEFAULT: $(out_root)/configuration $(out_root)/configuration: configure $@ include $(out_root)/configuration comments? -boris
signature.asc
Description: Digital signature
_______________________________________________ Bug-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-make