Author: loonycyborg
Date: Tue May 20 17:36:33 2008
New Revision: 26738
URL: http://svn.gna.org/viewcvs/wesnoth?rev=26738&view=rev
Log:
SCons recipe: made manual target work properly with update-po4a target:
generate html for all .xmls generated by po4a and ignore .xmls dropped by it.
Modified:
trunk/SConstruct
trunk/doc/manual/SConscript
Modified: trunk/SConstruct
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=26738&r1=26737&r2=26738&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Tue May 20 17:36:33 2008
@@ -287,7 +287,7 @@
env["svnrev"] = ""
Export(Split("env have_client_prereqs have_X have_server_prereqs"))
-SConscript(dirs = Split("doc po"))
+SConscript(dirs = Split("po doc"))
binaries = Split("wesnoth wesnoth_editor wesnothd cutter exploder campaignd")
builds = {
Modified: trunk/doc/manual/SConscript
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/doc/manual/SConscript?rev=26738&r1=26737&r2=26738&view=diff
==============================================================================
--- trunk/doc/manual/SConscript (original)
+++ trunk/doc/manual/SConscript Tue May 20 17:36:33 2008
@@ -1,25 +1,25 @@
# vi: syntax=python:et:ts=4
-from glob import glob
-
Import("env")
#
# Making the manual
#
if "manual" in COMMAND_LINE_TARGETS or "update-po4a" in COMMAND_LINE_TARGETS
or "pot-update" in COMMAND_LINE_TARGETS:
+ EnsureSConsVersion(0, 98, 0)
env.Command("manual.en.xml", "manual.txt",
"asciidoc -b docbook -d book -n -a toc -o $TARGET $SOURCE && dos2unix
$TARGET")
- manuals = glob("*.xml")
- if "manual.en.xml" not in manuals: manuals.append("manual.en.xml")
+ manuals = Glob("*.xml")
for manual in manuals:
- html = env.Command(manual.replace(".xml", ".html"), manual,
- """xsltproc --nonet \
+ html = env.Command(manual.name.replace(".xml", ".html"), manual,
+ """${SOURCES[0].exists() and \
+ 'xsltproc --nonet \
--stringparam callout.graphics 0 \
--stringparam navig.graphics 0 \
--stringparam admon.textlabel 1 \
--stringparam admon.graphics 0 \
--stringparam html.stylesheet ./styles/manual.css \
/etc/asciidoc/docbook-xsl/xhtml.xsl \
- $SOURCE > $TARGET \
+ %s > %s' % (SOURCE, TARGET) \
+ or '@echo Skipped non-existant %s' % SOURCE} \
""")
env.Alias("manual", html)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits