mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 676dca561a2c
This commit is contained in:
parent
1b712308c6
commit
0f7a81f41f
@ -34,17 +34,3 @@ argv +=)
|
||||
## $(call banner,ref) ; ref=foo bar tans
|
||||
## getarglist() would be a more accurate name but is longer to type
|
||||
getargv = $(if $(call isvar,$(1)),$($(1)),$(argv))
|
||||
|
||||
## http://www.gnu.org/software/make/manual/make.html#Call-Function
|
||||
## Usage: o = $(call map,origin,o map $(MAKE))
|
||||
map = $(foreach val,$(2),$(call $(1),$(val)))
|
||||
|
||||
|
||||
# Usage: $(call checkIfEmpty,[error|warning] foo NULL bar)
|
||||
checkIfEmpty =$(foreach var,$(wordlist 2,100,$(getargv)),$(if $(strip $($(var))),$(NOP),$(call $(1),Variable $(var) does not contain a value)))
|
||||
|
||||
# Usage: $(call errorIfEmpty,foo NULL bar)
|
||||
errorIfEmpty =$(call checkIfEmpty,error $(getargv))
|
||||
warnIfEmpty =$(call checkIfEmpty,warning $(getargv))
|
||||
|
||||
|
||||
|
@ -36,14 +36,6 @@ $(info =========================================================================
|
||||
$(info Running test: $(MAKECMDGOALS): pwd=$(CURDIR))
|
||||
$(info ===========================================================================)
|
||||
|
||||
|
||||
ifdef VERBOSE
|
||||
$(info )
|
||||
$(info ===========================================================================)
|
||||
$(info Running test: istype, getargv)
|
||||
$(info ===========================================================================)
|
||||
endif
|
||||
|
||||
## Silent errors are oh so much fun
|
||||
ifndef istype
|
||||
$(error makeutils.mk was not included)
|
||||
@ -98,32 +90,6 @@ ifneq (arg_list,$(call getargv,arg_ref))
|
||||
$(error getargv(arg_ref)=list, found [$(call getargv,arg_ref)])
|
||||
endif
|
||||
|
||||
|
||||
ifdef MANUAL_TEST
|
||||
# For automated testing a callback is needed that can set an external status
|
||||
# variable that can be tested. Syntax is tricky to get correct functionality.
|
||||
ifdef VERBOSE
|
||||
$(info )
|
||||
$(info ===========================================================================)
|
||||
$(info Running test: checkIfEmpty)
|
||||
$(info ===========================================================================)
|
||||
endif
|
||||
|
||||
#status =
|
||||
#setTRUE =status=true
|
||||
#setFALSE =status=$(NULL)
|
||||
#$(call checkIfEmpty,setFALSE NULL)
|
||||
#$(if $(status),$(error checkIfEmpty(xyz) failed))
|
||||
#$(call checkIfEmpty,setTRUE xyz)
|
||||
#$(if $(status),$(error checkIfEmpty(xyz) failed))
|
||||
xyz=abc
|
||||
$(info STATUS: warnIfEmpty - two vars)
|
||||
$(call warnIfEmpty,foo xyz bar)
|
||||
$(info STATUS: errorIfEmpty - on first var)
|
||||
$(call errorIfEmpty,foo xyz bar)
|
||||
$(error TEST FAILED: processing should not reach this point)
|
||||
endif
|
||||
|
||||
endif # check in MAKECMDGOALS
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user