From 1ca3fff86c3695fb0e0b7417a51610b446f7e3ac Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 23 Oct 2017 22:24:58 +0200 Subject: [PATCH] Makefile: fix invoking cmake in the build dir (#2078) `"(@D)"` is the dir of the target, i.e. "build" for BUILDDIR=build, which results in calling `cmake build ..`. cmake appears to ignore the "build" in this case, and works the same way without it. Instead of ".." this patch uses `$(CURDIR)`, which is the absolute path to the source dir, which is relevant in case `BUILDDIR` is not just a direct subdirectory. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c4d5af95..d308d2b5 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ $(BUILDDIR)/Makefile: $(ECHO) mkdir -p $(BUILDDIR) $(ECHO) "Running cmake…" - cd $(BUILDDIR) && cmake $(CMAKE_ARGS) "$(@D)" .. + cd $(BUILDDIR) && cmake $(CMAKE_ARGS) "$(CURDIR)" cmake-build: $(BUILDDIR)/Makefile $(ECHO) "Building…"