[telepathy-spec/master] Write out the TOC after all other documentation

Will Thompson will.thompson at collabora.co.uk
Fri Sep 18 08:59:32 PDT 2009


The Makefile uses doc/spec/index.html as the target, so previously if
building any of the other documentation files failed, a subsequent run
of `make` would not retry, since doc/spec/index.html was up-to-date.
---
 tools/doc-generator.py |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/tools/doc-generator.py b/tools/doc-generator.py
index 568061c..5b82ef2 100755
--- a/tools/doc-generator.py
+++ b/tools/doc-generator.py
@@ -74,14 +74,6 @@ for interface in spec.interfaces:
     print >> out, unicode(t).encode('utf-8')
     out.close()
 
-# write out a TOC
-namespace = { 'spec': spec }
-template_def = load_template('index.html')
-t = Template(template_def, namespaces=namespace)
-out = open(os.path.join(output_path, 'index.html'), 'w')
-print >> out, unicode(t).encode('utf-8')
-out.close()
-
 # write out the generic types
 namespace = { 'spec': spec }
 template_def = load_template('generic-types.html')
@@ -121,3 +113,12 @@ t = Template(template_def, namespaces=namespace)
 out = open(os.path.join(output_path, 'telepathy-spec.devhelp2'), 'w')
 print >> out, unicode(t).encode('utf-8')
 out.close()
+
+# write out the TOC last, because this is the file used as the target in the
+# Makefile.
+namespace = { 'spec': spec }
+template_def = load_template('index.html')
+t = Template(template_def, namespaces=namespace)
+out = open(os.path.join(output_path, 'index.html'), 'w')
+print >> out, unicode(t).encode('utf-8')
+out.close()
-- 
1.5.6.5




More information about the telepathy-commits mailing list