mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: linux-kernel@vger.kernel.org
Subject: kbuild: make C=2 forces sparse run
Date: Thu, 19 Aug 2004 01:05:38 +0200	[thread overview]
Message-ID: <20040818230538.GC23495@mars.ravnborg.org> (raw)
In-Reply-To: <20040818230252.GA23495@mars.ravnborg.org>

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/17 23:02:08+02:00 sam@mars.ravnborg.org 
#   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 <sam@ravnborg.org>
# 
# scripts/Makefile.build
#   2004/08/17 23:01:51+02:00 sam@mars.ravnborg.org +9 -2
#   Allow sparse to be forced to be used - for all .c files.
# 
# Makefile
#   2004/08/17 23:01:51+02:00 sam@mars.ravnborg.org +2 -1
#   Document how to force use of sparse, even when no source needs to be compiled.
# 
diff -Nru a/Makefile b/Makefile
--- a/Makefile	2004-08-19 01:05:30 +02:00
+++ b/Makefile	2004-08-19 01:05:30 +02:00
@@ -958,7 +958,8 @@
 
 	@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 -Nru a/scripts/Makefile.build b/scripts/Makefile.build
--- a/scripts/Makefile.build	2004-08-19 01:05:30 +02:00
+++ b/scripts/Makefile.build	2004-08-19 01:05:30 +02:00
@@ -83,8 +83,13 @@
 
 # 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 @@
 # 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)
 

  parent reply	other threads:[~2004-08-18 21:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-18 23:02 Kbuild updates Sam Ravnborg
2004-08-18 23:04 ` kbuild: Fix parallel build Sam Ravnborg
2004-08-18 23:05 ` Sam Ravnborg [this message]
2004-08-18 23:06 ` kbuild: Fix warnings in binoffset.c Sam Ravnborg
2004-08-18 23:07 ` kbuild: Remove last occurrence of HEAD Sam Ravnborg
2004-08-18 23:08 ` kbuild: Add comments to Makefile.clean Sam Ravnborg
2004-08-18 23:09 ` kbuild: Added CHECKFLAGS to enable 'make CHECK=mysparse' Sam Ravnborg
2004-08-18 23:13 ` Kbuild updates Sam Ravnborg
2004-08-18 21:34   ` kernel 2.6 and networking enhancements Imran Badr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040818230538.GC23495@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®