summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.top
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-05-30 01:42:02 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-05-30 01:42:02 +0000
commit84ee7a76b11b3679bdc8a73091ada2b649e903ff (patch)
tree361bcd58dd9a086e98eb7a423de2ffdbfaeaccfd /makefiles/Makefile.top
parent3772afb662d67528957eedab53a8371c4bfc12b2 (diff)
downloadbuildsystem-84ee7a76b11b3679bdc8a73091ada2b649e903ff.tar.gz
buildsystem-84ee7a76b11b3679bdc8a73091ada2b649e903ff.tar.bz2
First attempt at some kind of static analysis target
svn path=/trunk/tools/buildsystem/; revision=7648
Diffstat (limited to 'makefiles/Makefile.top')
-rw-r--r--makefiles/Makefile.top11
1 files changed, 11 insertions, 0 deletions
diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top
index 00c62b1..fcb80dd 100644
--- a/makefiles/Makefile.top
+++ b/makefiles/Makefile.top
@@ -46,6 +46,7 @@
# test Build and run test suite, using current settings.
# coverage Determine test suite coverage (requires lcov)
# profile Build with profiling support enabled (requires gprof)
+# scan Perform static analysis on sources (requires llvm)
# docs Produce documentation (requires doxygen)
# clean Clean the build
# distclean Remove distribution files, too
@@ -152,6 +153,13 @@ SOURCES :=
# Include configuration Makefile fragment
-include Makefile.config
+# If we're performing static analysis, then override CC
+ifeq ($(MAKECMDGOALS),scan)
+ # Need this in the environment
+ export CCC_CC := $(CC)
+ CC := build/llvm/ccc-analyzer
+endif
+
# Set the default target (before including any children)
__default: all
@@ -224,6 +232,9 @@ coverage: __precov test
# Build for profiling
profile: __partial_clean test
+# Perform static analysis
+scan: __partial_clean test
+
# Compile documentation
docs: $(BUILDDIR)/stamp
$(Q)$(DOXYGEN) build/Doxyfile