Skip to content

Commit

Permalink
Automatically pass build through to gmake on BSD
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mqudsi committed Sep 24, 2017
1 parent 22a4ead commit cc35241
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions BSDmakefile
@@ -1,9 +1,17 @@
warn:
@echo "Error: BSD Make not supported"
@echo "Please use GNU Make (gmake) to build fish. Refer to README.md for detailed build instructions."
JARG =
GMAKE = "gmake"
.if "$(.MAKE.JOBS)" != ""
JARG = -j$(.MAKE.JOBS)
.endif

all: warn
install: warn
test: warn
#by default bmake will cd into ./obj first
.OBJDIR: ./

.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

0 comments on commit cc35241

Please sign in to comment.