]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - Makefile
kbuild: kill some false positives from modpost
[net-next-2.6.git] / Makefile
index 3c55de99ed31844762ebb08415bcdef8732d7340..1b2fd97f503a5eafcad2df1690f7aa8d4bfd5dc0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -178,6 +178,8 @@ CROSS_COMPILE       ?=
 # Architecture as present in compile.h
 UTS_MACHINE := $(ARCH)
 
+KCONFIG_CONFIG ?= .config
+
 # SHELL used by kbuild
 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
          else if [ -x /bin/bash ]; then echo /bin/bash; \
@@ -265,10 +267,9 @@ MAKEFLAGS += --include-dir=$(srctree)
 # We need some generic definitions
 include  $(srctree)/scripts/Kbuild.include
 
-# For maximum performance (+ possibly random breakage, uncomment
-# the following)
-
-#MAKEFLAGS += -rR
+# Do not use make's built-in rules and variables
+# This increases performance and avoid hard-to-debug behaviour
+MAKEFLAGS += -rR
 
 # Make variables (CC, etc...)
 
@@ -362,7 +363,8 @@ endif
 # of make so .config is not included in this case either (for *config).
 
 no-dot-config-targets := clean mrproper distclean \
-                        cscope TAGS tags help %docs check%
+                        cscope TAGS tags help %docs check% \
+                        kernelrelease kernelversion
 
 config-targets := 0
 mixed-targets  := 0
@@ -437,13 +439,13 @@ ifeq ($(dot-config),1)
 -include include/config/auto.conf
 
 # To avoid any implicit rule to kick in, define an empty command
-.config include/config/auto.conf.cmd: ;
+$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
 
 # If .config is newer than include/config/auto.conf, someone tinkered
 # with it and forgot to run make oldconfig.
 # if auto.conf.cmd is missing then we are probarly in a cleaned tree so
 # we execute the config step to be sure to catch updated Kconfig files
-include/config/auto.conf: .config include/config/auto.conf.cmd
+include/config/auto.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
        $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
 
 else
@@ -981,9 +983,9 @@ distclean: mrproper
 # rpm target kept for backward compatibility
 package-dir    := $(srctree)/scripts/package
 
-%pkg: FORCE
+%pkg: include/config/kernel.release FORCE
        $(Q)$(MAKE) $(build)=$(package-dir) $@
-rpm: FORCE
+rpm: include/config/kernel.release FORCE
        $(Q)$(MAKE) $(build)=$(package-dir) $@
 
 
@@ -1246,7 +1248,7 @@ namespacecheck:
 endif #ifeq ($(config-targets),1)
 endif #ifeq ($(mixed-targets),1)
 
-PHONY += checkstack
+PHONY += checkstack kernelrelease kernelversion
 checkstack:
        $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
        $(PERL) $(src)/scripts/checkstack.pl $(ARCH)