Add explicit blank checks in the build system for user-set but blank variables that must not be blank.

pull/1469/head
Dean Camera 13 years ago
parent 88425d7dab
commit 5af18ba288

@ -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

@ -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

@ -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] :'

@ -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

@ -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))

Loading…
Cancel
Save