diff --git a/Makefile b/Makefile index a93930e9b..cc1476d4b 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,11 @@ cmake-build: $(BUILDDIR)/Makefile $(ECHO) "Building…" $(MAKE) -C $(BUILDDIR) +# Run CMake with CMAKE_ARGS defined on command line ("make CMAKE_ARGS=…"). +ifeq ($(origin CMAKE_ARGS),command line) +.PHONY: $(BUILDDIR)/Makefile +endif + $(BUILDDIR)/Makefile: $(ECHO) "Creating build directory and running cmake in it. You can also run CMake directly, if you want." $(ECHO)