-
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: tkrop <[email protected]>
- Loading branch information
Tronje Krop
committed
Dec 21, 2023
1 parent
11b3aea
commit a9c1d57
Showing
6 changed files
with
15 additions
and
238 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,32 +1,21 @@ | ||
SHELL := /bin/bash | ||
|
||
GOBIN ?= $(shell go env GOPATH)/bin | ||
GOMAKE ?= github.com/tkrop/go-make@latest | ||
TARGETS := $(shell command -v go-make >/dev/null || \ | ||
go install $(GOMAKE) && go-make targets) | ||
|
||
|
||
# Include custom variables to modify behavior. | ||
ifneq ("$(wildcard Makefile.vars)","") | ||
include Makefile.vars | ||
else | ||
$(warning warning: please customize variables in Makefile.vars) | ||
endif | ||
|
||
GOBIN ?= $(shell go env GOPATH)/bin | ||
GOMAKE ?= github.com/tkrop/[email protected] | ||
TARGETS := $(shell command -v go-make >/dev/null || \ | ||
go install $(GOMAKE) && go-make targets) | ||
|
||
# Include standard targets from go-make providing group targets as well as | ||
# single target targets. The group target is used to delegate the remaining | ||
# request targets, while the single target can be used to define the | ||
# precondition of custom target. | ||
.PHONY: $(TARGETS) $(addprefix target/,$(TARGETS)) | ||
$(eval $(lastwords $(MAKECMDGOALS)):;@:) | ||
$(firstword $(MAKECMDGOALS)): | ||
$(GOBIN)/go-make $(MAKEFLAGS) $(MAKECMDGOALS); | ||
$(addprefix target/,$(TARGETS)): target/%: | ||
$(GOBIN)/go-make $(MAKEFLAGS) $*; | ||
|
||
# Declare all targets phony to make them available for auto-completion. | ||
.PHONY: $(TARGETS) | ||
|
||
# Include custom targets to extend scripts. | ||
ifneq ("$(wildcard Makefile.ext)","") | ||
include Makefile.ext | ||
endif | ||
# Delegate all targets to go-make in one call. | ||
# TODO: consider solution that does not delegate local goals. | ||
$(firstword $(MAKECMDGOALS) all):: | ||
$(GOBIN)/go-make $(MAKEFLAGS) $(MAKECMDGOALS); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.1 |
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