summaryrefslogtreecommitdiff
path: root/intl
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2014-03-14 09:32:48 -0400
committerTheodore Ts'o <tytso@mit.edu>2014-03-14 09:32:50 -0400
commitf1605243a4bab97b860beb1bb9ce3522959414f6 (patch)
treeea0c583c77dc36850bd69d70f759425c15daeb8c /intl
parentd05c9c7ace8322c774172357e48390f5412b7d19 (diff)
all: Introduce cppcheck static checking for make C=1
Introduce more static checking via cppcheck. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'intl')
-rw-r--r--intl/Makefile.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/intl/Makefile.in b/intl/Makefile.in
index 87d081f8..07700c80 100644
--- a/intl/Makefile.in
+++ b/intl/Makefile.in
@@ -61,17 +61,23 @@ mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
@ifGNUmake@ CHECK=sparse
@ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
+@ifGNUmake@ CPPCHECK=cppcheck
+@ifGNUmake@ CPPCHECK_OPTS=--force --enable=all
@ifGNUmake@ ifeq ("$(C)", "2")
@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
+@ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS)
@ifGNUmake@ else
@ifGNUmake@ ifeq ("$(C)", "1")
@ifGNUmake@ CHECK_CMD=$(CHECK) $(CHECK_OPTS)
+@ifGNUmake@ CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS)
@ifGNUmake@ else
@ifGNUmake@ CHECK_CMD=@true
+@ifGNUmake@ CPPCHECK_CMD=@true
@ifGNUmake@ endif
@ifGNUmake@ endif
@ifNotGNUmake@ CHECK_CMD=@true
+@ifNotGNUmake@ CPPCHECK_CMD=@true
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
@@ -206,6 +212,7 @@ LTV_AGE=4
$(E) " CC $<"
$(Q) $(COMPILE) $<
$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
+ $(Q) $(CPPCHECK_CMD) $<
.y.c:
$(YACC) $(YFLAGS) --output $@ $<