diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-10 18:19:59 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-01-10 18:19:59 +0000 |
commit | a9d45da16cfefc3ef1323d49468c417bb2e9cf33 (patch) | |
tree | 48343793f0a2112e6e52952992073f7cedad7ccc | |
parent | 1f07007293c2a98abd721bf6bbe112c5cae71525 (diff) | |
download | upstream-a9d45da16cfefc3ef1323d49468c417bb2e9cf33.tar.gz upstream-a9d45da16cfefc3ef1323d49468c417bb2e9cf33.tar.bz2 upstream-a9d45da16cfefc3ef1323d49468c417bb2e9cf33.zip |
imagebuilder: fail with error if the passed profile name does not exist
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43916 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/imagebuilder/files/Makefile | 8 |
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)") \ |