summaryrefslogtreecommitdiff
path: root/makefiles/Makefile.tools
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-05-30 11:40:22 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-05-30 11:40:22 +0000
commitbe8fba73ee3841990b676c91e74da5a8d51d9a0e (patch)
tree9e87392dd3e2930449295a357e57212799f98156 /makefiles/Makefile.tools
parent22d5262c3790214eec4a5d41350b196735b66dbc (diff)
downloadbuildsystem-be8fba73ee3841990b676c91e74da5a8d51d9a0e.tar.gz
buildsystem-be8fba73ee3841990b676c91e74da5a8d51d9a0e.tar.bz2
Fix setting of $(CC)
svn path=/trunk/tools/buildsystem/; revision=7655
Diffstat (limited to 'makefiles/Makefile.tools')
-rw-r--r--makefiles/Makefile.tools18
1 files changed, 13 insertions, 5 deletions
diff --git a/makefiles/Makefile.tools b/makefiles/Makefile.tools
index 4620e03..ae51c5c 100644
--- a/makefiles/Makefile.tools
+++ b/makefiles/Makefile.tools
@@ -261,12 +261,20 @@ endif
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__)
+ # scan-build works with cross-compilation.
+ # There's no need to do this if we would have
+ # used the default compiler.
+ ifdef CC__
+ export CCC_CC := $(CC__)
+ endif
else
- # Only set CC if it's not already set in the environment
- ifndef $(CC)
- CC := $(CC__)
+ # Only set CC if it's not already set in the
+ # environment and we have a value for it.
+ # Otherwise, leave it to be defaulted.
+ ifeq ($(origin CC),default)
+ ifdef CC__
+ CC := $(CC__)
+ endif
endif
endif