From df6bb84a327f29fbb044202bd5555f45656808ed Mon Sep 17 00:00:00 2001 From: devzero2000 Date: Thu, 19 Dec 2013 18:01:07 +0000 Subject: add cppcheck conditional makefile target --- CHANGES | 1 + Makefile.am | 7 +++++++ configure.ac | 3 +++ 3 files changed, 11 insertions(+) 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. -- cgit v1.2.1