mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-01 21:47:52 +00:00

+ ./configure checks for manual-related tools. + Updated update-po and update-po4a targets. + Build the HTML files at `make dist' time (work in progress, the files are not yet included in the tarball). * Copyright holder now set to "Wesnoth Development Team" in po4a domains.
43 lines
1.3 KiB
Makefile
43 lines
1.3 KiB
Makefile
if MANUALUPDATE
|
|
XSLTOPTS = --nonet \
|
|
--stringparam callout.graphics 0 \
|
|
--stringparam navig.graphics 0 \
|
|
--stringparam admon.textlabel 1 \
|
|
--stringparam admon.graphics 0 \
|
|
--stringparam html.stylesheet "./styles/manual.css"
|
|
|
|
PO4AOPTS = --no-backups --copyright-holder "Wesnoth Development Team"
|
|
|
|
manual.en.xml: manual.txt
|
|
$(ASCIIDOC) -b docbook -d book -n -a toc -o manual.en.xml manual.txt
|
|
$(DOS2UNIX) manual.en.xml
|
|
|
|
update-po: manual.en.xml
|
|
( cd ../../po/wesnoth-manual && \
|
|
$(PO4A) $(PO4AOPTS) --no-translations wesnoth-manual.cfg || exit $? )
|
|
|
|
update-po4a: manual.en.xml
|
|
( cd ../../po/wesnoth-manual && \
|
|
$(PO4A) $(PO4AOPTS) wesnoth-manual.cfg || exit $? )
|
|
|
|
dist-hook: update-po4a
|
|
@for i in manual.*.xml; do \
|
|
lang=$$(echo $$i | sed -e 's/manual\.\([a-zA-Z_@]*\)\.xml/\1/'); \
|
|
echo "Generating manual from «manual.$$lang.xml»..."; \
|
|
rm -f manual.$$lang.html; \
|
|
$(XSLTPROC) $(XSLTOPTS) "/etc/asciidoc/docbook-xsl/xhtml.xsl" \
|
|
"manual.$$lang.xml" > "manual.$$lang.html"; \
|
|
rm -rf $$lang && mkdir $$lang; \
|
|
cd $$lang && ln -s ../images . && ln -s ../styles . && cd -; \
|
|
$(XSLTPROC) $(XSLTOPTS) --stringparam base.dir "$$lang/" \
|
|
"/etc/asciidoc/docbook-xsl/chunked.xsl" "manual.$$lang.xml"; \
|
|
done
|
|
|
|
clean-local:
|
|
rm -f *.xml
|
|
|
|
distclean-local:
|
|
for i in manual.*.xml; do rm -rf $$i; done
|
|
rm -f *.html *.xml
|
|
endif
|