Don't hard code list of pages to build.
--- a/build.py Sun Aug 05 17:16:49 2012 +1000
+++ b/build.py Sun Aug 05 22:49:58 2012 +1000
@@ -10,51 +10,8 @@
'''
'''
-# It would be good if the "all" and "tocopy" lists could be extracted from
+# It would be good if "tocopy" list could be extracted from
# publish.xml instead of being hard coded here.
-all = """
- index
- toc
- intro
- concepts
- render
- struct
- types
- styling
- coords
- paths
- shapes
- text
- painting
- color
- pservers
- masking
- filters
- interact
- linking
- script
- animate
- fonts
- metadata
- backward
- extend
- svgdom
- idl
- java
- escript
- implnote
- conform
- access
- i18n
- minimize
- refs
- eltindex
- attindex
- propidx
- feature
- mimereg
- changes
-""".split()
tocopy = """
style
@@ -77,8 +34,7 @@
def native_path(s):
if exists("/usr/bin/cygpath.exe"):
- status, output = commands.getstatusoutput("cygpath -a -w %s" % s)
- return output
+ return commands.getoutput("cygpath -a -w %s" % s)
return s
# could allow this to be passed in:
@@ -147,6 +103,17 @@
new_build = len(sys.argv) == 2 and sys.argv[1] == "-n"
+# Get all the pages from publish.xml:
+
+os.chdir(master_dir)
+status, output = commands.getstatusoutput("node \"" +
+ native_path(join(tools_dir, "publish/publish.js")) + "\" --list-pages")
+os.chdir(repo_dir)
+if status != 0:
+ exit(1, 'FAIL: could not get list of specification pages')
+
+all = output.split()
+
# Build svg.idlx as required:
svg_idl = join(master_dir, "svg.idl")