Commit fcb3a77dae4f1709737463e074485d4e915b58a3
1 parent
b3bd09d2
Add cppncss and coverage targets.
Add cppncss target for static code complexity analysis. This target is now also part of static-analysis. Add coverage tagret for dynamic code analysis. Added also dynamic-analysis target that performs all supported dynamic analyses.
Showing
1 changed file
with
23 additions
and
3 deletions
Makefile.am
| ... | ... | @@ -47,7 +47,10 @@ uninstall-local: $(HTML_UNINSTALL_DATA_TARGETS) |
| 47 | 47 | .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) |
| 48 | 48 | |
| 49 | 49 | # Add static-analysis rule: |
| 50 | -static-analysis: cppcheck sloccount | |
| 50 | +static-analysis: cppcheck sloccount cppncss | |
| 51 | + | |
| 52 | +# Add dynamic-analysis rule: | |
| 53 | +dynamic-analysis: coverage | |
| 51 | 54 | |
| 52 | 55 | # Add cppcheck rule |
| 53 | 56 | cppcheck: |
| ... | ... | @@ -56,7 +59,7 @@ cppcheck: |
| 56 | 59 | -Iinclude -Iinst/lat/include -Iinst/cta/include -Iinst/mwl/include \ |
| 57 | 60 | inst/*/src inst/*/test src test 2> cppcheck-result.xml; \ |
| 58 | 61 | else \ |
| 59 | - echo "cppcheck not installed."; \ | |
| 62 | + echo "cppcheck not found in PATH."; \ | |
| 60 | 63 | fi |
| 61 | 64 | |
| 62 | 65 | # Add sloccount rule |
| ... | ... | @@ -65,7 +68,24 @@ sloccount: |
| 65 | 68 | sloccount --duplicates --wide --details \ |
| 66 | 69 | include src inst test > sloccount.sc; \ |
| 67 | 70 | else \ |
| 68 | - echo "sloccount not installed."; \ | |
| 71 | + echo "sloccount not found in PATH."; \ | |
| 72 | + fi | |
| 73 | + | |
| 74 | +# Add cppncss rule | |
| 75 | +cppncss: | |
| 76 | + @if type cppncss >/dev/null 2>&1; then \ | |
| 77 | + cppncss -r -v -x -k -f=cppncss-raw-report.xml \ | |
| 78 | + src inst/*/src; \ | |
| 79 | + else \ | |
| 80 | + echo "cppncss not found in PATH."; \ | |
| 81 | + fi | |
| 82 | + | |
| 83 | +# Add coverage rule | |
| 84 | +coverage: | |
| 85 | + @if type gcovr >/dev/null 2>&1; then \ | |
| 86 | + gcovr -r . -x -o gcovr-reports-data.xml; \ | |
| 87 | + else \ | |
| 88 | + echo "gcovr script not found in PATH."; \ | |
| 69 | 89 | fi |
| 70 | 90 | |
| 71 | 91 | # Add Doxygen rules | ... | ... |