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 @@
#
# ============================================================================
#
# This is the sequence of standard targets
# ----------------------------------------
# created by the template generator "new"
all:
......@@ -30,14 +33,24 @@ clean: ;
-/bin/rm -vf flist
# ============================================================================
# a variable definition to check variable settings
# ------------------------------------------------
ab=k
beb=ja
CHECKVAR=$(if $($(1)),,$(error error: missing variable $(1)))
$(call CHECKVAR,ab)
$(call CHECKVAR,beb)
REQUIRED=ab beb kl
kl=o
$(foreach var,$(REQUIRED),$(call CHECKVAR,$(var)))
# if you want to check whether variable TF_PUBLICATIONPATH is non-empty,
# insert line
#
## $(call CHECKVAR,TF_PUBLICATIONPATH)
#
# in your Makefile
#
# 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 -----
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