summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b0a5e06
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+all : documentation
+
+documentation : doc/index.html doc.go README.md
+
+cov : all
+ go test -v -coverprofile=coverage && go tool cover -html=coverage -o=coverage.html
+
+check :
+ golint .
+ go vet -all .
+ gofmt -s -l .
+
+README.md : doc/document.md
+ pandoc --read=markdown --write=gfm < $< > $@
+
+doc/index.html : doc/document.md doc/html.txt
+ pandoc --read=markdown --write=html --template=doc/html.txt \
+ --metadata pagetitle="GoFPDF Document Generator" < $< > $@
+
+doc.go : doc/document.md doc/go.awk
+ pandoc --read=markdown --write=plain $< | awk -f doc/go.awk > $@
+ gofmt -s -w $@
+
+build :
+ go build -v
+
+clean :
+ rm -f coverage.html coverage doc/index.html doc.go README.md