diff options
author | techknowlogick <techknowlogick@gitea.io> | 2023-04-11 23:42:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 23:42:22 -0400 |
commit | 8aada1849f949d0c7f023f11061cacc957e0df8f (patch) | |
tree | 9e548e54340806916586e1038dfeaf687fa20c68 /BSDmakefile | |
parent | b43ad51a3dd28b747f7135f081d8812dedd89879 (diff) | |
download | gitea-8aada1849f949d0c7f023f11061cacc957e0df8f.tar.gz gitea-8aada1849f949d0c7f023f11061cacc957e0df8f.zip |
update BSDmakefile to latest version from upstream (#24063)
from https://github.com/neosmart/gmake-proxy
Diffstat (limited to 'BSDmakefile')
-rw-r--r-- | BSDmakefile | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/BSDmakefile b/BSDmakefile index 2b4cae678b..13174f8fd2 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -1,6 +1,7 @@ # GNU makefile proxy script for BSD make +# # Written and maintained by Mahmoud Al-Qudsi <mqudsi@neosmart.net> -# Copyright NeoSmart Technologies <https://neosmart.net/> 2014-2018 +# Copyright NeoSmart Technologies <https://neosmart.net/> 2014-2019 # Obtain updates from <https://github.com/neosmart/gmake-proxy> # # Redistribution and use in source and binary forms, with or without @@ -26,26 +27,32 @@ JARG = GMAKE = "gmake" -#When gmake is called from another make instance, -w is automatically added -#which causes extraneous messages about directory changes to be emitted. -#--no-print-directory silences these messages. +# When gmake is called from another make instance, -w is automatically added +# which causes extraneous messages about directory changes to be emitted. +# Running with --no-print-directory silences these messages. GARGS = "--no-print-directory" .if "$(.MAKE.JOBS)" != "" -JARG = -j$(.MAKE.JOBS) + JARG = -j$(.MAKE.JOBS) .endif -#by default bmake will cd into ./obj first +# bmake prefers out-of-source builds and tries to cd into ./obj (among others) +# where possible. GNU Make doesn't, so override that value. .OBJDIR: ./ +# The GNU convention is to use the lowercased `prefix` variable/macro to +# specify the installation directory. Humor them. +GPREFIX = "" +.if defined(PREFIX) && ! defined(prefix) + GPREFIX = 'prefix = "$(PREFIX)"' +.endif + +.BEGIN: .SILENT + which $(GMAKE) || printf "Error: GNU Make is required!\n\n" 1>&2 && false + .PHONY: FRC $(.TARGETS): FRC - $(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG) + $(GMAKE) $(GPREFIX) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG) .DONE .DEFAULT: .SILENT - $(GMAKE) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG) - -.ERROR: .SILENT - if ! which $(GMAKE) > /dev/null; then \ - echo "GNU Make is required!"; \ - fi + $(GMAKE) $(GPREFIX) $(GARGS) $(.TARGETS:S,.DONE,,) $(JARG) |