From a53b084e497a9f1629a2caada833ebe14a6838b7 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 6 Jun 2012 13:27:11 +0000 Subject: add ccache wrapper SVN-Revision: 32075 --- tools/ccache/Makefile | 10 ++++++++++ tools/ccache/files/ccache_cc | 2 ++ tools/ccache/files/ccache_cxx | 2 ++ 3 files changed, 14 insertions(+) create mode 100755 tools/ccache/files/ccache_cc create mode 100755 tools/ccache/files/ccache_cxx (limited to 'tools') diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index 9bc0b59..8848fa5 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 diff --git a/tools/ccache/files/ccache_cc b/tools/ccache/files/ccache_cc new file mode 100755 index 0000000..01c4ad4 --- /dev/null +++ b/tools/ccache/files/ccache_cc @@ -0,0 +1,2 @@ +#!/bin/sh +exec ccache "${TARGET_CC_NOCACHE}" "$@" diff --git a/tools/ccache/files/ccache_cxx b/tools/ccache/files/ccache_cxx new file mode 100755 index 0000000..cc60eb3 --- /dev/null +++ b/tools/ccache/files/ccache_cxx @@ -0,0 +1,2 @@ +#!/bin/sh +exec ccache "${TARGET_CXX_NOCACHE}" "$@" -- cgit v1.1