[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is --include-dir option effective only in sub make ?
From: |
Masahiro Yamada |
Subject: |
Re: Why is --include-dir option effective only in sub make ? |
Date: |
Fri, 14 Sep 2018 10:26:26 +0900 |
Hi Paul,
2018-09-13 21:34 GMT+09:00 Paul Smith <address@hidden>:
> 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