summaryrefslogtreecommitdiffstats
path: root/ReleaseNotes/Makefile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-20 11:37:49 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-20 11:37:49 -0800
commitd3f5222270f3c4c3e90533198b199cbc21fb31c8 (patch)
tree51849e65b5d308a68317952667f79fd043f7b78b /ReleaseNotes/Makefile
parent7ab71604ece9508d3e3818f43b80cddb66a4ca16 (diff)
downloadsubsurface-d3f5222270f3c4c3e90533198b199cbc21fb31c8.tar.gz
Add Makefile to create ReleaseNotes HTML
Add the first couple of entries for the next version of the ReleaseNotes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'ReleaseNotes/Makefile')
-rw-r--r--ReleaseNotes/Makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/ReleaseNotes/Makefile b/ReleaseNotes/Makefile
new file mode 100644
index 000000000..bba376022
--- /dev/null
+++ b/ReleaseNotes/Makefile
@@ -0,0 +1,45 @@
+#
+# in order for "normal" developers not to have to install asciidoc (which
+# brings in a couple hundred MB of dependencies) we now include both the
+# user-manual.txt and a copy of the generated .html file in git
+#
+# in order to avoid unnecessary thrash with minor version differences, when
+# submitting patches to the user manual, only submit the changes to the .txt
+# file - the maintainer will recreate the .html.git file
+
+DOCNAMES = ReleaseNotes
+
+HTMLDOCS = $(patsubst %,$(OUT)%.html,$(DOCNAMES))
+TEXTDOCS = $(patsubst %,$(OUT)%.text,$(DOCNAMES))
+PDFDOCS = $(patsubst %,$(OUT)%.pdf,$(DOCNAMES))
+
+ASCIIDOC = asciidoc
+A2X = a2x
+BROWSER = firefox
+THEME = ../Documentation/compact_subsurface
+PWD = $(realpath .)
+
+all: $(HTMLEDOCS) $(TEXTDOCS) $(PDFDOCS)
+
+doc: $(HTMLDOCS)
+
+$(OUT)%.text: %.txt
+ $(A2X) -f text $<
+
+$(OUT)%.pdf: %.txt
+ -$(A2X) --dblatex-opts "-P latex.output.revhistory=0" -f pdf $<
+
+$(OUT)%.html: %.txt
+ @echo "if asciidoc isn't found the html file included in the sources is copied"
+ $(ASCIIDOC) -a toc -a toclevels=3 -a themedir=$(PWD) -a theme=$(THEME) -a stylesdir=$(PWD) \
+ -o $@ $< || cp $(<:%.txt=%.html.git) $@
+
+# Alternatively::
+$(OUT)$(DOCNAME).xhtml: $(DOCSOURCE)
+ $(A2X) --icons -f xhtml $<
+
+show: $(HTMLDOC)
+ $(BROWSER) $<
+
+clean:
+ rm -f *~ *.xml docbook-xsl.css $(HTMLDOCS) $(TEXTDOCS) $(PDFDOCS)