Skip to content

Commit 0632b1c

Browse files
committed
Finalize the GNUmakefile setup
1 parent 5d54703 commit 0632b1c

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

GNUmakefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
M := .cache/.makes
2-
$(shell [ -d $M ] || git clone -q https://github.com/makeplus/makes $M)
1+
M := .cache/makes
2+
M-COMMIT ?= 683675d4c45f90f40215399ebd319805877999c9
3+
$(shell [ -d $M ] || ( \
4+
git clone -q https://github.com/makeplus/makes $M && \
5+
git -C $M reset -q --hard $(M-COMMIT)))
6+
ifneq ($(shell git -C $M rev-parse $(M-COMMIT)),\
7+
$(shell git -C $M rev-parse HEAD))
8+
$(error $M is not at the correct commit: $(M-COMMIT))
9+
endif
10+
311
include $M/init.mk
412
include $M/go.mk
5-
include $M/ys.mk
6-
7-
# Print Makefile targets summary
8-
default::
9-
10-
$(GO-CMDS):: $(GO)
11-
go $@ $A
12-
13-
ys-test: $(YS)
14-
prove -v test/
13+
SHELL-NAME := go-yaml
14+
include $M/shell.mk
1515

1616
distclean:
17-
$(RM) -r .cache
17+
$(RM) -r $(ROOT)/.cache

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ b:
168168
## Testing with `make`
169169

170170
Running `make test` in this directory should just work.
171-
You don't need to have `go` installed and even if you do the Makefile will
171+
You don't need to have `go` installed and even if you do the `GNUmakefile` will
172172
ignore it and setup / cache its own version under `.cache/`.
173173

174174
The only things you need are:
@@ -182,7 +182,9 @@ Some `make` commands are:
182182

183183
* `make test`
184184
* `make test GO-VERSION=1.2.34`
185-
* `make distclean` - Remove `.cache/`
185+
* `make shell` Start a shell with the local `go` environment
186+
* `make shell GO-VERSION=1.2.34`
187+
* `make distclean` - Removes `.cache/`
186188

187189

188190
## License

0 commit comments

Comments
 (0)