LKML Archive on
help / color / mirror / Atom feed
* [PATCH] KBUILD:  Allow generalization of "unifdef" utility.
@ 2008-03-03 20:27 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2008-03-03 20:27 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: Sam Ravnborg

Allow the user to override the selection of "unifdef" utility when
generating user-space header files.  This allows the user to select
the more powerful "sunifdef" program, which is more stringent with
respect to cleaning and syntax checking.

Signed-off-by: Robert P. J. Day <>


  obviously, if a user chooses to not take advantage of this feature,
it should make no difference whatsoever.  but "sunifdef" is more
strict in terms of cleaning compound preprocessor directives, and it
also flags questionable preprocessor directives like this:

  UNIFDEF include/linux/netlink.h
sunifdef: /home/rpjday/k/git/include/linux/netlink.h: line 206:
warning 0x02070: Garbage following preprocessor directive in "#if
PAGE_SIZE < 8192UL" (#if line 152 depth 2)

diff --git a/scripts/Makefile.headersinst b/scripts/Makefile.headersinst
index 53dae3e..e98e6b2 100644
--- a/scripts/Makefile.headersinst
+++ b/scripts/Makefile.headersinst
@@ -7,7 +7,8 @@
 # ==========================================================================

-UNIFDEF := scripts/unifdef -U__KERNEL__
+UNIFDEF_CMD ?= scripts/unifdef

 # Eliminate the contents of (and inclusions of) compiler.h
 HDRSED  := sed 	-e "s/ inline / __inline__ /g" \

Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry:
    Have classroom, will lecture.                          Waterloo, Ontario, CANADA

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-03 20:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-03 20:27 [PATCH] KBUILD: Allow generalization of "unifdef" utility Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).