diff --git a/make/defaults-module.mk b/make/defaults-module.mk index a4a743fbb..e6a29c44d 100644 --- a/make/defaults-module.mk +++ b/make/defaults-module.mk @@ -1,11 +1,13 @@ # A bit of sed fun to ensure MAKE_DIR does not end with a '/' # This is not a problem, but it makes the output nicer -MAKE_DIR := $(shell echo $(dir $(lastword $(MAKEFILE_LIST))) | sed "s|/$$||") +MAKE_DIR := $(shell echo $(dir $(lastword $(MAKEFILE_LIST))) | perl -pe "s|/$$||") ifneq ($(.SHELLSTATUS),0) $(error extracting `make` directory based on defaults-module.mk location failed) endif +$(info found MAKE_DIR = $(MAKE_DIR)) + BUILD_DIR ?= build COMPILER ?= gfortran VERSION ?= $(file <$(MAKE_DIR)../data/version_number)