-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tronje Krop <[email protected]>
- Loading branch information
Showing
5 changed files
with
52 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ export GOPATH ?= $(shell $(GO) env GOPATH) | |
export GOBIN ?= $(GOPATH)/bin | ||
|
||
# Setup go-make version to use desired build and config scripts. | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].107 | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].108 | ||
INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto | ||
# Request targets from go-make targets target. | ||
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.0.107 | ||
0.0.108 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ export GOPATH ?= $(shell $(GO) env GOPATH) | |
export GOBIN ?= $(GOPATH)/bin | ||
|
||
# Setup go-make version to use desired build and config scripts. | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].107 | ||
GOMAKE_DEP ?= github.com/tkrop/[email protected].108 | ||
INSTALL_FLAGS ?= -mod=readonly -buildvcs=auto | ||
# Request targets from go-make targets target. | ||
TARGETS := $(shell command -v $(GOBIN)/go-make >/dev/null || \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,14 +46,14 @@ endif | |
|
||
# System depdendent helper functions. | ||
ifeq ("$(shell uname)","Linux") | ||
MAKESHELL := PATH=$(PATH) /bin/bash | ||
else ifeq ($(shell uname),Darwin) | ||
path-setup = $(shell \ | ||
if [ "$(1)" == "opt" ]; then \ | ||
XPATH="$(shell brew --prefix)/$(1)/$(2)/libexec/gnubin"; \ | ||
else XPATH="$(shell brew --prefix)/$(1)"; fi; \ | ||
test ! -e "$${XPATH}/$(3)" && brew install $(2) >&2; \ | ||
echo -n "$${XPATH}:$(4)") | ||
if [ -n "$(4)" ]; then echo -n "$${XPATH}:$(4)"; \ | ||
else echo -n "$${XPATH}"; fi) | ||
export PATH := $(call path-setup,opt,coreutils,ls,$(PATH)) | ||
export PATH := $(call path-setup,opt,findutils,find,$(PATH)) | ||
export PATH := $(call path-setup,bin,bash,bash,$(PATH)) | ||
|
@@ -62,15 +62,21 @@ else ifeq ($(shell uname),Darwin) | |
export PATH := $(call path-setup,opt,gsed,sed,$(PATH)) | ||
export PATH := $(call path-setup,opt,make,make,$(PATH)) | ||
# Ensure export of path to $(shell ...) in gmake 3.81. | ||
MAKESHELL := PATH=$(PATH) /bin/bash | ||
ifeq (3.81,$(MAKE_VERSION)) | ||
export SHELL := PATH="$(PATH)" $(shell brew --prefix)/bin/bash | ||
else | ||
export SHELL := $(shell brew --prefix)/bin/bash | ||
endif | ||
else | ||
$(call cerror,unsupported operating system [$(shell uname --all)]) | ||
endif | ||
|
||
# Log execution environment for debugging. | ||
$(call cdebug,$(shell uname --all)) | ||
$(call cdebug,using PATH [$${PATH}]) | ||
$(call cdebug,using SHELL [$${SHELL}]) | ||
$(call cdebug,using BASH [$${0} - $${BASH_VERSION}]) | ||
$(call cdebug,using PATH [$(shell echo -n "$${PATH}")]) | ||
$(call cdebug,using AWK [$(shell awk --version | head -n 1)]) | ||
|
||
# Helper function to find and remove source files. | ||
find-all = find $(1) ! -path "./run/*" ! -path "./build/*" \( $(2) \) 2>/dev/null | \ | ||
|
@@ -130,9 +136,11 @@ INSTALL_FLAGS ?= $(strip $(mod-readonly) -buildvcs=auto $(INSTALLFLAGS)) | |
|
||
|
||
# Function to ensure compatibility of gawk and mawk. | ||
ifneq ($(shell echo "false" | \ | ||
awk '{ print gensub("false","true","g") }' 2>/dev/null),true) | ||
awk-gensub := function gensub(r, s, h, t) { \ | ||
awk-gensub = $(shell echo "false" | \ | ||
awk '{ print gensub("false","true","g") }' 2>/dev/null) | ||
$(call cdebug,using GENSUB [$(awk-gensub)]) | ||
ifneq ($(awk-gensub),true) | ||
awk-gensub = function gensub(r, s, h, t) { \ | ||
if (t == 0) { t = $$0 } \ | ||
if (h ~ "^[gG]") { gsub(r, s, t) } \ | ||
else if (int(h) != 0) { \ | ||
|
@@ -145,7 +153,7 @@ ifneq ($(shell echo "false" | \ | |
return t \ | ||
} | ||
else | ||
awk-gensub := | ||
awk-gensub = | ||
endif | ||
|
||
|
||
|
@@ -240,7 +248,7 @@ go-pkg = $(shell awk -v mode="$(2)" -v filter="$(3)" \ | |
|
||
|
||
# Setup go-make to use desired build and config scripts. | ||
GOMAKE_DEP := github.com/tkrop/[email protected].107 | ||
GOMAKE_DEP := github.com/tkrop/[email protected].108 | ||
GOMAKE_MAKEFILE := $(realpath $(firstword $(MAKEFILE_LIST))) | ||
GOMAKE_MAKEFILES := $(GOMAKE_MAKEFILE) \ | ||
$(wildcard Makefile.vars) $(wildcard Makefile.ext) | ||
|