summaryrefslogtreecommitdiff
path: root/makefiles
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-05-30 11:14:15 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-05-30 11:14:15 +0000
commit22d5262c3790214eec4a5d41350b196735b66dbc (patch)
treed72ec6b4e7dafbcc8b68c2548c3fe0c52425c670 /makefiles
parenta6cf1864b68d5cb173fffc70453f05ac3f76c2f8 (diff)
downloadbuildsystem-22d5262c3790214eec4a5d41350b196735b66dbc.tar.gz
buildsystem-22d5262c3790214eec4a5d41350b196735b66dbc.tar.bz2
Drop scan target and just fix up the tooling as appropriate
svn path=/trunk/tools/buildsystem/; revision=7654
Diffstat (limited to 'makefiles')
-rw-r--r--makefiles/Makefile.tools43
-rw-r--r--makefiles/Makefile.top14
2 files changed, 28 insertions, 29 deletions
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index 67827b3..4620e03 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -71,12 +71,12 @@ ifeq ($(TARGET),riscos)
# Building on native RISC OS
GCCSDK_INSTALL_ENV ?= <NSLibs$$Dir>
- CC := gcc
- CMHG := cmunge
- GENHTML := echo
- INSTALL := echo
- LCOV := echo
- PKGCONFIG :=
+ CC__ := gcc
+ CMHG ?= cmunge
+ GENHTML ?= echo
+ INSTALL ?= echo
+ LCOV ?= echo
+ PKGCONFIG ?=
# This is nasty, but needed because $(CURDIR) will
# contain colons, and thus confuse make mightily
@@ -88,13 +88,13 @@ ifeq ($(TARGET),riscos)
GCCSDK_INSTALL_ENV ?= /home/riscos/env
GCCSDK_INSTALL_CROSSBIN ?= /home/riscos/cross/bin
- AR := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)
- CC := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
- CMHG := PATH="$(GCCSDK_INSTALL_CROSSBIN):$(PATH)" $(GCCSDK_INSTALL_CROSSBIN)/cmunge
- GENHTML := echo
- HOST_CC := cc
- LCOV := echo
- PKGCONFIG := $(GCCSDK_INSTALL_ENV)/ro-pkg-config
+ AR ?= $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*ar)
+ CC__ := $(wildcard $(GCCSDK_INSTALL_CROSSBIN)/*gcc)
+ CMHG ?= PATH="$(GCCSDK_INSTALL_CROSSBIN):$(PATH)" $(GCCSDK_INSTALL_CROSSBIN)/cmunge
+ GENHTML ?= echo
+ HOST_CC ?= cc
+ LCOV ?= echo
+ PKGCONFIG ?= $(GCCSDK_INSTALL_ENV)/ro-pkg-config
ifneq ($(COMPONENT_TYPE),riscos-module)
ifneq ($(findstring arm-unknown-riscos-gcc,$(CC)),)
@@ -120,10 +120,10 @@ endif
ifeq ($(TARGET),beos)
ifeq ($(HOST),beos)
# Building on BeOS
- CC := gcc
+ CC__ := gcc
# No pkg-config
- PKGCONFIG :=
+ PKGCONFIG ?=
GCCVER := 2
@@ -257,3 +257,16 @@ ifneq ($(GCCVER),2)
CC_CAN_BUILD_AND_DEP ?= yes
endif
+# Finally, set CC to the correct compiler
+ifeq ($(findstring ccc-analyzer,$(CC)),ccc-analyzer)
+ # We're being invoked by scan-build, so export
+ # the compiler we would have used such that
+ # scan-build works with cross-compilation
+ export CCC_CC := $(CC__)
+else
+ # Only set CC if it's not already set in the environment
+ ifndef $(CC)
+ CC := $(CC__)
+ endif
+endif
+
diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top
index af2f525..00c62b1 100644
--- a/makefiles/Makefile.top
+++ b/makefiles/Makefile.top
@@ -46,7 +46,6 @@
# 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
@@ -153,16 +152,6 @@ SOURCES :=
# Include configuration Makefile fragment
-include Makefile.config
-# If we're performing static analysis, then override CC
-ifeq ($(MAKECMDGOALS),scan)
- # Only if it's not already ccc-analyzer
- ifneq ($(findstring ccc-analyzer,$(CC)),ccc-analyzer)
- # Need this in the environment
- export CCC_CC := $(CC)
- CC := build/llvm/ccc-analyzer
- endif
-endif
-
# Set the default target (before including any children)
__default: all
@@ -235,9 +224,6 @@ 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