mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
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:
parent
22a4ead36e
commit
cc35241a6e
1 changed files with 15 additions and 7 deletions
22
BSDmakefile
22
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
|
||||
|
|
Loading…
Reference in a new issue