From a817884fa8bac6867eded68b5acde4fc11ebb98c Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Wed, 18 Aug 2004 03:02:08 +0200 Subject: kbuild: make C=2 now force sparse to be run for all .c files With make C=2 sparse ($(CHECK)) will be run on all .c files also if they do not need to be compiled. Usefull to run sparse on a fully compiled kernel tree. Implemented on request from Al Viro (although he liked to be able to run sparse without building any source). Signed-off-by: Sam Ravnborg --- scripts/Makefile.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'scripts') 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) -- cgit v1.2.3