summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--scripts/Makefile.build11
2 files changed, 11 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 1154e676430d..17606090b9f6 100644
--- a/Makefile
+++ b/Makefile
@@ -958,7 +958,8 @@ help:
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
- @echo ' make C=1 [targets] Check all c source with checker tool'
+ @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse)'
+ @echo ' make C=2 [targets] Force check of all c source with $$CHECK (sparse)'
@echo ''
@echo 'Execute "make" or "make all" to build all targets marked with [*] '
@echo 'For further info see the ./README file'
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index c48adfe03a73..5204640c4649 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -83,8 +83,13 @@ __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \
# Linus' kernel sanity checking tool
ifneq ($(KBUILD_CHECKSRC),0)
-quiet_cmd_checksrc = CHECK $<
- cmd_checksrc = $(CHECK) $(c_flags) $< ;
+ ifeq ($(KBUILD_CHECKSRC),2)
+ quiet_cmd_force_checksrc = CHECK $<
+ cmd_force_checksrc = $(CHECK) $(c_flags) $< ;
+ else
+ quiet_cmd_checksrc = CHECK $<
+ cmd_checksrc = $(CHECK) $(c_flags) $< ;
+ endif
endif
@@ -182,11 +187,13 @@ endef
# Built-in and composite module parts
%.o: %.c FORCE
+ $(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c)
# Single-part modules are special since we need to mark them in $(MODVERDIR)
$(single-used-m): %.o: %.c FORCE
+ $(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c)
@{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)