Skip to content

Commit 8aada18

Browse files
update BSDmakefile to latest version from upstream (#24063)
from https://github.com/neosmart/gmake-proxy
1 parent b43ad51 commit 8aada18

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

BSDmakefile

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# GNU makefile proxy script for BSD make
2+
#
23
# Written and maintained by Mahmoud Al-Qudsi <[email protected]>
3-
# Copyright NeoSmart Technologies <https://neosmart.net/> 2014-2018
4+
# Copyright NeoSmart Technologies <https://neosmart.net/> 2014-2019
45
# Obtain updates from <https://github.com/neosmart/gmake-proxy>
56
#
67
# Redistribution and use in source and binary forms, with or without
@@ -26,26 +27,32 @@
2627

2728
JARG =
2829
GMAKE = "gmake"
29-
#When gmake is called from another make instance, -w is automatically added
30-
#which causes extraneous messages about directory changes to be emitted.
31-
#--no-print-directory silences these messages.
30+
# When gmake is called from another make instance, -w is automatically added
31+
# which causes extraneous messages about directory changes to be emitted.
32+
# Running with --no-print-directory silences these messages.
3233
GARGS = "--no-print-directory"
3334

3435
.if "$(.MAKE.JOBS)" != ""
35-
JARG = -j$(.MAKE.JOBS)
36+
JARG = -j$(.MAKE.JOBS)
3637
.endif
3738

38-
#by default bmake will cd into ./obj first
39+
# bmake prefers out-of-source builds and tries to cd into ./obj (among others)
40+
# where possible. GNU Make doesn't, so override that value.
3941
.OBJDIR: ./
4042

43+
# The GNU convention is to use the lowercased `prefix` variable/macro to
44+
# specify the installation directory. Humor them.
45+
GPREFIX = ""
46+
.if defined(PREFIX) && ! defined(prefix)
47+
GPREFIX = 'prefix = "$(PREFIX)"'
48+
.endif
49+
50+
.BEGIN: .SILENT
51+
which $(GMAKE) || printf "Error: GNU Make is required!\n\n" 1>&2 && false
52+
4153
.PHONY: FRC
4254
$(.TARGETS): FRC
43-
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
55+
$(GMAKE) $(GPREFIX) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
4456

4557
.DONE .DEFAULT: .SILENT
46-
$(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)
47-
48-
.ERROR: .SILENT
49-
if ! which $(GMAKE) > /dev/null; then \
50-
echo "GNU Make is required!"; \
51-
fi
58+
$(GMAKE) $(GPREFIX) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG)

0 commit comments

Comments
 (0)