diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-02-28 21:03:17 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-02-28 21:03:17 +0000 |
commit | e9bc27949d3517d936be28512fe8886cc314f30e (patch) | |
tree | caaf97742c4dc1ef1a878d32153fb31a18bc1b8f | |
parent | 98b042952a9ee8513ead66040ce4261e7a011aba (diff) |
adjust host-build.mk to bring it closer to package.mk
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14699 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | include/host-build.mk | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/include/host-build.mk b/include/host-build.mk index 2ce3e1598d..8ad8f79d96 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -34,27 +34,33 @@ define Host/Prepare $(call Host/Prepare/Default) endef +HOST_CONFIGURE_VARS = \ + CPPFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + SHELL="$(BASH)" + +HOST_CONFIGURE_ARGS = \ + --target=$(GNU_HOST_NAME) \ + --host=$(GNU_HOST_NAME) \ + --build=$(GNU_HOST_NAME) \ + --program-prefix="" \ + --program-suffix="" \ + --prefix=$(STAGING_DIR_HOST) \ + --exec-prefix=$(STAGING_DIR_HOST) \ + --sysconfdir=$(STAGING_DIR_HOST)/etc \ + --localstatedir=$(STAGING_DIR_HOST)/var + +HOST_CONFIGURE_CMD = ./configure + define Host/Configure/Default @(cd $(HOST_BUILD_DIR)/$(3); \ - [ -x configure ] && \ - $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/$(3)/ && \ - $(2) \ - CPPFLAGS="$(HOST_CFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" \ - SHELL="$(BASH)" \ - ./configure \ - --target=$(GNU_HOST_NAME) \ - --host=$(GNU_HOST_NAME) \ - --build=$(GNU_HOST_NAME) \ - --program-prefix="" \ - --program-suffix="" \ - --prefix=$(STAGING_DIR_HOST) \ - --exec-prefix=$(STAGING_DIR_HOST) \ - --sysconfdir=$(STAGING_DIR_HOST)/etc \ - --localstatedir=$(STAGING_DIR_HOST)/var \ - $(DISABLE_NLS) \ - $(1); \ - true; \ + if [ -x configure ]; then \ + $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/$(3)/ && \ + $(2) \ + $(HOST_CONFIGURE_CMD) \ + $(HOST_CONFIGURE_ARGS) \ + $(1); \ + fi \ ) endef |