diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-06-10 14:59:13 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-06-10 14:59:13 +0000 |
commit | b9952f480910bcb298075ef5a1cee308da50b1b4 (patch) | |
tree | c2c95a61e6ce31f3d468627da50d40125902207f /LUFA/Build/lufa.cppcheck.in | |
parent | 678cb3c2bfb52804a3428880208b18a79859e668 (diff) | |
download | lufa-b9952f480910bcb298075ef5a1cee308da50b1b4.tar.gz lufa-b9952f480910bcb298075ef5a1cee308da50b1b4.tar.bz2 lufa-b9952f480910bcb298075ef5a1cee308da50b1b4.zip |
Add Build System documentation to the library manual. Update CPPCHECK build system module so that it uses the SRC variable rather than just the project directory.
Diffstat (limited to 'LUFA/Build/lufa.cppcheck.in')
-rw-r--r-- | LUFA/Build/lufa.cppcheck.in | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/LUFA/Build/lufa.cppcheck.in b/LUFA/Build/lufa.cppcheck.in index 03f310d09..dcc2de9ea 100644 --- a/LUFA/Build/lufa.cppcheck.in +++ b/LUFA/Build/lufa.cppcheck.in @@ -8,10 +8,9 @@ LUFA_BUILD_MODULES += CPPCHECK LUFA_BUILD_TARGETS += cppcheck cppcheck-config -LUFA_BUILD_MANDATORY_VARS += -LUFA_BUILD_OPTIONAL_VARS += CPPCHECK_PATH CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE \ - CPPCHECK_ENABLE CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET \ - CPPCHECK_FLAGS +LUFA_BUILD_MANDATORY_VARS += SRC +LUFA_BUILD_OPTIONAL_VARS += CPPCHECK_INCLUDES CPPCHECK_EXCLUDES CPPCHECK_MSG_TEMPLATE CPPCHECK_ENABLE \ + CPPCHECK_SUPPRESS CPPCHECK_FAIL_ON_WARNING CPPCHECK_QUIET CPPCHECK_FLAGS # ----------------------------------------------------------------------------- # LUFA CPPCheck Buildsystem Makefile Module. @@ -27,11 +26,10 @@ LUFA_BUILD_OPTIONAL_VARS += CPPCHECK_PATH CPPCHECK_INCLUDES CPPCHECK_EXCLUDES C # # MANDATORY PARAMETERS: # -# (None) +# SRC - List of source files to statically analyze # # OPTIONAL PARAMETERS: # -# CPPCHECK_PATH - Path of the files to statically analyze # CPPCHECK_INCLUDES - Extra include paths to search for missing # header files # CPPCHECK_EXCLUDES - Source file paths to exclude checking (can be @@ -51,7 +49,6 @@ ERROR_IF_EMPTY = $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $( ERROR_IF_NONBOOL = $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N)) # Default values of optionally user-supplied variables -CPPCHECK_PATH ?= . CPPCHECK_INCLUDES ?= CPPCHECK_EXCLUDES ?= CPPCHECK_MSG_TEMPLATE ?= {file}:{line}: {severity} ({id}): {message} @@ -63,7 +60,7 @@ CPPCHECK_FLAGS ?= # Sanity check user supplied values $(foreach MANDATORY_VAR, $(LUFA_BUILD_MANDATORY_VARS), $(call ERROR_IF_UNSET, $(MANDATORY_VAR))) -$(call ERROR_IF_EMPTY, CPPCHECK_PATH) +$(call ERROR_IF_EMPTY, SRC) $(call ERROR_IF_EMPTY, CPPCHECK_MSG_TEMPLATE) $(call ERROR_IF_EMPTY, CPPCHECK_ENABLE) $(call ERROR_IF_NONBOOL, CPPCHECK_FAIL_ON_WARNING) @@ -84,12 +81,12 @@ endif MSG_CPPCHECK_CMD := ' [CPPCHECK]:' cppcheck-config: - @echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration for path \"$(CPPCHECK_PATH)\" - cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(CPPCHECK_PATH) + @echo $(MSG_CPPCHECK_CMD) Checking cppcheck configuration check on source files + cppcheck $(BASE_CPPCHECK_FLAGS) --check-config $(CPPCHECK_FLAGS) $(SRC) cppcheck: - @echo $(MSG_CPPCHECK_CMD) Performing cppcheck analysis on path \"$(CPPCHECK_PATH)\" - cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(CPPCHECK_PATH) + @echo $(MSG_CPPCHECK_CMD) Performing cppcheck analysis on source files + cppcheck $(BASE_CPPCHECK_FLAGS) --enable=$(CPPCHECK_ENABLE) $(CPPCHECK_SUPPRESS:%=--suppress=%) $(CPPCHECK_FLAGS) $(SRC) # Phony build targets for this module .PHONY: cppcheck-config cppcheck |