Hi Paul,
2018-09-13 21:34 GMT+09:00 Paul Smith <psm...@gnu.org>: > On Thu, 2018-09-13 at 14:18 +0900, Masahiro Yamada wrote: >> I wonder why --include-dir does not become >> effective in the current Makefile. > > In order for this to work, the MAKEFLAGS variable would have to be re- > parsed every time MAKEFLAGS was set in the makefile and that's not how > it works: MAKEFLAGS is re-parsed once after all the makefiles are read. > > There are various potential oddities and unexpected outcomes if the > variable is re-parsed every time, just as this unexpected outcome (not > being able to add --include-dir and have it take effect immediately) if > the variable is NOT re-parsed every time. Ah, I see. Thanks for clear explanation! > In this case, could you just write: > > include foo/inc.mk > > directly? Yes, I can. My impression is, --include-dir is not so useful as VPATH. In fact, the Linux kernel build system uses --include-dir, but there is no strong reason to search included makefiles in multiple location. Thanks. -- Best Regards Masahiro Yamada _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make