aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-01-10 18:19:59 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-01-10 18:19:59 +0000
commitdffaf94d442b2a970d169c7de4f47fa2886eb83a (patch)
tree062e56c69f70efe9fb7035c937a3968a22d3f9c2 /target
parent3b21b2ae00c8e354db1789f8be5235a8fcb7a623 (diff)
downloadupstream-dffaf94d442b2a970d169c7de4f47fa2886eb83a.tar.gz
upstream-dffaf94d442b2a970d169c7de4f47fa2886eb83a.tar.bz2
upstream-dffaf94d442b2a970d169c7de4f47fa2886eb83a.zip
imagebuilder: fail with error if the passed profile name does not exist
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> SVN-Revision: 43916
Diffstat (limited to 'target')
-rw-r--r--target/imagebuilder/files/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 8136111b67..f3bfec1e31 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -78,6 +78,7 @@ define Profile
endif
$(1)_NAME:=$(NAME)
$(1)_PACKAGES:=$(PACKAGES)
+ PROFILE_NAMES += $(1)
PROFILE_LIST += \
echo '$(1):'; [ -z '$(NAME)' ] || echo ' $(NAME)'; echo ' Packages: $(PACKAGES)';
endef
@@ -167,6 +168,13 @@ info:
(unset PROFILE FILES PACKAGES MAKEFLAGS; $(MAKE) -s _call_info)
image:
+ifneq ($(PROFILE),)
+ ifeq ($(filter $(PROFILE),$(PROFILE_NAMES)),)
+ @echo 'Profile "$(PROFILE)" does not exist!'
+ @echo 'Use "make info" to get a list of available profile names.'
+ @exit 1
+ endif
+endif
(unset PROFILE FILES PACKAGES MAKEFLAGS; \
$(MAKE) _call_image \
$(if $(PROFILE),USER_PROFILE="$(PROFILE)") \