summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.