diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-07-21 13:41:20 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-21 13:41:20 +0200 |
commit | 8265fdcc4dda2554d4f7774e53020136079639b2 (patch) | |
tree | c7eaa39f84f1be818b845debb618f9a8fbeaee70 | |
parent | ed90d50bc4cbbcf615f880c1799814ccf743de8c (diff) | |
download | upstream-8265fdcc4dda2554d4f7774e53020136079639b2.tar.gz upstream-8265fdcc4dda2554d4f7774e53020136079639b2.tar.bz2 upstream-8265fdcc4dda2554d4f7774e53020136079639b2.zip |
imagebuilder: strip DEVICE_ prefix from profiles (FS#55)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r-- | include/image.mk | 2 | ||||
-rw-r--r-- | target/imagebuilder/files/Makefile | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/image.mk b/include/image.mk index 43c144ad34..47cb1a58a9 100644 --- a/include/image.mk +++ b/include/image.mk @@ -327,7 +327,7 @@ define Device/Export endef ifdef IB - DEVICE_CHECK_PROFILE = $(filter $(1),$(PROFILE)) + DEVICE_CHECK_PROFILE = $(filter $(1),DEVICE_$(PROFILE) $(PROFILE)) else DEVICE_CHECK_PROFILE = $(CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_$(1)) endif diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 64f21b8871..4ae0297355 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -77,7 +77,7 @@ include $(INCLUDE_DIR)/target.mk USER_PROFILE ?= $(firstword $(PROFILE_NAMES)) PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \ - echo '$(p):'; $(if $($(p)_NAME),echo ' $($(p)_NAME)'; ) echo ' Packages: $($(p)_PACKAGES)'; \ + echo '$(patsubst DEVICE_%,%,$(p)):'; $(if $($(p)_NAME),echo ' $($(p)_NAME)'; ) echo ' Packages: $($(p)_PACKAGES)'; \ ) .profiles.mk: .targetinfo @@ -180,9 +180,11 @@ clean: info: (unset PROFILE FILES PACKAGES MAKEFLAGS; $(MAKE) -s _call_info) +PROFILE_FILTER = $(filter DEVICE_$(PROFILE) $(PROFILE),$(PROFILE_NAMES)) + image: ifneq ($(PROFILE),) - ifeq ($(filter $(PROFILE),$(PROFILE_NAMES)),) + ifeq ($(PROFILE_FILTER),) @echo 'Profile "$(PROFILE)" does not exist!' @echo 'Use "make info" to get a list of available profile names.' @exit 1 @@ -190,7 +192,7 @@ ifneq ($(PROFILE),) endif (unset PROFILE FILES PACKAGES MAKEFLAGS; \ $(MAKE) _call_image \ - $(if $(PROFILE),USER_PROFILE="$(PROFILE)") \ + $(if $(PROFILE),USER_PROFILE="$(PROFILE_FILTER)") \ $(if $(FILES),USER_FILES="$(FILES)") \ $(if $(PACKAGES),USER_PACKAGES="$(PACKAGES)") \ $(if $(BIN_DIR),BIN_DIR="$(BIN_DIR)")) |