diff options
author | Theodore Ts'o <tytso@mit.edu> | 2013-10-23 20:09:12 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2013-10-23 20:09:12 -0400 |
commit | 5f16f6c337feca8bdfb728af8585626e72a69640 (patch) | |
tree | 44232245c06a88d210ee9615e1c439f036f058a0 /MCONFIG.in | |
parent | d87f198ca3250c9dff6a4002cd2bbbb5ab6f113a (diff) | |
download | e2fsprogs-5f16f6c337feca8bdfb728af8585626e72a69640.tar.gz |
Fix optional static code analysis using sparse
Commit 832cb612: "e2fsprogs: add (optional) sparse checking to the
build" breaks systems that are not using GNU make. In addition, it
breaks if the developer tries to build in a subdirectory (i.e., if he
or she tries running "make" in the misc or e2fsck or lib/ext2fs
directory), since CHECK_CMD is not set.
Fix this by moving the sparse setup to MCONFIG.
Cc: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'MCONFIG.in')
-rw-r--r-- | MCONFIG.in | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -50,6 +50,20 @@ datadir = @datadir@ @ifNotGNUmake@ ES = @ES@ @ifNotGNUmake@ Q = @Q@ +@ifGNUmake@ CHECK=sparse +@ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null +@ifGNUmake@ ifeq ("$(C)", "2") +@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__ +@ifGNUmake@ else +@ifGNUmake@ ifeq ("$(C)", "1") +@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) +@ifGNUmake@ else +@ifGNUmake@ CHECK_CMD=@true +@ifGNUmake@ endif +@ifGNUmake@ endif + +@ifNotGNUmake@ CHECK_CMD=@true + CC = @CC@ BUILD_CC = @BUILD_CC@ CFLAGS = @CFLAGS@ |