Fix CCACHE handling, and make use of ccache's BASEDIR feature
authorPatrick Georgi <patrick.georgi@coresystems.de>
Fri, 24 Sep 2010 22:15:54 +0000 (22:15 +0000)
committerPatrick Georgi <patrick.georgi@coresystems.de>
Fri, 24 Sep 2010 22:15:54 +0000 (22:15 +0000)
Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5836 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1

Makefile

index 771f48de8d117c88903902acb3be034d90ddf941..a5cba2b906574fd871cb9c8a508134d8f715bfd0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -88,7 +88,7 @@ all: config
 
 else
 
-include $(top)/.config
+include $(HAVE_DOTCONFIG)
 
 ifneq ($(INNER_SCANBUILD),y)
 ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
@@ -98,10 +98,11 @@ endif
 endif
 
 ifeq ($(CONFIG_CCACHE),y)
-CCACHE:=CCACHE_COMPILERCHECK=content $(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH))))
+CCACHE:=$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH))))
 ifeq ($(CCACHE),)
 $(error ccache selected, but not found in PATH)
 endif
+CCACHE:=CCACHE_COMPILERCHECK=content CCACHE_BASEDIR=$(top) $(CCACHE)
 CC := $(CCACHE) $(CC)
 HOSTCC := $(CCACHE) $(HOSTCC)
 HOSTCXX := $(CCACHE) $(HOSTCXX)