Commit 4b02370ffbdbc57961d5032fdfcd96b3670efbc0

Authored by Jürgen Knödlseder
1 parent f1e44f2b

Add target for cppcheck.

Added a target to execute cppcheck. The execution will only be done if the cppcheck executable has been found. The results will be writted into the file cppcheck-result.xml.
Showing 1 changed file with 15 additions and 2 deletions
Makefile.am
... ... @@ -40,9 +40,22 @@ uninstall-local: $(HTML_UNINSTALL_DATA_TARGETS)
40 40  
41 41  
42 42 #
43   -# Additional install rules
  43 +# Additional rules
44 44 #
45 45  
  46 +# Rules
  47 +.PHONY: cppcheck doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
  48 +
  49 +# Add cppcheck rule (is declared PHONY later)
  50 +cppcheck:
  51 + @if type cppcheck >/dev/null 2>&1; then \
  52 + cppcheck -v --enable=all --xml \
  53 + -Iinclude -Iinst/lat/include -Iinst/cta/include -Iinst/mwl/include \
  54 + inst/*/src inst/*/test src test 2> cppcheck-result.xml; \
  55 + else \
  56 + echo "cppcheck no installed."; \
  57 + fi
  58 +
46 59 # Add Doxygen rules
47 60 if DX_COND_doc
48 61  
... ... @@ -122,7 +135,7 @@ DX_CLEAN_LATEX = @DX_DOCDIR@/latex
122 135 endif #DX_COND_latex
123 136  
124 137 # Rules
125   -.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
  138 +#.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
126 139  
127 140 .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
128 141  
... ...