diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-05-09 18:27:44 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-05-11 19:03:34 +0200 |
commit | 60fc6610bef5843e212e759423a49d80b6af40d3 (patch) | |
tree | 51da752c9d1e64220cd9b1011f588f7fb4a99256 /include | |
parent | bcf67b69744d014c72201fa997268b6530ad8039 (diff) | |
download | upstream-60fc6610bef5843e212e759423a49d80b6af40d3.tar.gz upstream-60fc6610bef5843e212e759423a49d80b6af40d3.tar.bz2 upstream-60fc6610bef5843e212e759423a49d80b6af40d3.zip |
image.mk: add support for limiting images to specific subtargets
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include')
-rw-r--r-- | include/image.mk | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/image.mk b/include/image.mk index 47a47c096c..ed4f8e44ea 100644 --- a/include/image.mk +++ b/include/image.mk @@ -20,6 +20,7 @@ DTS_DIR:=$(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/dts sanitize = $(call tolower,$(subst _,-,$(1))) +SUBTARGET ?= default DIST_SANITIZED:=$(call sanitize,$(VERSION_DIST)) EXTRA_NAME_SANITIZED=$(call sanitize,$(EXTRA_IMAGE_NAME)) @@ -438,6 +439,7 @@ endef define Device/Init PROFILES := $(PROFILE) + SUBTARGETS := $(SUBTARGET) DEVICE_NAME := $(1) DEVICE_TITLE := DEVICE_PACKAGES := @@ -473,7 +475,7 @@ define Device/Export endef define Device/Check - _TARGET = $$(if $$(filter $(PROFILE),$$(PROFILES)),install,install-disabled) + _TARGET = $$(if $$(and $$(filter $(SUBTARGET),$$(SUBTARGETS)),$$(filter $(PROFILE),$$(PROFILES))),install,install-disabled) _COMPILE_TARGET = $$(if $(if $(IB),,$(CONFIG_IB)$$(filter $(PROFILE),$$(PROFILES))),compile,compile-disabled) endef @@ -561,8 +563,10 @@ $(DEVICE_DESCRIPTION) endef +DEVICE_PROFILE_CHECK=$(and $(DEVICE_TITLE),$(filter $(SUBTARGET),$(SUBTARGETS))) + define Device/Dump -$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1))))) +$$(eval $$(if $$(DEVICE_PROFILE_CHECK),$$(info $$(call Device/DumpInfo,$(1))))) endef define Device |