aboutsummaryrefslogtreecommitdiff
path: root/mk/docs.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/docs.mk')
-rw-r--r--mk/docs.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/mk/docs.mk b/mk/docs.mk
new file mode 100644
index 00000000..ba00f57c
--- /dev/null
+++ b/mk/docs.mk
@@ -0,0 +1,16 @@
+######################################################################
+# Doc variables and rules
+######################################################################
+
+doc/version.texi: $(MKFILES) rust.texi
+ (cd $(S) && git log -1 \
+ --pretty=format:'@macro gitversion%n%h %ci%n@end macro%n') >$@
+
+doc/%.pdf: %.texi doc/version.texi
+ texi2pdf -I doc -o $@ --clean $<
+
+doc/%.html: %.texi doc/version.texi
+ makeinfo -I doc --html --ifhtml --force --no-split --output=$@ $<
+
+docsnap: doc/rust.pdf
+ mv $< doc/rust-$(shell date +"%Y-%m-%d")-snap.pdf