summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevzero2000 <devzero2000>2013-12-19 18:01:07 +0000
committerdevzero2000 <devzero2000>2013-12-19 18:01:07 +0000
commitdf6bb84a327f29fbb044202bd5555f45656808ed (patch)
tree4e889f10fd2bc063b47129b82939ce93a029116b
parente3c1078ac4fcff390274cb47b1e460ae6850b06b (diff)
downloadlibpopt-df6bb84a327f29fbb044202bd5555f45656808ed.tar.gz
add cppcheck conditional makefile target
-rw-r--r--CHANGES1
-rw-r--r--Makefile.am7
-rwxr-xr-xconfigure.ac3
3 files changed, 11 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index fac0c4c..58145aa 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,5 @@
1.17 -> 2.0:
+ - devzero2000: add cppcheck conditional makefile target
- devzero2000: drop expr syntax error in make check under dash
- devzero2000: Print to the end of the configure phase the options we have
enabled and their results on the basis of the target system
diff --git a/Makefile.am b/Makefile.am
index 3216cd4..e9a2979 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -158,6 +158,13 @@ mccabe:
endif
+if HAVE_CPPCHECK
+cppcheck:
+ $(CPPCHECK) -I $(includedir) --enable=all $(libpopt_la_SOURCES)
+
+endif
+
+
if DOXYGEN_ENABLE
doxygen: Doxyfile
rm -rf doxygen
diff --git a/configure.ac b/configure.ac
index 03dbd6a..e2d3456 100755
--- a/configure.ac
+++ b/configure.ac
@@ -289,6 +289,9 @@ AM_CONDITIONAL([HAVE_SPLINT],[test "x$SPLINT" != xNO_SPLINT])
# Check for mccabe makefile conditional support
AC_PATH_PROG(MCCABE,pmccabe,NO_MCCABE)
AM_CONDITIONAL([HAVE_MCCABE],[test "x$MCCABE" != xNO_MCCABE])
+# Check for cppcheck makefile conditional support
+AC_PATH_PROG(CPPCHECK,cppcheck,NO_CPPCHECK)
+AM_CONDITIONAL([HAVE_CPPCHECK],[test "x$CPPCHECK" != xNO_CPPCHECK])
# Checks for libraries.
# Checks for header files.