forked from uber-go/guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (20 loc) · 649 Bytes
/
Makefile
File metadata and controls
27 lines (20 loc) · 649 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
SHELL = /bin/bash
# Setting GOBIN makes 'go install' put the binary in the bin/ directory.
export GOBIN ?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/bin
STITCHMD = $(GOBIN)/stitchmd
# Keep these options in-sync with .github/workflows/ci.yml.
STITCHMD_ARGS = -o style.md -preface src/preface.txt src/SUMMARY.md
.PHONY: all
all: style.md
.PHONY: lint
lint: $(STITCHMD)
@DIFF=$$($(STITCHMD) -d $(STITCHMD_ARGS)); \
if [[ -n "$$DIFF" ]]; then \
echo "style.md is out of date:"; \
echo "$$DIFF"; \
false; \
fi
style.md: $(STITCHMD) $(wildcard src/*)
$(STITCHMD) $(STITCHMD_ARGS)
$(STITCHMD):
go install go.abhg.dev/stitchmd@latest