aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2016-08-01 18:00:47 +0000
committerBrian Behlendorf <[email protected]>2016-08-02 09:25:43 -0700
commitb64e02e5805e84dcaa4b0820b555b9f90aa5afea (patch)
tree9253ac1d99db12bdae6e91f557439e531286f507 /Makefile.am
parent4eb0db42d30b2ea8bed018f2227ebafd3ce35c9c (diff)
Add `make lint` target
Add a `make lint` target which maps to a cppcheck target. As with the shellcheck target it will only run when cppcheck is installed. This allows a `make lint` build check to be incrementally added to the automated testing for distribution which provide cppcheck. Signed-off-by: Brian Behlendorf <[email protected]> Closes #4915
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index ca8c8a0aa..b0d23d00c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -55,6 +55,13 @@ shellcheck:
done; \
fi
+lint: cppcheck
+
+cppcheck:
+ @if type cppcheck > /dev/null 2>&1; then \
+ cppcheck --quiet --force ${top_srcdir}; \
+ fi
+
ctags:
$(RM) tags
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags