Initial support to build the manual (disabled).
+ ./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.
This commit is contained in:
parent
0447f71649
commit
061db47596
5 changed files with 72 additions and 6 deletions
|
@ -157,13 +157,19 @@ endif
|
|||
|
||||
update-po:
|
||||
@cd po && make $@ || exit $?
|
||||
if MANUALUPDATE
|
||||
@cd doc/manual && make update-po || exit $?
|
||||
endif
|
||||
|
||||
if PO4AUPDATE
|
||||
update-po4a:
|
||||
@cd po && make update-po4a || exit $?
|
||||
@echo -n "Removing empty directories... "
|
||||
@echo -n "Removing empty man directories... "
|
||||
@find doc/man/ -maxdepth 1 -type d -empty -exec rmdir {} \; && \
|
||||
echo "done." || exit $?
|
||||
if MANUALUPDATE
|
||||
@cd doc/manual && make update-po4a || exit $?
|
||||
endif
|
||||
endif
|
||||
|
||||
# latest graph-includes.pl can be found currently at http://ydirson.free.fr/soft/wesnoth/graphs/
|
||||
|
|
21
configure.ac
21
configure.ac
|
@ -572,6 +572,23 @@ fi
|
|||
|
||||
AM_CONDITIONAL([PO4AUPDATE], [test "x$po4afound" = "xyes"])
|
||||
|
||||
# manual: asciidoc, dos2unix, xsltproc
|
||||
|
||||
AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
|
||||
AC_PATH_PROGS([DOS2UNIX], [dos2unix], [none])
|
||||
AC_PATH_PROGS([XSLTPROC], [xsltproc], [none])
|
||||
|
||||
if test "x$PO4A" = "xnone" || test "x$ASCIIDOC" = "xnone" ||
|
||||
test "x$DOS2UNIX" = "xnone" || test "x$XSLTPROC" = "xnone" ; then
|
||||
manualdeps=no
|
||||
else
|
||||
manualdeps=yes
|
||||
fi
|
||||
|
||||
# Disable manual update until it is ready.
|
||||
#AM_CONDITIONAL([MANUALUPDATE], [test "x$manualdeps" = "xyes"])
|
||||
AM_CONDITIONAL([MANUALUPDATE], [false])
|
||||
|
||||
#######################################################################
|
||||
# Checks for libraries. #
|
||||
#######################################################################
|
||||
|
@ -882,7 +899,6 @@ AC_SUBST([IMAGE_FILES])
|
|||
AC_SUBST([MUSIC_FILES])
|
||||
AC_SUBST([SOUND_FILES])
|
||||
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
po/Makefile
|
||||
po/wesnoth/Makefile.in
|
||||
|
@ -906,6 +922,7 @@ AC_CONFIG_FILES([Makefile
|
|||
icons/Makefile
|
||||
src/Makefile
|
||||
doc/Makefile
|
||||
doc/man/Makefile])
|
||||
doc/man/Makefile
|
||||
doc/manual/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -1 +1 @@
|
|||
SUBDIRS = man
|
||||
SUBDIRS = man manual
|
||||
|
|
42
doc/manual/Makefile.am
Normal file
42
doc/manual/Makefile.am
Normal file
|
@ -0,0 +1,42 @@
|
|||
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
|
|
@ -1,6 +1,7 @@
|
|||
SUBDIRS = wesnoth wesnoth-editor wesnoth-lib wesnoth-units wesnoth-multiplayer wesnoth-tutorial wesnoth-did wesnoth-ei wesnoth-httt wesnoth-l wesnoth-nr wesnoth-sof wesnoth-sotbe wesnoth-tb wesnoth-trow wesnoth-tsg wesnoth-utbs
|
||||
|
||||
PO4A_SUBDIRS = wesnoth-manpages
|
||||
PO4A_OPTIONS = --rm-backups --copyright-holder "Wesnoth Development Team"
|
||||
|
||||
EXTRA_DIST = Makefile.in.in
|
||||
|
||||
|
@ -10,7 +11,7 @@ update-po:
|
|||
done
|
||||
if PO4AUPDATE
|
||||
@for dir in $(PO4A_SUBDIRS); do \
|
||||
( cd $$dir && $(PO4A) --no-translations --rm-backups $$dir.cfg || \
|
||||
( cd $$dir && $(PO4A) $(PO4A_OPTIONS) --no-translations $$dir.cfg || \
|
||||
exit $? ); \
|
||||
done
|
||||
endif
|
||||
|
@ -18,7 +19,7 @@ endif
|
|||
if PO4AUPDATE
|
||||
update-po4a:
|
||||
@for dir in $(PO4A_SUBDIRS); do \
|
||||
( cd $$dir && $(PO4A) --rm-backups $$dir.cfg || exit $? ); \
|
||||
( cd $$dir && $(PO4A) $(PO4A_OPTIONS) $$dir.cfg || exit $? ); \
|
||||
done
|
||||
endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue