tools: clean up Makefiles / make ccache work
[openwrt.git] / tools / Makefile
index 0c2706d..9f8665c 100644 (file)
@@ -21,10 +21,9 @@ tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
 tools-$(CONFIG_powerpc) += upx
 tools-$(CONFIG_TARGET_x86) += qemu
 ifneq ($(CONFIG_TARGET_ar71xx),)
-tools-y += lzma-old squashfs 
+tools-y += lzma-old squashfs
 endif
 tools-y += lzma squashfs4
-tools-$(CONFIG_CCACHE) += ccache
 
 ifdef CONFIG_GCC_USE_GRAPHITE
   ifeq ($(CONFIG_GCC_USE_SYSTEM_PPL_CLOOG),)
@@ -59,6 +58,11 @@ $(curdir)/missing-macros/compile := $(curdir)/automake/install
 $(curdir)/e2fsprogs/compile := $(curdir)/automake/install
 $(curdir)/libelf/compile := $(curdir)/automake/install
 
+ifneq ($(CONFIG_CCACHE),)
+$(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/install))
+tools-y += ccache
+endif
+
 $(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
 $(curdir)/builddirs-default := $(tools-y)
 
This page took 0.027373 seconds and 4 git commands to generate.