diff options
author | Kim Phillips <kim.phillips@freescale.com> | 2012-09-21 12:28:17 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-10-15 11:54:03 -0700 |
commit | 4ab64933e3372ef0ad759fc7eae95713f9afd817 (patch) | |
tree | 1b0a01d15decc8cbf3364898714ca118dda7cebb /Makefile | |
parent | e46a4350b484cf7bc4ab861967bf303fc439c9e0 (diff) | |
download | u-boot-4ab64933e3372ef0ad759fc7eae95713f9afd817.tar.gz u-boot-4ab64933e3372ef0ad759fc7eae95713f9afd817.tar.xz u-boot-4ab64933e3372ef0ad759fc7eae95713f9afd817.zip |
add check infrastructure, default sparse
Add support for running source code checkers on u-boot source, e.g.,
using sparse to aid with typechecking. This comes in especially
handy as SoC vendors mix and match cores and devices with different
endianness, thus here we add CHECK_ENDIAN to the otherwise linux
kernel default CHECKFLAGS.
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -92,6 +92,24 @@ BUILD_DIR := $(O) endif endif +# Call a source code checker (by default, "sparse") as part of the +# C compilation. +# +# Use 'make C=1' to enable checking of re-compiled files. +# +# See the linux kernel file "Documentation/sparse.txt" for more details, +# including where to get the "sparse" utility. + +ifdef C +ifeq ("$(origin C)", "command line") +CHECKSRC := $(C) +endif +endif +ifndef CHECKSRC + CHECKSRC = 0 +endif +export CHECKSRC + ifneq ($(BUILD_DIR),) saved-output := $(BUILD_DIR) |