aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2012-06-03 12:39:53 +0000
committerDean Camera <dean@fourwalledcubicle.com>2012-06-03 12:39:53 +0000
commit5af18ba2883d51c54bad8de23bcea01fb22c4daa (patch)
tree98fce7d63603d35191b69ffad7d0c4fcffe0b6e3
parent88425d7dabd07a712b32995a635a7f883ff5f726 (diff)
downloadlufa-5af18ba2883d51c54bad8de23bcea01fb22c4daa.tar.gz
lufa-5af18ba2883d51c54bad8de23bcea01fb22c4daa.tar.bz2
lufa-5af18ba2883d51c54bad8de23bcea01fb22c4daa.zip
Add explicit blank checks in the build system for user-set but blank variables that must not be blank.
-rw-r--r--LUFA/Build/lufa.avrdude.in11
-rw-r--r--LUFA/Build/lufa.build.in27
-rw-r--r--LUFA/Build/lufa.dfu.in11
-rw-r--r--LUFA/Build/lufa.doxygen.in2
-rw-r--r--LUFA/Build/lufa.sources.in8
5 files changed, 45 insertions, 14 deletions
diff --git a/LUFA/Build/lufa.avrdude.in b/LUFA/Build/lufa.avrdude.in
index 52cb44b8d..a0bef19cc 100644
--- a/LUFA/Build/lufa.avrdude.in
+++ b/LUFA/Build/lufa.avrdude.in
@@ -39,8 +39,15 @@ LUFA_BUILD_OPTIONAL_VARS += AVRDUDE_PROGRAMMER AVRDUDE_PORT AVRDUDE_FLAGS
# -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables
-MCU ?= $(error Makefile MCU value not set.)
-TARGET ?= $(error Makefile TARGET value not set.)
+MCU ?= $(error Makefile MCU value not set)
+TARGET ?= $(error Makefile TARGET value not set)
+
+ifeq ($(MCU),)
+ $(error Makefile MCU option cannot be blank)
+endif
+ifeq ($(TARGET),)
+ $(error Makefile TARGET option cannot be blank)
+endif
# Default values of optionally user-supplied variables
AVRDUDE_PROGRAMMER ?= jtagicemkii
diff --git a/LUFA/Build/lufa.build.in b/LUFA/Build/lufa.build.in
index a8569a6ce..115763ab4 100644
--- a/LUFA/Build/lufa.build.in
+++ b/LUFA/Build/lufa.build.in
@@ -54,12 +54,25 @@ LUFA_BUILD_OPTIONAL_VARS += BOARD OPTIMIZATION C_STANDARD CPP_STANDARD F_CPU C_
# -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables
-MCU ?= $(error Makefile MCU value not set.)
-TARGET ?= $(error Makefile TARGET value not set.)
-ARCH ?= $(error Makefile ARCH value not set.)
-SRC ?= $(error Makefile SRC value not set.)
-F_USB ?= $(error Makefile F_USB value not set.)
-LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.)
+MCU ?= $(error Makefile MCU value not set)
+TARGET ?= $(error Makefile TARGET value not set)
+ARCH ?= $(error Makefile ARCH value not set)
+SRC ?= $(error Makefile SRC value not set)
+F_USB ?= $(error Makefile F_USB value not set)
+LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
+
+ifeq ($(MCU),)
+ $(error Makefile MCU option cannot be blank)
+endif
+ifeq ($(TARGET),)
+ $(error Makefile TARGET option cannot be blank)
+endif
+ifeq ($(ARCH),)
+ $(error Makefile ARCH option cannot be blank)
+endif
+ifeq ($(F_USB),)
+ $(error Makefile F_USB option cannot be blank)
+endif
# Default values of optionally user-supplied variables
BOARD ?= NONE
@@ -80,7 +93,7 @@ else ifeq ($(ARCH), XMEGA)
else ifeq ($(ARCH), UC3)
CROSS := avr32-
else
- $(error Unsupported architecture.)
+ $(error Unsupported architecture "$(ARCH)".)
endif
# Output Messages
diff --git a/LUFA/Build/lufa.dfu.in b/LUFA/Build/lufa.dfu.in
index 91922d0cb..33b5b7dc0 100644
--- a/LUFA/Build/lufa.dfu.in
+++ b/LUFA/Build/lufa.dfu.in
@@ -37,8 +37,15 @@ LUFA_BUILD_OPTIONAL_VARS +=
# -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables
-MCU ?= $(error Makefile MCU value not set.)
-TARGET ?= $(error Makefile TARGET value not set.)
+MCU ?= $(error Makefile MCU value not set)
+TARGET ?= $(error Makefile TARGET value not set)
+
+ifeq ($(MCU),)
+ $(error Makefile MCU option cannot be blank)
+endif
+ifeq ($(TARGET),)
+ $(error Makefile TARGET option cannot be blank)
+endif
# Output Messages
MSG_COPY_CMD := ' [CP] :'
diff --git a/LUFA/Build/lufa.doxygen.in b/LUFA/Build/lufa.doxygen.in
index 0a6ad6e25..1a5ede8e9 100644
--- a/LUFA/Build/lufa.doxygen.in
+++ b/LUFA/Build/lufa.doxygen.in
@@ -36,7 +36,7 @@ LUFA_BUILD_OPTIONAL_VARS += DOXYGEN_CONF DOXYGEN_FAIL_ON_WARNING DOXYGEN_OVERRI
# -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables
-LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.)
+LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
# Default values of optionally user-supplied variables
DOXYGEN_CONF ?= Doxygen.conf
diff --git a/LUFA/Build/lufa.sources.in b/LUFA/Build/lufa.sources.in
index c189e792f..47cda0c99 100644
--- a/LUFA/Build/lufa.sources.in
+++ b/LUFA/Build/lufa.sources.in
@@ -36,8 +36,12 @@ LUFA_BUILD_OPTIONAL_VARS +=
# -----------------------------------------------------------------------------
# Sanity-check values of mandatory user-supplied variables
-ARCH ?= $(error Makefile ARCH value not set.)
-LUFA_PATH ?= $(error Makefile LUFA_PATH value not set.)
+ARCH ?= $(error Makefile ARCH value not set)
+LUFA_PATH ?= $(error Makefile LUFA_PATH value not set)
+
+ifeq ($(ARCH),)
+ $(error Makefile ARCH option cannot be blank)
+endif
# Allow LUFA_ROOT_PATH to be overridden elsewhere to support legacy LUFA makefiles
LUFA_ROOT_PATH ?= $(patsubst %/,%,$(LUFA_PATH))