summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-04-30 14:32:56 -0400
committerKurt <kurt.w.jung@gmail.com>2019-04-30 14:32:56 -0400
commit88c06828a097914c971a893f0048cd911e9b1a22 (patch)
tree364756465275dca27404b9d424a178b289c3f32e /Makefile
parent04d2090aeec620cca72622aa752cf53aaf0b0fbb (diff)
Use Lua script to generate README, doc.go and index.html rather than autoreadme
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..5a78d8e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,31 @@
+doc : README.md doc.go doc/index.html.ok
+
+test :
+ go test -v
+
+cov :
+ go test -v -coverprofile=coverage && go tool cover -html=coverage -o=coverage.html
+
+check :
+ golint .
+ go vet -all .
+ gofmt -s -l .
+
+%.html.ok : %.html
+ tidy -quiet -output /dev/null $<
+ touch $@
+
+README.md doc.go doc/index.html : document.md
+
+doc/body.md README.md doc.go : document.md
+ lua doc/doc.lua
+ gofmt -s -w doc.go
+
+doc/index.html : doc/hdr.html doc/body.html doc/ftr.html
+ cat doc/hdr.html doc/body.html doc/ftr.html > $@
+
+doc/body.html : doc/body.md
+ markdown -f +links,+image,+smarty,+ext,+divquote -o $@ $<
+
+clean :
+ rm -f coverage.html coverage doc/*.ok doc/body.md README.md doc.go doc/index.html doc/body.html