mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-24 18:20:38 +00:00
make: Add CheckCommandLineOverrides to my little Makefile library, a routine for
validating the variables set on the make command line. llvm-svn: 116517
This commit is contained in:
parent
49f72b635e
commit
dde0471072
@ -88,6 +88,17 @@ AssertEqual = \
|
||||
$(if $(call streq,$($(1)),$(2)),,\
|
||||
$(error Assertion failed: $(1): $(value $(1)) - $($(1)) != $(2)))
|
||||
|
||||
# Function: CheckCommandLineOverrides list
|
||||
#
|
||||
# Check that all command line variables are in the given list. This routine is
|
||||
# useful for validating that users aren't trying to override something which
|
||||
# will not work.
|
||||
CheckCommandLineOverrides = \
|
||||
$(foreach arg,$(MAKEOVERRIDES),\
|
||||
$(call Set,varname,$(firstword $(subst =, ,$(arg)))) \
|
||||
$(if $(call contains,$(1),$(varname)),,\
|
||||
$(error "Invalid command line override: $(1) $(varname) (not supported)")))
|
||||
|
||||
###
|
||||
# Clean up make behavior
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user