Automatically pass build through to gmake on BSD

Smarter BSDmakefile that automatically calls gmake to build the targets,
even including `-j` if provided. README.md can be simplified to remove
`gmake` references from build instructions for BSD users.
This commit is contained in:
Mahmoud Al-Qudsi 2017-09-24 15:00:50 -05:00
parent 22a4ead36e
commit cc35241a6e

View file

@ -1,9 +1,17 @@
warn: JARG =
@echo "Error: BSD Make not supported" GMAKE = "gmake"
@echo "Please use GNU Make (gmake) to build fish. Refer to README.md for detailed build instructions." .if "$(.MAKE.JOBS)" != ""
JARG = -j$(.MAKE.JOBS)
.endif
all: warn #by default bmake will cd into ./obj first
install: warn .OBJDIR: ./
test: warn
.DONE .DEFAULT: .SILENT
$(GMAKE) $(.TARGETS:S,.DONE,,) $(JARG)
.ERROR: .SILENT
if ! which $(GMAKE) > /dev/null; then \
echo "GNU Make is required!"; \
fi
.PHONY: warn all install test