aboutsummaryrefslogtreecommitdiffstats
path: root/tools/ccache/Makefile
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-06-06 13:27:11 +0000
committerJohn Crispin <john@openwrt.org>2012-06-06 13:27:11 +0000
commita53b084e497a9f1629a2caada833ebe14a6838b7 (patch)
treeb3c7d810e91ef20fedfcb2e87027309371c7c21d /tools/ccache/Makefile
parent84a8853430779dd7ac93682654f008fe3f7eebd7 (diff)
downloadupstream-a53b084e497a9f1629a2caada833ebe14a6838b7.tar.gz
upstream-a53b084e497a9f1629a2caada833ebe14a6838b7.tar.bz2
upstream-a53b084e497a9f1629a2caada833ebe14a6838b7.zip
add ccache wrapper
SVN-Revision: 32075
Diffstat (limited to 'tools/ccache/Makefile')
-rw-r--r--tools/ccache/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile
index 9bc0b5901a..8848fa5102 100644
--- a/tools/ccache/Makefile
+++ b/tools/ccache/Makefile
@@ -17,6 +17,11 @@ PKG_CAT:=zcat
include $(INCLUDE_DIR)/host-build.mk
+define Host/Install/ccache
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
+ $(CP) ./files/* $(STAGING_DIR_HOST)/bin/
+endef
+
ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found)
define Host/Compile
$(MAKE) CC="$(HOSTCC_NOCACHE)" -C $(HOST_BUILD_DIR)
@@ -26,6 +31,10 @@ ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found)
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
$(call Host/Clean/Default)
endef
+ define Host/Install
+ $(call Host/Install/Default)
+ $(call Host/Install/ccache)
+ endef
else
define Host/Prepare
endef
@@ -34,6 +43,7 @@ else
define Host/Compile
endef
define Host/Install
+ $(call Host/Install/ccache)
endef
define Host/Clean
endef