mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +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.
(cherry picked from commit cc35241a6e
)
This commit is contained in:
parent
92a6906e6a
commit
19b89983a1
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