summaryrefslogtreecommitdiff
path: root/manual/Makefile
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2014-02-11 00:06:36 +0000
committerLars Wirzenius <liw@liw.fi>2014-02-11 00:06:36 +0000
commit42c06d73df17fbe8d04575ae687d0a561320d94f (patch)
tree1d1b3257d108c31533ed05170aa7b49afdb5e2ee /manual/Makefile
parent7bf9ceb114c03f658f28720ded8472f6774e29c9 (diff)
downloadobnam-42c06d73df17fbe8d04575ae687d0a561320d94f.tar.gz
Add version number to metadata
Automatically from git describe.
Diffstat (limited to 'manual/Makefile')
-rw-r--r--manual/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/manual/Makefile b/manual/Makefile
index d635ebeb..bea7949e 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -1,20 +1,28 @@
+TITLE = Backups with Obnam
+AUTHOR = Lars Wirzenius (liw@liw.fi)
+VERSION = Version $(shell git describe)
+
sources = $(wildcard *.mdwn)
outputs = manual.pdf manual.html
all: $(outputs)
-manual.pdf: Makefile $(sources)
+manual.pdf: Makefile 000.mdwn $(sources)
pandoc --smart --toc --chapters --number-sections \
-o manual.pdf $(sources)
-manual.html: Makefile $(sources)
+manual.html: Makefile 000.mdwn $(sources)
pandoc -H manual.css --smart --toc --chapters --number-sections \
--standalone \
--self-contained \
-o manual.html $(sources)
+000.mdwn:
+ (echo "% $(TITLE)"; echo "% $(AUTHOR)"; echo "% $(VERSION)") \
+ > 000.mdwn
+
clean:
- rm -f $(outputs)
+ rm -f $(outputs) 000.mdwn
publish: $(outputs)
rsync $(outputs) code.liw.fi:code.liw.fi/obnam/manual/.