X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=include%2Fhost-build.mk;h=760d38b371f8fcb6af7acfcc3bd07e65647b0ae6;hp=66795c8e1082c848a941dc09c87abd113a7e1387;hb=ec1a713315827c9d6ede73a7dd44ac6d05fb0e11;hpb=dc0f1ee853c944b1d1cea6ea65bde1fd11412f00 diff --git a/include/host-build.mk b/include/host-build.mk index 66795c8e10..760d38b371 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -55,7 +55,7 @@ HOST_CONFIGURE_VARS = \ CFLAGS="$(HOST_CFLAGS)" \ CPPFLAGS="$(HOST_CPPFLAGS)" \ LDFLAGS="$(HOST_LDFLAGS)" \ - SHELL="$(BASH)" + SHELL="$(SHELL)" HOST_CONFIGURE_ARGS = \ --target=$(GNU_HOST_NAME) \ @@ -71,16 +71,10 @@ HOST_CONFIGURE_ARGS = \ HOST_MAKE_FLAGS = -HOST_CONFIGURE_CMD = ./configure - -ifneq ($(HOST_OS),Darwin) - ifeq ($(CONFIG_BUILD_STATIC_TOOLS),y) - HOST_STATIC_LINKING = -static - endif -endif +HOST_CONFIGURE_CMD = $(BASH) ./configure define Host/Configure/Default - (cd $(HOST_BUILD_DIR)/$(3); \ + $(if $(HOST_CONFIGURE_PARALLEL),+)(cd $(HOST_BUILD_DIR)/$(3); \ if [ -x configure ]; then \ $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/$(3)/ && \ $(2) \ @@ -97,7 +91,7 @@ define Host/Configure endef define Host/Compile/Default - $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ + +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \ $(HOST_MAKE_FLAGS) \ $(1) endef @@ -137,6 +131,7 @@ define Host/Exports/Default $(1) : export STAGING_PREFIX=$$(STAGING_DIR_HOST) $(1) : export PKG_CONFIG_PATH=$$(STAGING_DIR_HOST)/lib/pkgconfig $(1) : export PKG_CONFIG_LIBDIR=$$(STAGING_DIR_HOST)/lib/pkgconfig + $(1) : export CCACHE_DIR:=$(STAGING_DIR_HOST)/ccache endef Host/Exports=$(Host/Exports/Default) @@ -164,42 +159,32 @@ ifndef DUMP touch $$@ $(call Host/Exports,$(HOST_STAMP_BUILT)) - ifdef Host/Install - host-install: $(if $(STAMP_BUILT),$(HOST_STAMP_BUILT),$(HOST_STAMP_INSTALLED)) - endif - - ifndef STAMP_BUILT - prepare: host-prepare - compile: host-compile - install: host-install - clean: host-clean - update: host-update - refresh: host-refresh - - $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED) + $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED) $(foreach hook,$(Hooks/HostCompile/Pre),$(call $(hook))$(sep)) $(call Host/Compile) $(foreach hook,$(Hooks/HostCompile/Post),$(call $(hook))$(sep)) touch $$@ - $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT) $(if $(FORCE_HOST_INSTALL),FORCE) + $(HOST_STAMP_INSTALLED): $(HOST_STAMP_BUILT) $(if $(FORCE_HOST_INSTALL),FORCE) $(call Host/Install) $(foreach hook,$(Hooks/HostInstall/Post),$(call $(hook))$(sep)) mkdir -p $$(shell dirname $$@) + touch $(HOST_STAMP_BUILT) touch $$@ - else - $(HOST_STAMP_BUILT): $(HOST_STAMP_CONFIGURED) $(if $(FORCE_HOST_INSTALL),FORCE) - $(foreach hook,$(Hooks/HostCompile/Pre),$(call $(hook))$(sep)) - $(call Host/Compile) - $(foreach hook,$(Hooks/HostCompile/Post),$(call $(hook))$(sep)) - $(call Host/Install) - $(foreach hook,$(Hooks/HostInstall/Post),$(call $(hook))$(sep)) - touch $$@ + + ifndef STAMP_BUILT + prepare: host-prepare + compile: host-compile + install: host-install + clean: host-clean + update: host-update + refresh: host-refresh endif + host-prepare: $(HOST_STAMP_PREPARED) host-configure: $(HOST_STAMP_CONFIGURED) - host-compile: $(HOST_STAMP_BUILT) - host-install: + host-compile: $(HOST_STAMP_BUILT) $(if $(STAMP_BUILT),$(HOST_STAMP_INSTALLED)) + host-install: $(HOST_STAMP_INSTALLED) host-clean: FORCE $(call Host/Clean) $(call Host/Uninstall)