swupdate: provide sensible error message if no config file is specified
authorPeter Korsgaard <peter@korsgaard.com>
Sat, 3 Oct 2015 15:06:46 +0000 (17:06 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 3 Oct 2015 15:06:46 +0000 (17:06 +0200)
Similar to how we do it for the other kconfig packages.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/swupdate/swupdate.mk

index 86bbf14314036880facd8568206084388b405a5a..9338fc83cde59c887128b80f5584f0a5c9349b7c 100644 (file)
@@ -103,4 +103,12 @@ define SWUPDATE_INSTALL_TARGET_CMDS
                cp -dpf $(@D)/www/* $(TARGET_DIR)/var/www/swupdate)
 endef
 
+# Checks to give errors that the user can understand
+# Must be before we call to kconfig-package
+ifeq ($(BR2_PACKAGE_SWUPDATE)$(BR_BUILDING),yy)
+ifeq ($(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG)),)
+$(error No Swupdate configuration file specified, check your BR2_PACKAGE_SWUPDATE_CONFIG setting)
+endif
+endif
+
 $(eval $(kconfig-package))