Commit cd596b6b authored by thomas.forbriger's avatar thomas.forbriger
Browse files

[TASK] (import_Seitosh): read CONTRIBDIR from automatic variable

Since vendor Makefiles make use of special GNU make features, we can safely
rely on GNU make being in operation. GNU make provides the variable
MAKEFILE_LIST from which the relative path can be extracted at which
Makefile_var was found. This exactly is the path of the contrib directory,
such that the user (calling Makefile) needs not set this variable.

Currently the calling Makefiles still set a variable CONTRIBDIR which then
simply is overwritten in Makefile_var. Such the setting of CONTRIBDIR is
unnecessarily doubled.
parent e585525e
......@@ -15,17 +15,10 @@
# Its purpose is to set make variables which are expected by vendor Makefiles.
# The current file itself expects a variable CONTRIBDIR, which defines the
# directory where Makefile_var is located.
# ============================================================================
# define make functions to test variable settings
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
# check for required variables
# extract relative path to contrib with respect of including Makefile
CONTRIBDIR:=$(dir $(lastword $(MAKEFILE_LIST)))
# ----------------------------------------------------------------------------
# set values required by vendor Makefiles
Markdown is supported
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