mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
User manual: update Makefile for multi language support
New translations need to be explicitly added to the Makefile Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2f1d7c0bdc
commit
20bbff2773
1 changed files with 14 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue