
On Wednesday 22 July 2009 03:12:07 Wolfgang Denk wrote:
Mike Frysinger wrote:
By including autoconf.mk before config.mk, all top level files can use any config options it sets up (like <arch>_config.mk) or the Makefile itself without being forced to use lazy evaluation.
Makefile | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-)
Can you please explain how this interacts with / impacts / undoes commit 3db75d9c "fix: missing autoconfig.mk from general Makefile"?
it complements that patch
I have to admit that I did not really understood the need for commit 3db75d9c, and neither do I in this case, so I think I better ask now before I completely lose track of what you are doing here, or why.
[None of the systems I work with seems to need ayhting like that.]
the idea is simple: use $(CONFIG_...) in top level files. before Jean's fix, it wasnt possible to do this because the autoconf.mk file was included with "sinclude", and it was included before autoconf.mk.dep. that means make would look for the file to include, not find it, and then silently skip it. with Jean's fix, it would generate the file and then include it.
however, this occurs after config.mk and related files are included. if you use lazy make evaluation, this really doesnt matter. but in the Blackfin config.mk, i use := so that i can sanitize variables: CONFIG_BFIN_CPU := $(strip $(subst ",,$(CONFIG_BFIN_CPU))) that means CONFIG_BFIN_CPU has to be defined before my .mk file. i could workaround this issue by creating a new variable like: BFIN_CPU = $(strip $(subst ",,$(CONFIG_BFIN_CPU))) but then i'd have to go around and fix all the references to the variables i modify to use the new one, and i have to remember in the future to use the indirect variable rather than the CONFIG_ ones coming from the build system. i.e. it makes a lot more sense to keep thing sane and set it up early so as to avoid an ugly nest of implicit fragile rules. -mike