KBuild problem (or difference) in 2.6.14-rc3

From: Mark Rustad
Date: Mon Oct 10 2005 - 17:43:40 EST


I have noticed a change in Kbuild behavior when going from 2.6.13.x to 2.6.14-rc3. I build kernels with a separate objects directory. It has been my practice since beginning with 2.6 kernels last year, to put changed files into the objects directory structure to override an unmodified source tree. Starting with 2.6.14, I find that Makefiles in the objects directory structure area not used. I find that source and Kconfig files do override as they used to, but Makefiles do not.

I don't really know if this new behavior is intended or not, but it sure messes my kernel build methodology up. It looks to me like the problem was introduced by changes in scripts/Makefile.build. I think that this is the change causing me trouble:

--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -10,8 +10,11 @@ __build:
# Read .config if it exist, otherwise ignore
-include .config

-include $(if $(wildcard $(obj)/Kbuild), $(obj)/Kbuild, $(obj)/Makefile)
+# The filename Kbuild has precedence over Makefile
+kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
+include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)

+include scripts/Kbuild.include
include scripts/Makefile.lib

ifdef host-progs

Does anyone know if this change in behavior was intended? I realize that I may be doing something a little bit unusual, but I have been doing things this way very successfully since at least 2.6.5.

--
Mark Rustad, MRustad@xxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/