Use correct, platform-agnostic invocation of cmake in BSDmakefile

cmake can (and should) be used to invoke the build/install command,
instead of directly calling `ninja` or `make`, via the `--build DIR
[--target TARGET]` syntax.
This commit is contained in:
Mahmoud Al-Qudsi 2018-03-10 11:37:50 -06:00
parent fbed821a5b
commit 7bfcccf701

View file

@ -13,15 +13,13 @@ PREFIX?=/usr/local
.if $(GENERATOR) == "Ninja"
BUILDFILE=build/build.ninja
BUILDCMD=ninja
.else
BUILDFILE=build/Makefile
BUILDCMD=make
.endif
.DEFAULT: build/fish
build/fish: build/$(BUILDFILE)
cd build; $(BUILDCMD)
cmake --build build
build:
mkdir -p build
@ -31,7 +29,7 @@ build/$(BUILDFILE): build
.PHONY: install
install: build/fish
cd build; $(BUILDCMD) install
cmake --build build --target install
.PHONY: clean
clean: