summaryrefslogtreecommitdiffstats
path: root/Documentation/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile25
1 files changed, 14 insertions, 11 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 204aeb8e8..5ef7c384e 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -7,29 +7,32 @@
# submitting patches to the user manual, only submit the changes to the .txt
# file - the maintainer will recreate the .html.git file
-DOCNAME = user-manual
-DOCSOURCE = $(DOCNAME).txt
-HTMLDOC = $(DOCNAME).html
+DOCNAMES = user-manual user-manual_es
+
+HTMLDOCS = $(patsubst %,$(OUT)%.html,$(DOCNAMES))
+TEXTDOCS = $(patsubst %,$(OUT)%.text,$(DOCNAMES))
+PDFDOCS = $(patsubst %,$(OUT)%.pdf,$(DOCNAMES))
+
ASCIIDOC = asciidoc
A2X = a2x
BROWSER = firefox
THEME = compact_subsurface
PWD = $(realpath .)
-all: doc $(addprefix $(DOCNAME).,pdf text)
+all: $(HTMLEDOCS) $(TEXTDOCS) $(PDFDOCS)
-doc: $(OUT)$(HTMLDOC)
+doc: $(HTMLDOCS)
-$(OUT)$(DOCNAME).text: $(DOCSOURCE)
+$(OUT)%.text: %.txt
$(A2X) -f text $<
-$(OUT)$(DOCNAME).pdf: $(DOCSOURCE)
- $(A2X) -f pdf $<
+$(OUT)%.pdf: %.txt
+ $(A2X) --dblatex-opts "-P latex.output.revhistory=0" -f pdf $<
-$(OUT)$(HTMLDOC): $(DOCSOURCE)
+$(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 $(OUT)$(HTMLDOC) $< || cp $(HTMLDOC).git $(OUT)$(HTMLDOC)
+ -o $@ $< || cp $@.git $@
# Alternatively::
$(OUT)$(DOCNAME).xhtml: $(DOCSOURCE)
@@ -39,4 +42,4 @@ show: $(HTMLDOC)
$(BROWSER) $<
clean:
- rm -f *~ docbook-xsl.css $(HTMLDOC) $(addprefix $(DOCNAME).,pdf text)
+ rm -f *~ docbook-xsl.css $(HTMLDOCS) $(TEXTDOCS) $(PDFDOCS)