diff --git a/Make.inc b/Make.inc index 81ff923156ed8..7846a5f89f2d6 100644 --- a/Make.inc +++ b/Make.inc @@ -96,7 +96,7 @@ ARCH:= ifeq ($(BUILDROOT),) ifeq ("$(origin O)", "command line") BUILDROOT := $(abspath $O) - BUILDDIR := $(abspath $(BUILDROOT)/$(shell $(JULIAHOME)/contrib/relative_path.sh $(JULIAHOME) $(SRCDIR))) + BUILDDIR := $(abspath $(BUILDROOT)/$(shell $(JULIAHOME)/contrib/relative_path.sh $(JULIAHOME) $(abspath $(dir $(lastword $(MAKEFILE_LIST)))))) $(info $(shell printf '\033[32;1mBuilding into $(BUILDROOT)\033[0m')) # use printf to expand the escape sequences else BUILDROOT:=$(JULIAHOME)