diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2016-04-05 21:10:07 +1000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2016-04-05 21:10:07 +1000 |
commit | 3126cbbf96a24afd447ece00248e5ece39dd088a (patch) | |
tree | 1acda324a1334c208f775b1c9e22e934ef7c64f5 /LUFA/Build/DMBS/DMBS/core.mk | |
parent | 75b68126d01306347626215ec8ad1537c903e4cd (diff) | |
download | lufa-3126cbbf96a24afd447ece00248e5ece39dd088a.tar.gz lufa-3126cbbf96a24afd447ece00248e5ece39dd088a.tar.bz2 lufa-3126cbbf96a24afd447ece00248e5ece39dd088a.zip |
Update to DMBS release-20160403 release.
Diffstat (limited to 'LUFA/Build/DMBS/DMBS/core.mk')
-rw-r--r-- | LUFA/Build/DMBS/DMBS/core.mk | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/LUFA/Build/DMBS/DMBS/core.mk b/LUFA/Build/DMBS/DMBS/core.mk index 913731e69..7fdb7f229 100644 --- a/LUFA/Build/DMBS/DMBS/core.mk +++ b/LUFA/Build/DMBS/DMBS/core.mk @@ -11,12 +11,20 @@ DMBS_BUILD_TARGETS += help list_targets list_modules list_mandatory list DMBS_BUILD_MANDATORY_VARS += DMBS_BUILD_OPTIONAL_VARS += DMBS_BUILD_PROVIDED_VARS += DMBS_VERSION -DMBS_BUILD_PROVIDED_MACROS += +DMBS_BUILD_PROVIDED_MACROS += DMBS_CHECK_VERSION ERROR_IF_UNSET ERROR_IF_EMPTY ERROR_IF_NONBOOL SHELL = /bin/sh # Current DMBS release version -DMBS_VERSION = 0.4 +DMBS_VERSION := 20160403 + +# Macro to check the DMBS version, aborts if the given DMBS version is below the current version +DMBS_CHECK_VERSION ?= $(if $(filter-out 0, $(shell test $(DMBS_VERSION) -lt $(1); echo $$?)), , $(error DMBS version $(1) or newer required, current version is $(DMBS_VERSION))) + +# Macros to use in other modules to check various conditions +ERROR_IF_UNSET ?= $(if $(filter undefined, $(origin $(strip $(1)))), $(error Makefile $(strip $(1)) value not set)) +ERROR_IF_EMPTY ?= $(if $(strip $($(strip $(1)))), , $(error Makefile $(strip $(1)) option cannot be blank)) +ERROR_IF_NONBOOL ?= $(if $(filter Y N, $($(strip $(1)))), , $(error Makefile $(strip $(1)) option must be Y or N)) # Converts a given input to a printable output using "(None)" if no items are in the list CONVERT_TO_PRINTABLE = $(if $(strip $(1)), $(1), (None)) |