Skip to content
Snippets Groups Projects
Commit 54fe9d52 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

L2SS-290 Add a check for the LOFAR20_dir environment variable

If the LOFAR20_DIR environment variable is not set, then bail out
with an error message. This reminds the user to source the
lofar20rc.sh file.  It also avoids weird error messages when
trying to run Docker containers without the necessary mount options
set up in our environment variables.
parent 1705ae3b
Branches
Tags
1 merge request!69L2SS-290: Add a check to the Makefile that the lofar20rc.sh file has been sourced
# Before doing anything, make 100% certain that all necessary environment
# variables are set.
ifndef LOFAR20_DIR
# Generate the full path to the lofar20rc.sh file
# for exactly this repository.
LOFAR20RC = $(subst docker-compose,bootstrap/etc/lofar20rc.sh,$(abspath .))
$(error There are essential LOFAR2.0 environment variables missing. You must source the lofar20rc.sh file of this repo first. You can do it like this (paste without quotes): ". $(LOFAR20RC)")
endif
# Set dir of Makefile to a variable to use later # Set dir of Makefile to a variable to use later
MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST))) MAKEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
BASEDIR := $(notdir $(patsubst %/,%,$(dir $(MAKEPATH)))) BASEDIR := $(notdir $(patsubst %/,%,$(dir $(MAKEPATH))))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment