diff options
author | John Crispin <blogic@openwrt.org> | 2012-01-15 11:43:13 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-01-15 11:43:13 +0000 |
commit | 1e0b48fafb133310de5e166adaf0c3957e7bee05 (patch) | |
tree | 5e1b24560a28f3d1faf6dc571355446688ffcdaa /tools | |
parent | 8f76568da91dbe989e5365a4a6d3f50847b1c755 (diff) | |
download | upstream-1e0b48fafb133310de5e166adaf0c3957e7bee05.tar.gz upstream-1e0b48fafb133310de5e166adaf0c3957e7bee05.tar.bz2 upstream-1e0b48fafb133310de5e166adaf0c3957e7bee05.zip |
tools: clean up Makefiles / make ccache work
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29754 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile | 8 | ||||
-rw-r--r-- | tools/automake/Makefile | 10 | ||||
-rw-r--r-- | tools/bison/Makefile | 8 | ||||
-rw-r--r-- | tools/ccache/Makefile | 8 | ||||
-rw-r--r-- | tools/firmware-utils/Makefile | 2 | ||||
-rw-r--r-- | tools/flex/Makefile | 8 | ||||
-rw-r--r-- | tools/genext2fs/Makefile | 36 | ||||
-rw-r--r-- | tools/gmp/Makefile | 9 | ||||
-rw-r--r-- | tools/libtool/Makefile | 4 | ||||
-rw-r--r-- | tools/m4/Makefile | 8 | ||||
-rw-r--r-- | tools/padjffs2/Makefile | 4 | ||||
-rw-r--r-- | tools/pkg-config/Makefile | 4 | ||||
-rw-r--r-- | tools/sstrip/Makefile | 2 |
13 files changed, 28 insertions, 83 deletions
diff --git a/tools/Makefile b/tools/Makefile index 0c2706d7a8..9f8665ca99 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -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) diff --git a/tools/automake/Makefile b/tools/automake/Makefile index ee7966aeeb..dc51a6d477 100644 --- a/tools/automake/Makefile +++ b/tools/automake/Makefile @@ -15,15 +15,7 @@ PKG_MD5SUM:=c2972c4d9b3e29c03d5f2af86249876f include $(INCLUDE_DIR)/host-build.mk -define Host/Configure - $(call Host/Configure/Default,\ - --datarootdir=$(STAGING_DIR_HOST)/share \ - ) -endef - -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) -endef +HOST_CONFIGURE_ARGS += --datarootdir=$(STAGING_DIR_HOST)/share define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) install diff --git a/tools/bison/Makefile b/tools/bison/Makefile index 50d836691f..01820e2755 100644 --- a/tools/bison/Makefile +++ b/tools/bison/Makefile @@ -16,14 +16,6 @@ PKG_CAT:=bzcat include $(INCLUDE_DIR)/host-build.mk -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) install -endef - define Host/Clean -$(MAKE) -C $(HOST_BUILD_DIR) uninstall $(call Host/Clean/Default) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index ada929377a..21123b316d 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -19,11 +19,7 @@ include $(INCLUDE_DIR)/host-build.mk ifneq ($(strip $(shell which ccache >/dev/null && echo found)),found) define Host/Compile - $(MAKE) CC="$(HOSTCC)" -C $(HOST_BUILD_DIR) - endef - - define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) install + $(MAKE) CC="$(HOSTCC_NOCACHE)" -C $(HOST_BUILD_DIR) endef define Host/Clean @@ -41,6 +37,8 @@ else endef define Host/Clean endef + define Download + endef endif $(eval $(call HostBuild)) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 46fc40c37e..cd7531f216 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/kernel.mk define cc - $(CC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/bin/$(firstword $(1)) $(foreach src,$(1),src/$(src).c) $(2) + $(HOSTCC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/bin/$(firstword $(1)) $(foreach src,$(1),src/$(src).c) $(2) endef define Host/Compile diff --git a/tools/flex/Makefile b/tools/flex/Makefile index 9d4ae136b4..2fcc2c643f 100644 --- a/tools/flex/Makefile +++ b/tools/flex/Makefile @@ -16,14 +16,6 @@ PKG_CAT:=bzcat include $(INCLUDE_DIR)/host-build.mk -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) install -endef - define Host/Clean -$(MAKE) -C $(HOST_BUILD_DIR) uninstall $(call Host/Clean/Default) diff --git a/tools/genext2fs/Makefile b/tools/genext2fs/Makefile index 78416f2b3e..67fbef64e0 100644 --- a/tools/genext2fs/Makefile +++ b/tools/genext2fs/Makefile @@ -16,26 +16,22 @@ PKG_MD5SUM:=b7b6361bcce2cedff1ae437fadafe53b include $(INCLUDE_DIR)/host-build.mk -define Host/Configure - ( cd $(HOST_BUILD_DIR); \ - ./configure \ - --target=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=/usr \ - --exec-prefix=/usr \ - --bindir=/usr/bin \ - --sbindir=/usr/sbin \ - --libexecdir=/usr/lib \ - --sysconfdir=/etc \ - --datadir=/usr/share \ - --localstatedir=/var \ - --mandir=/usr/man \ - --infodir=/usr/info \ - ) -endef +HOST_CONFIGURE_ARGS = \ + --target=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=/usr \ + --exec-prefix=/usr \ + --bindir=/usr/bin \ + --sbindir=/usr/sbin \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --localstatedir=/var \ + --mandir=/usr/man \ + --infodir=/usr/info \ define Host/Compile $(MAKE) -C $(HOST_BUILD_DIR) \ diff --git a/tools/gmp/Makefile b/tools/gmp/Makefile index 38ffcb72a4..1bee5f2b1f 100644 --- a/tools/gmp/Makefile +++ b/tools/gmp/Makefile @@ -23,13 +23,4 @@ HOST_CONFIGURE_ARGS += \ --enable-cxx \ --enable-mpbsd -define Host/Configure - (cd $(HOST_BUILD_DIR)/$(3); \ - $(HOST_CONFIGURE_CMD) \ - $(HOST_CONFIGURE_VARS) \ - $(HOST_CONFIGURE_ARGS); \ - ) -endef - - $(eval $(call HostBuild)) diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile index fce68aebad..080689b8ac 100644 --- a/tools/libtool/Makefile +++ b/tools/libtool/Makefile @@ -18,10 +18,6 @@ include $(INCLUDE_DIR)/host-build.mk HOST_CONFIGURE_VARS += \ lt_cv_sys_dlsearch_path="" -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) -endef - define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) install $(SED) 's,\(hardcode_into_libs\)=yes,\1=no,g' $(STAGING_DIR_HOST)/bin/libtool diff --git a/tools/m4/Makefile b/tools/m4/Makefile index b760e158b8..b838799ab0 100644 --- a/tools/m4/Makefile +++ b/tools/m4/Makefile @@ -16,14 +16,6 @@ PKG_CAT:=zcat include $(INCLUDE_DIR)/host-build.mk -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) -endef - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) install -endef - define Host/Clean -$(MAKE) -C $(HOST_BUILD_DIR) uninstall $(call Host/Clean/Default) diff --git a/tools/padjffs2/Makefile b/tools/padjffs2/Makefile index a057ddddca..a949ac0628 100644 --- a/tools/padjffs2/Makefile +++ b/tools/padjffs2/Makefile @@ -21,10 +21,6 @@ endef define Host/Configure endef -define Host/Compile - $(MAKE) CC="$(HOSTCC)" -C $(HOST_BUILD_DIR) -endef - define Host/Install $(CP) $(HOST_BUILD_DIR)/padjffs2 $(STAGING_DIR_HOST)/bin/ endef diff --git a/tools/pkg-config/Makefile b/tools/pkg-config/Makefile index 530c196bd5..e7d2982f7f 100644 --- a/tools/pkg-config/Makefile +++ b/tools/pkg-config/Makefile @@ -15,10 +15,6 @@ PKG_MD5SUM:=a3270bab3f4b69b7dc6dbdacbcae9745 include $(INCLUDE_DIR)/host-build.mk -define Host/Compile - $(MAKE) -C $(HOST_BUILD_DIR) -endef - define Host/Install $(MAKE) -C $(HOST_BUILD_DIR) \ install diff --git a/tools/sstrip/Makefile b/tools/sstrip/Makefile index d93e7618d1..681e533be4 100644 --- a/tools/sstrip/Makefile +++ b/tools/sstrip/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=sstrip include $(INCLUDE_DIR)/host-build.mk define Host/Compile - $(CC) $(HOST_CFLAGS) -I./include -include endian.h -o $(HOST_BUILD_DIR)/sstrip src/sstrip.c + $(HOSTCC) $(HOST_CFLAGS) -I./include -include endian.h -o $(HOST_BUILD_DIR)/sstrip src/sstrip.c endef define Host/Install |