projects
/
openwrt
/
svn-archive
/
archive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ebed3a7
)
tools: clean up Makefiles / make ccache work
author
John Crispin
<john@openwrt.org>
Sun, 15 Jan 2012 11:43:13 +0000
(11:43 +0000)
committer
John Crispin
<john@openwrt.org>
Sun, 15 Jan 2012 11:43:13 +0000
(11:43 +0000)
SVN-Revision: 29754
15 files changed:
include/host-build.mk
patch
|
blob
|
history
rules.mk
patch
|
blob
|
history
tools/Makefile
patch
|
blob
|
history
tools/automake/Makefile
patch
|
blob
|
history
tools/bison/Makefile
patch
|
blob
|
history
tools/ccache/Makefile
patch
|
blob
|
history
tools/firmware-utils/Makefile
patch
|
blob
|
history
tools/flex/Makefile
patch
|
blob
|
history
tools/genext2fs/Makefile
patch
|
blob
|
history
tools/gmp/Makefile
patch
|
blob
|
history
tools/libtool/Makefile
patch
|
blob
|
history
tools/m4/Makefile
patch
|
blob
|
history
tools/padjffs2/Makefile
patch
|
blob
|
history
tools/pkg-config/Makefile
patch
|
blob
|
history
tools/sstrip/Makefile
patch
|
blob
|
history
diff --git
a/include/host-build.mk
b/include/host-build.mk
index 03feefa2ed0c25259dc7b81eadff4a77eb8966c5..df7d60611ee07fe95cfd497d093c2938f5105344 100644
(file)
--- a/
include/host-build.mk
+++ b/
include/host-build.mk
@@
-45,6
+45,7
@@
define Host/Prepare
endef
HOST_CONFIGURE_VARS = \
endef
HOST_CONFIGURE_VARS = \
+ CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
CFLAGS="$(HOST_CFLAGS)" \
CPPFLAGS="$(HOST_CFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
diff --git
a/rules.mk
b/rules.mk
index 53891eaa9759669a56192a2bb29ba5f919f07f5a..ef61c4d749ecedf331378d2210c16637e711c727 100644
(file)
--- a/
rules.mk
+++ b/
rules.mk
@@
-170,6
+170,7
@@
PKG_CONFIG:=$(STAGING_DIR_HOST)/bin/pkg-config
export PKG_CONFIG
HOSTCC:=gcc
export PKG_CONFIG
HOSTCC:=gcc
+HOSTCC_NOCACHE:=$(HOSTCC)
HOST_CFLAGS:=-O2 -I$(STAGING_DIR_HOST)/include
HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib
HOST_CFLAGS:=-O2 -I$(STAGING_DIR_HOST)/include
HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib
@@
-188,6
+189,7
@@
INSTALL_CONF:=install -m0600
ifneq ($(CONFIG_CCACHE),)
TARGET_CC:= ccache $(TARGET_CC)
TARGET_CXX:= ccache $(TARGET_CXX)
ifneq ($(CONFIG_CCACHE),)
TARGET_CC:= ccache $(TARGET_CC)
TARGET_CXX:= ccache $(TARGET_CXX)
+ HOSTCC:= ccache $(HOSTCC)
endif
TARGET_CONFIGURE_OPTS = \
endif
TARGET_CONFIGURE_OPTS = \
diff --git
a/tools/Makefile
b/tools/Makefile
index 0c2706d7a82783cf1bb35e96eeb27c838f4bc92e..9f8665ca99bb1b76fe6a144fda58e7f78e856f58 100644
(file)
--- 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-$(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
endif
tools-y += lzma squashfs4
-tools-$(CONFIG_CCACHE) += ccache
ifdef CONFIG_GCC_USE_GRAPHITE
ifeq ($(CONFIG_GCC_USE_SYSTEM_PPL_CLOOG),)
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
$(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)
$(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
$(curdir)/builddirs-default := $(tools-y)
diff --git
a/tools/automake/Makefile
b/tools/automake/Makefile
index ee7966aeebd5e6d7bc6e79d2efd7fc796253f78b..dc51a6d477caf3566dd948cb8b4ce345e2798d87 100644
(file)
--- a/
tools/automake/Makefile
+++ b/
tools/automake/Makefile
@@
-15,15
+15,7
@@
PKG_MD5SUM:=c2972c4d9b3e29c03d5f2af86249876f
include $(INCLUDE_DIR)/host-build.mk
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
define Host/Install
$(MAKE) -C $(HOST_BUILD_DIR) install
diff --git
a/tools/bison/Makefile
b/tools/bison/Makefile
index 50d836691fd7ebeae1685ca3138a9f1a8f0a757f..01820e2755009d4d53656c5175e5b471fbdbff50 100644
(file)
--- a/
tools/bison/Makefile
+++ b/
tools/bison/Makefile
@@
-16,14
+16,6
@@
PKG_CAT:=bzcat
include $(INCLUDE_DIR)/host-build.mk
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)
define Host/Clean
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
$(call Host/Clean/Default)
diff --git
a/tools/ccache/Makefile
b/tools/ccache/Makefile
index ada929377a1f897449e3ed0bf96103c5ac9f9ccd..21123b316db45d32f89b70ec7231b43e698b37bd 100644
(file)
--- 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
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
endef
define Host/Clean
@@
-41,6
+37,8
@@
else
endef
define Host/Clean
endef
endef
define Host/Clean
endef
+ define Download
+ endef
endif
$(eval $(call HostBuild))
endif
$(eval $(call HostBuild))
diff --git
a/tools/firmware-utils/Makefile
b/tools/firmware-utils/Makefile
index 46fc40c37e63e66e166307aced1b981387336528..cd7531f216a421de2a735054d766cc8d63e92b17 100644
(file)
--- 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
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)
+ $(
HOST
CC) $(HOST_CFLAGS) -include endian.h -o $(HOST_BUILD_DIR)/bin/$(firstword $(1)) $(foreach src,$(1),src/$(src).c) $(2)
endef
define Host/Compile
endef
define Host/Compile
diff --git
a/tools/flex/Makefile
b/tools/flex/Makefile
index 9d4ae136b4f5a6272bfdd16e57cff633a7357b40..2fcc2c643fd502a98e88190c46b2ef02721e37cf 100644
(file)
--- a/
tools/flex/Makefile
+++ b/
tools/flex/Makefile
@@
-16,14
+16,6
@@
PKG_CAT:=bzcat
include $(INCLUDE_DIR)/host-build.mk
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)
define Host/Clean
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
$(call Host/Clean/Default)
diff --git
a/tools/genext2fs/Makefile
b/tools/genext2fs/Makefile
index 78416f2b3e4fceabe915cae3df53fcc30a4f7a3b..67fbef64e0235b144ef7bd4f2afbd1211295739d 100644
(file)
--- a/
tools/genext2fs/Makefile
+++ b/
tools/genext2fs/Makefile
@@
-16,26
+16,22
@@
PKG_MD5SUM:=b7b6361bcce2cedff1ae437fadafe53b
include $(INCLUDE_DIR)/host-build.mk
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) \
define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR) \
diff --git
a/tools/gmp/Makefile
b/tools/gmp/Makefile
index 38ffcb72a4174fbdbb7c31d0e1efa2511c60fe0f..1bee5f2b1f9f8ecfbbdbe99d3e29f6b654ea4e65 100644
(file)
--- a/
tools/gmp/Makefile
+++ b/
tools/gmp/Makefile
@@
-23,13
+23,4
@@
HOST_CONFIGURE_ARGS += \
--enable-cxx \
--enable-mpbsd
--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))
$(eval $(call HostBuild))
diff --git
a/tools/libtool/Makefile
b/tools/libtool/Makefile
index fce68aebadf007997c3fd1d476c9355191612a38..080689b8ac203dcfd9777cd33bd1b6f323e84e55 100644
(file)
--- 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=""
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
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 b760e158b8c3b1110c6cff226f24af632f22169a..b838799ab0fc3c620c4be24dfdac8c085ae9dc48 100644
(file)
--- a/
tools/m4/Makefile
+++ b/
tools/m4/Makefile
@@
-16,14
+16,6
@@
PKG_CAT:=zcat
include $(INCLUDE_DIR)/host-build.mk
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)
define Host/Clean
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
$(call Host/Clean/Default)
diff --git
a/tools/padjffs2/Makefile
b/tools/padjffs2/Makefile
index a057ddddcaf4653440ff9bb7a55e9d73b50c1ff1..a949ac062822aa959d87552f60171acf73ccb99f 100644
(file)
--- a/
tools/padjffs2/Makefile
+++ b/
tools/padjffs2/Makefile
@@
-21,10
+21,6
@@
endef
define Host/Configure
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
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 530c196bd51534eb09c9fc46727c024f45092e02..e7d2982f7f45cd9694aad027a5772613fbed13da 100644
(file)
--- a/
tools/pkg-config/Makefile
+++ b/
tools/pkg-config/Makefile
@@
-15,10
+15,6
@@
PKG_MD5SUM:=a3270bab3f4b69b7dc6dbdacbcae9745
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/host-build.mk
-define Host/Compile
- $(MAKE) -C $(HOST_BUILD_DIR)
-endef
-
define Host/Install
$(MAKE) -C $(HOST_BUILD_DIR) \
install
define Host/Install
$(MAKE) -C $(HOST_BUILD_DIR) \
install
diff --git
a/tools/sstrip/Makefile
b/tools/sstrip/Makefile
index d93e7618d14200f4da565a9b0c9baaaeecd47c4d..681e533be436bd2b7b8f8fa93603830b6ffee0b3 100644
(file)
--- a/
tools/sstrip/Makefile
+++ b/
tools/sstrip/Makefile
@@
-11,7
+11,7
@@
PKG_NAME:=sstrip
include $(INCLUDE_DIR)/host-build.mk
define Host/Compile
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
+ $(
HOST
CC) $(HOST_CFLAGS) -I./include -include endian.h -o $(HOST_BUILD_DIR)/sstrip src/sstrip.c
endef
define Host/Install
endef
define Host/Install