diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-03-17 02:20:34 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-03-17 02:20:34 +0000 |
commit | ddcfaeb1e516d569436c3d4d453a9573655ca375 (patch) | |
tree | 94b1169c72a68b9ef6ce9ab92aea68eb8764358a /include | |
parent | 7ef6b7451973d0d3fd09014871e7859b6a83fb19 (diff) | |
download | mtk-20170518-ddcfaeb1e516d569436c3d4d453a9573655ca375.zip mtk-20170518-ddcfaeb1e516d569436c3d4d453a9573655ca375.tar.gz mtk-20170518-ddcfaeb1e516d569436c3d4d453a9573655ca375.tar.bz2 |
move host build in packages into a separate namespace: package/<name>/host/<target> this allows dependencies between host and target packages, and saves unnecessary host builds for packages that contain both variants
SVN-Revision: 14905
Diffstat (limited to 'include')
-rw-r--r-- | include/host-build.mk | 16 | ||||
-rw-r--r-- | include/package-dumpinfo.mk | 6 | ||||
-rw-r--r-- | include/package.mk | 2 | ||||
-rw-r--r-- | include/quilt.mk | 2 | ||||
-rw-r--r-- | include/subdir.mk | 5 |
5 files changed, 22 insertions, 9 deletions
diff --git a/include/host-build.mk b/include/host-build.mk index a0ffd83..892cde9 100644 --- a/include/host-build.mk +++ b/include/host-build.mk @@ -12,6 +12,7 @@ include $(INCLUDE_DIR)/host.mk include $(INCLUDE_DIR)/unpack.mk include $(INCLUDE_DIR)/depends.mk +BUILD_TYPES += host HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPEND),))) HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built @@ -122,7 +123,12 @@ ifndef DUMP host-install: $(HOST_STAMP_INSTALLED) endif - $(if $(STAMP_BUILT),compile: host-install) + ifndef STAMP_BUILT + prepare: host-prepare + compile: host-compile + install: host-install + clean: host-clean + endif host-prepare: $(HOST_STAMP_PREPARED) host-configure: $(HOST_STAMP_CONFIGURED) host-compile: $(HOST_STAMP_BUILT) @@ -135,10 +141,10 @@ ifndef DUMP endef download: - prepare: host-prepare - compile: host-compile - install: host-install - clean: host-clean + prepare: + compile: + install: + clean: endif diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index f08788b..db8d9c1 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -32,8 +32,10 @@ $(if $(MENU),Menu: $(MENU) )Version: $(VERSION) Depends: $(DEPENDS) Provides: $(PROVIDES) -Build-Depends: $(PKG_BUILD_DEPENDS) -Section: $(SECTION) +$(if $(PKG_BUILD_DEPENDS),Build-Depends: $(PKG_BUILD_DEPENDS) +)$(if $(HOST_BUILD_DEPENDS),Build-Depends/host: $(HOST_BUILD_DEPENDS) +)$(if $(BUILD_TYPES),Build-Types: $(BUILD_TYPES) +)Section: $(SECTION) Category: $(CATEGORY) Title: $(TITLE) Maintainer: $(MAINTAINER) diff --git a/include/package.mk b/include/package.mk index 7e0501c..191dec9 100644 --- a/include/package.mk +++ b/include/package.mk @@ -79,7 +79,7 @@ define Build/DefaultTargets $(STAMP_CONFIGURED) : export PATH=$$(TARGET_PATH_PKG) $(STAMP_CONFIGURED) : export CONFIG_SITE:=$$(CONFIG_SITE) - $(STAMP_CONFIGURED): $(STAMP_PREPARED) $(HOST_STAMP_INSTALLED) + $(STAMP_CONFIGURED): $(STAMP_PREPARED) $(foreach hook,$(Hooks/Configure/Pre),$(call $(hook))$(sep)) $(Build/Configure) $(foreach hook,$(Hooks/Configure/Post),$(call $(hook))$(sep)) diff --git a/include/quilt.mk b/include/quilt.mk index 0d63e62..fbb3e01 100644 --- a/include/quilt.mk +++ b/include/quilt.mk @@ -67,7 +67,7 @@ ifneq ($(PKG_BUILD_DIR),) endif ifneq ($(HOST_BUILD_DIR),) - HOST_QUILT?=$(if $(wildcard $(if $(PKG_BUILD_DIR),$(PKG_BUILD_DIR),$(HOST_BUILD_DIR))/.quilt_used),y) + HOST_QUILT?=$(if $(findstring command,$(origin $(QUILT))),$(QUILT),$(if $(wildcard $(HOST_BUILD_DIR)/.quilt_used),y)) ifneq ($(HOST_QUILT),) HOST_STAMP_PATCHED:=$(HOST_BUILD_DIR)/.quilt_patched HOST_STAMP_CHECKED:=$(HOST_BUILD_DIR)/.quilt_checked diff --git a/include/subdir.mk b/include/subdir.mk index 3bf1a4b..e6c8066 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -27,6 +27,11 @@ define subdir $(foreach bd,$($(1)/builddirs), $(call warn,$(1),d,BD $(1)/$(bd)) $(foreach target,$(SUBTARGETS), + $(foreach btype,$(buildtypes-$(bd)), + $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype)))) + +$$(SUBMAKE) -C $(1)/$(bd) $(btype)-$(target) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))), || $(call MESSAGE, ERROR: $(1)/$(bd) [$(btype)] failed to build.)) + $$(if $(call debug,$(1)/$(bd),v),,.SILENT: $(1)/$(bd)/$(btype)/$(target)) + ) $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd)))) +$$(SUBMAKE) -C $(1)/$(bd) $(target) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call MESSAGE, ERROR: $(1)/$(bd) failed to build.)) $$(if $(call debug,$(1)/$(bd),v),,.SILENT: $(1)/$(bd)/$(target)) |