Add explicit blank checks in the build system for user-set but blank variables that...
authorDean Camera <dean@fourwalledcubicle.com>
Sun, 3 Jun 2012 12:39:53 +0000 (12:39 +0000)
committerDean Camera <dean@fourwalledcubicle.com>
Sun, 3 Jun 2012 12:39:53 +0000 (12:39 +0000)
LUFA/Build/lufa.avrdude.in
LUFA/Build/lufa.build.in
LUFA/Build/lufa.dfu.in
LUFA/Build/lufa.doxygen.in
LUFA/Build/lufa.sources.in

index 52cb44b..a0bef19 100644 (file)
@@ -39,8 +39,15 @@ LUFA_BUILD_OPTIONAL_VARS  += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
-MCU                ?= $(error Makefile MCU value not set.)\r
-TARGET             ?= $(error Makefile TARGET value not set.)\r
+MCU                ?= $(error Makefile MCU value not set)\r
+TARGET             ?= $(error Makefile TARGET value not set)\r
+\r
+ifeq ($(MCU),)\r
+   $(error Makefile MCU option cannot be blank)\r
+endif\r
+ifeq ($(TARGET),)\r
+   $(error Makefile TARGET option cannot be blank)\r
+endif\r
 \r
 # Default values of optionally user-supplied variables\r
 AVRDUDE_PROGRAMMER ?= jtagicemkii\r
 \r
 # Default values of optionally user-supplied variables\r
 AVRDUDE_PROGRAMMER ?= jtagicemkii\r
index a8569a6..115763a 100644 (file)
@@ -54,12 +54,25 @@ LUFA_BUILD_OPTIONAL_VARS  += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
-MCU            ?= $(error Makefile MCU value not set.)\r
-TARGET         ?= $(error Makefile TARGET value not set.)\r
-ARCH           ?= $(error Makefile ARCH value not set.)\r
-SRC            ?= $(error Makefile SRC value not set.)\r
-F_USB          ?= $(error Makefile F_USB value not set.)\r
-LUFA_PATH      ?= $(error Makefile LUFA_PATH value not set.)\r
+MCU            ?= $(error Makefile MCU value not set)\r
+TARGET         ?= $(error Makefile TARGET value not set)\r
+ARCH           ?= $(error Makefile ARCH value not set)\r
+SRC            ?= $(error Makefile SRC value not set)\r
+F_USB          ?= $(error Makefile F_USB value not set)\r
+LUFA_PATH      ?= $(error Makefile LUFA_PATH value not set)\r
+\r
+ifeq ($(MCU),)\r
+   $(error Makefile MCU option cannot be blank)\r
+endif\r
+ifeq ($(TARGET),)\r
+   $(error Makefile TARGET option cannot be blank)\r
+endif\r
+ifeq ($(ARCH),)\r
+   $(error Makefile ARCH option cannot be blank)\r
+endif\r
+ifeq ($(F_USB),)\r
+   $(error Makefile F_USB option cannot be blank)\r
+endif\r
 \r
 # Default values of optionally user-supplied variables\r
 BOARD          ?= NONE\r
 \r
 # Default values of optionally user-supplied variables\r
 BOARD          ?= NONE\r
@@ -80,7 +93,7 @@ else ifeq ($(ARCH), XMEGA)
 else ifeq ($(ARCH), UC3)\r
    CROSS       := avr32-\r
 else\r
 else ifeq ($(ARCH), UC3)\r
    CROSS       := avr32-\r
 else\r
-    $(error Unsupported architecture.)\r
+    $(error Unsupported architecture "$(ARCH)".)\r
 endif\r
 \r
 # Output Messages\r
 endif\r
 \r
 # Output Messages\r
index 91922d0..33b5b7d 100644 (file)
@@ -37,8 +37,15 @@ LUFA_BUILD_OPTIONAL_VARS  +=
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
-MCU            ?= $(error Makefile MCU value not set.)\r
-TARGET         ?= $(error Makefile TARGET value not set.)\r
+MCU            ?= $(error Makefile MCU value not set)\r
+TARGET         ?= $(error Makefile TARGET value not set)\r
+\r
+ifeq ($(MCU),)\r
+   $(error Makefile MCU option cannot be blank)\r
+endif\r
+ifeq ($(TARGET),)\r
+   $(error Makefile TARGET option cannot be blank)\r
+endif\r
 \r
 # Output Messages\r
 MSG_COPY_CMD   := ' [CP]      :'\r
 \r
 # Output Messages\r
 MSG_COPY_CMD   := ' [CP]      :'\r
index 0a6ad6e..1a5ede8 100644 (file)
@@ -36,7 +36,7 @@ LUFA_BUILD_OPTIONAL_VARS  += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRI
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
-LUFA_PATH               ?= $(error Makefile LUFA_PATH value not set.)\r
+LUFA_PATH               ?= $(error Makefile LUFA_PATH value not set)\r
 \r
 # Default values of optionally user-supplied variables\r
 DOXYGEN_CONF            ?= Doxygen.conf\r
 \r
 # Default values of optionally user-supplied variables\r
 DOXYGEN_CONF            ?= Doxygen.conf\r
index c189e79..47cda0c 100644 (file)
@@ -36,8 +36,12 @@ LUFA_BUILD_OPTIONAL_VARS  +=
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
 # -----------------------------------------------------------------------------\r
 \r
 # Sanity-check values of mandatory user-supplied variables\r
-ARCH           ?= $(error Makefile ARCH value not set.)\r
-LUFA_PATH      ?= $(error Makefile LUFA_PATH value not set.)\r
+ARCH           ?= $(error Makefile ARCH value not set)\r
+LUFA_PATH      ?= $(error Makefile LUFA_PATH value not set)\r
+\r
+ifeq ($(ARCH),)\r
+   $(error Makefile ARCH option cannot be blank)\r
+endif\r
 \r
 # Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles\r
 LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))\r
 \r
 # Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles\r
 LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))\r