Commit e585525e authored by thomas.forbriger's avatar thomas.forbriger

[FIX] (import_Seitosh): set variables in vendor Makefiles

The mechanism in contrib/Makefile_var which was used to set the make variables
expected by the Seitosh vendor code only worked for Makefiles in the next
subdirectory level below contrib. This was due to relative paths used in the
definitions. By passing the relative path of the contrib directory to
Makefile_var in a make variable, allows Makefile_var to the path values
appropriately for any Makefile in any directory, which include Makefile_var
parent addae561
# This is a file for environment variables used in Makefiles in aff fourier stfinv
# this is <Makefile_var>
# ----------------------------------------------------------------------------
#
# Copyright (c) 2015 by Thomas Forbriger (BFO Schiltach)
#
# set variables expected by vendor Makefiles
#
# REVISIONS and CHANGES
# 02/11/2015 V1.0 Thomas Forbriger
#
# ============================================================================
#
# This file is included (via make include statement) by Makefiles in
# aff, fourier, stfinv, and libcseife
#
# 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.
#
# ============================================================================
LOCINCLUDEDIR=../header
# define make functions to test variable settings
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
LOCLIBDIR=../bin
LOCBINDIR=../bin
# check for required variables
$(call CHECKVARS,CONTRIBDIR)
# ----------------------------------------------------------------------------
# set values required by vendor Makefiles
LOCINCLUDEDIR=$(CONTRIBDIR)/header
LOCLIBDIR=$(CONTRIBDIR)/bin
LOCBINDIR=$(CONTRIBDIR)/bin
TF_WWWBASEDIR=$(HOME)/public_html/txt/cxx
......@@ -13,3 +42,5 @@ TF_BROWSER=firefox
ifndef FC
FC=/usr/bin/g77-3.3
endif
# ----- END OF Makefile_var -----
......@@ -47,7 +47,8 @@
#
# ============================================================================
include ../Makefile_var
CONTRIBDIR=..
include $(CONTRIBDIR)/Makefile_var
.PHONY: all
......
*.P
f77common_com.c
f2ctest
f77test
......
......@@ -33,6 +33,8 @@
#
# ============================================================================
#
CONTRIBDIR=../..
include $(CONTRIBDIR)/Makefile_var
CHECKVAR=$(if $($(1)),,$(error ERROR: missing variable $(1)))
CHECKVARS=$(foreach var,$(1),$(call CHECKVAR,$(var)))
......
......@@ -56,7 +56,8 @@
# ============================================================================
#
include ../Makefile_var
CONTRIBDIR=..
include $(CONTRIBDIR)/Makefile_var
.PHONY: all
all: install doc
......
......@@ -44,7 +44,8 @@
# ============================================================================
#
include ../Makefile_var
CONTRIBDIR=..
include $(CONTRIBDIR)/Makefile_var
.PHONY: all
all: install doc
......
......@@ -31,7 +31,8 @@
# ============================================================================
#
include ../Makefile_var
CONTRIBDIR=..
include $(CONTRIBDIR)/Makefile_var
.PHONY: all
all: install doxydoc
......
......@@ -24,6 +24,9 @@
#--------------------------------------------------------
# edit here:
CONTRIBDIR=../../..
include $(CONTRIBDIR)/Makefile_var
CC=gcc
......
......@@ -24,6 +24,9 @@
#--------------------------------------------------------
# edit here:
CONTRIBDIR=../../..
include $(CONTRIBDIR)/Makefile_var
CC=gcc
......
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