mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 22:53:23 +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
|
# submitting patches to the user manual, only submit the changes to the .txt
|
||||||
# file - the maintainer will recreate the .html.git file
|
# file - the maintainer will recreate the .html.git file
|
||||||
|
|
||||||
DOCNAME = user-manual
|
DOCNAMES = user-manual user-manual_es
|
||||||
DOCSOURCE = $(DOCNAME).txt
|
|
||||||
HTMLDOC = $(DOCNAME).html
|
HTMLDOCS = $(patsubst %,$(OUT)%.html,$(DOCNAMES))
|
||||||
|
TEXTDOCS = $(patsubst %,$(OUT)%.text,$(DOCNAMES))
|
||||||
|
PDFDOCS = $(patsubst %,$(OUT)%.pdf,$(DOCNAMES))
|
||||||
|
|
||||||
ASCIIDOC = asciidoc
|
ASCIIDOC = asciidoc
|
||||||
A2X = a2x
|
A2X = a2x
|
||||||
BROWSER = firefox
|
BROWSER = firefox
|
||||||
THEME = compact_subsurface
|
THEME = compact_subsurface
|
||||||
PWD = $(realpath .)
|
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 $<
|
$(A2X) -f text $<
|
||||||
|
|
||||||
$(OUT)$(DOCNAME).pdf: $(DOCSOURCE)
|
$(OUT)%.pdf: %.txt
|
||||||
$(A2X) -f pdf $<
|
$(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"
|
@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) \
|
$(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::
|
# Alternatively::
|
||||||
$(OUT)$(DOCNAME).xhtml: $(DOCSOURCE)
|
$(OUT)$(DOCNAME).xhtml: $(DOCSOURCE)
|
||||||
|
@ -39,4 +42,4 @@ show: $(HTMLDOC)
|
||||||
$(BROWSER) $<
|
$(BROWSER) $<
|
||||||
|
|
||||||
clean:
|
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