Commit 8d94fad7 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

CHECKVAR and CHECKVARS defined

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/libenv201008
SVN Revision: 3134
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent e8d805e1
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
# #
# ============================================================================ # ============================================================================
# #
# This is the sequence of standard targets
# ----------------------------------------
# created by the template generator "new"
all: all:
...@@ -30,14 +33,24 @@ clean: ; ...@@ -30,14 +33,24 @@ clean: ;
-/bin/rm -vf flist -/bin/rm -vf flist
# ============================================================================ # ============================================================================
# a variable definition to check variable settings
# ------------------------------------------------
ab=k # if you want to check whether variable TF_PUBLICATIONPATH is non-empty,
beb=ja # insert line
CHECKVAR=$(if $($(1)),,$(error error: missing variable $(1))) #
$(call CHECKVAR,ab) ## $(call CHECKVAR,TF_PUBLICATIONPATH)
$(call CHECKVAR,beb) #
REQUIRED=ab beb kl # in your Makefile
kl=o #
$(foreach var,$(REQUIRED),$(call CHECKVAR,$(var))) # if you want to check whether variable AVAR, BVAR, and CVAR are non-empty,
# insert line
#
## $(call CHECKVARS,AVAR BVAR CVAR)
#
# in your Makefile
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
# ----- END OF Makefile.buildingblocks ----- # ----- END OF Makefile.buildingblocks -----
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment