mail[Wesnoth-commits] r20355 - in /trunk: Makefile.am configure.ac doc/Makefile.am doc/manual/Makefile.am po/Makefile.am


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by jorda on September 13, 2007 - 21:52:
Author: jorda
Date: Thu Sep 13 21:51:33 2007
New Revision: 20355

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20355&view=rev
Log:
* 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.

Added:
    trunk/doc/manual/Makefile.am
Modified:
    trunk/Makefile.am
    trunk/configure.ac
    trunk/doc/Makefile.am
    trunk/po/Makefile.am

Modified: trunk/Makefile.am
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/Makefile.am?rev=20355&r1=20354&r2=20355&view=diff
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Thu Sep 13 21:51:33 2007
@@ -157,13 +157,19 @@
 
 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/

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/configure.ac?rev=20355&r1=20354&r2=20355&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Sep 13 21:51:33 2007
@@ -572,6 +572,23 @@
 
 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.                                               #
 #######################################################################
@@ -881,7 +898,6 @@
 AC_SUBST([IMAGE_FILES])
 AC_SUBST([MUSIC_FILES])
 AC_SUBST([SOUND_FILES])
-
 
 AC_CONFIG_FILES([Makefile
                 po/Makefile
@@ -906,6 +922,7 @@
                 icons/Makefile
                 src/Makefile
                 doc/Makefile
-                doc/man/Makefile])
+                doc/man/Makefile
+                doc/manual/Makefile])
 
 AC_OUTPUT

Modified: trunk/doc/Makefile.am
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/doc/Makefile.am?rev=20355&r1=20354&r2=20355&view=diff
==============================================================================
--- trunk/doc/Makefile.am (original)
+++ trunk/doc/Makefile.am Thu Sep 13 21:51:33 2007
@@ -1,1 +1,1 @@
-SUBDIRS = man
+SUBDIRS = man manual

Added: trunk/doc/manual/Makefile.am
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/doc/manual/Makefile.am?rev=20355&view=auto
==============================================================================
--- trunk/doc/manual/Makefile.am (added)
+++ trunk/doc/manual/Makefile.am Thu Sep 13 21:51:33 2007
@@ -1,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

Modified: trunk/po/Makefile.am
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/po/Makefile.am?rev=20355&r1=20354&r2=20355&view=diff
==============================================================================
--- trunk/po/Makefile.am (original)
+++ trunk/po/Makefile.am Thu Sep 13 21:51:33 2007
@@ -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 @@
        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 @@
 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
 




Related Messages


Powered by MHonArc, Updated Thu Sep 13 22:00:13 2007