diff mbox

[update] Makefile: allow no update .config build

Message ID 1364517997-24067-1-git-send-email-lig.fnst@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

li guang March 29, 2013, 12:46 a.m. UTC
if we pull some commits from other git repo
which bring in a few CONFIG_* options, then
we have to build all again, but we do assure
these options are not interesting for us,
so the long waiting build will be offending.
this change help us to avoid all-build.

Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
 Makefile |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Comments

Michal Marek March 29, 2013, 9:12 a.m. UTC | #1
On 29.3.2013 01:46, liguang wrote:
> if we pull some commits from other git repo
> which bring in a few CONFIG_* options, then
> we have to build all again, but we do assure
> these options are not interesting for us,
> so the long waiting build will be offending.
> this change help us to avoid all-build.

scripts/basic/fixdep makes sure that only the affected parts are rebuild
when the config changes. Obviously, if a CONFIG_ option appears in a
widely used header file, the whole kernel is rebuilt. Otherwise object
files would be built with different versions of the header file. If you
want to shoot yourself in the foot and override this, then do a 'touch
include/config/*.conf', but please do not add such a hack to the Makefile.

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 54d2b2a..d10e505 100644
--- a/Makefile
+++ b/Makefile
@@ -106,6 +106,12 @@  ifeq ("$(origin W)", "command line")
   export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
 endif
 
+# KBUILD_NCU is set to do not update .config even
+# a few new CONFIG_* options appeared
+ifeq ("$(origin NCU)", "command line")
+  KBUILD_NCU := $(NCU)
+endif
+
 # That's our default target when none is given on the command line
 PHONY := _all
 _all:
@@ -540,8 +546,10 @@  $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
 # with it and forgot to run make oldconfig.
 # if auto.conf.cmd is missing then we are probably in a cleaned tree so
 # we execute the config step to be sure to catch updated Kconfig files
+ifneq ($(KBUILD_NCU), 1)
 include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
 	$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
+endif # $(KBUILD_NCU)
 else
 # external modules needs include/generated/autoconf.h and include/config/auto.conf
 # but do not care if they are up-to-date. Use auto.conf to trigger the test
@@ -1157,6 +1165,7 @@  help:
 	@echo  '		2: warnings which occur quite often but may still be relevant'
 	@echo  '		3: more obscure warnings, can most likely be ignored'
 	@echo  '		Multiple levels can be combined with W=12 or W=123'
+	@echo  '  make NCU=1 [targets] no .config update'
 	@echo  ''
 	@echo  'Execute "make" or "make all" to build all targets marked with [*] '
 	@echo  'For further info see the ./README file'