2017-10-22 08:07:36 +00:00
|
|
|
# Build doc.go from template and snippets.
|
|
|
|
|
|
|
|
SHELL=/bin/bash
|
|
|
|
|
2018-01-23 18:40:42 +00:00
|
|
|
../doc.go: build doc-snippets.go doc.template snipdoc.awk
|
2017-10-22 08:07:36 +00:00
|
|
|
@tmp=$$(mktemp) && \
|
|
|
|
awk -f snipdoc.awk doc-snippets.go doc.template > $$tmp && \
|
2018-01-23 18:40:42 +00:00
|
|
|
chmod +w $@ && \
|
|
|
|
mv $$tmp $@ && \
|
|
|
|
chmod -w $@
|
|
|
|
@echo "wrote $@"
|
|
|
|
|
|
|
|
.PHONY: build
|
|
|
|
|
|
|
|
build:
|
|
|
|
go build doc-snippets.go
|