Skip to contentSkip to conversation

Makefile: make sparse (CHECK) user-selectable

PATCH In review Phil Carmody 3 participants 3 messages May 8, 2013 – May 10, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: make sparse (CHECK) user-selectable

I've got a tweaked version as well as the system default, so make the sparse binary that's run user-selectable.

---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Makefile +3 -1
index a3a834b..e7a4851 100644
@@ -338,7 +338,9 @@ GENKSYMS	= scripts/genksyms/genksyms
 INSTALLKERNEL  := installkernel
 DEPMOD		= /sbin/depmod
 PERL		= perl
-CHECK		= sparse
+ifndef CHECK
+  CHECK		= sparse
+endif
 
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
 		  -Wbitwise -Wno-return-void $(CF)
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 3 lines · Phil Carmody

I've got a tweaked version as well as the system default, so make the sparse binary that's run user-selectable.

I'm confused about why this patch is necessary since I already do

$ make O=builddir CHECK=/path/to/sparse all
Quoted 21 lines
---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Makefile +3 -1
index a3a834b..e7a4851 100644
@@ -338,7 +338,9 @@ GENKSYMS	= scripts/genksyms/genksyms
 INSTALLKERNEL  := installkernel
 DEPMOD		= /sbin/depmod
 PERL		= perl
-CHECK		= sparse
+ifndef CHECK
+  CHECK		= sparse
+endif
 
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
 		  -Wbitwise -Wno-return-void $(CF)
Signature · 1 line
~Randy
#2 lore raw
Quoted 8 lines · Randy Dunlap
Quoted 3 lines · Phil Carmody

I've got a tweaked version as well as the system default, so make the sparse binary that's run user-selectable.

I'm confused about why this patch is necessary since I already do

$ make O=builddir CHECK=/path/to/sparse all

Ach, OK. I was presuming that I should be able to select my sparse in the same way that I select my cross compiler, namely in the ENV.

CROSS_COMPILE=whatever- CHECK=/my/sparse make C=1

Doctor - it hurts when I do >this<, ouch.
Well, don't do that then!

Phil

Signature · 4 lines
"In a world of magnets and miracles" 
-- Insane Clown Posse, Miracles, 2009. Much derided.
"Magnets, how do they work"
-- Pink Floyd, High Hopes, 1994. Lauded as lyrical geniuses.