summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 23:02:03 +0000
committergman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-30 23:02:03 +0000
commit3e7824dcdcd1f84a553395630bbbe72a27612930 (patch)
tree76c89bafce09b8dff260aafcc64129bfa4aa4101 /o3d
parentca7b36c365db5d0034010500815412217af672df (diff)
downloadchromium_src-3e7824dcdcd1f84a553395630bbbe72a27612930.zip
chromium_src-3e7824dcdcd1f84a553395630bbbe72a27612930.tar.gz
chromium_src-3e7824dcdcd1f84a553395630bbbe72a27612930.tar.bz2
Fix 2 issues in docs building
1) Object type specifications "Object<index, type>" were broken 2) The js compiler would create a partial base.js even on failure which means the next build would skip building the docs. Review URL: http://codereview.chromium.org/457011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rwxr-xr-xo3d/documentation/build_docs.py37
-rw-r--r--o3d/documentation/jsdoc-toolkit-templates/publish.js24
2 files changed, 33 insertions, 28 deletions
diff --git a/o3d/documentation/build_docs.py b/o3d/documentation/build_docs.py
index 8d56d43..ce4d2a1 100755
--- a/o3d/documentation/build_docs.py
+++ b/o3d/documentation/build_docs.py
@@ -323,22 +323,27 @@ def main(argv):
os.path.splitext(os.path.basename(f))[0] + '.js')
for f in idl_list]
- DeleteOldDocs(MakePath(docs_outpath))
- BuildJavaScriptForDocsFromIDLs(idl_files, docs_js_outpath)
- BuildO3DDocsFromJavaScript([o3d_extra_externs_path] + docs_js_files,
- o3d_docs_ezt_outpath, o3d_docs_html_outpath)
- BuildO3DClassHierarchy(o3d_docs_html_outpath)
- BuildJavaScriptForExternsFromIDLs(idl_files, externs_js_outpath)
- BuildO3DExternsFile(externs_js_outpath,
- o3d_extra_externs_path,
- o3d_externs_path)
- BuildO3DJSDocs(o3djs_files + [o3d_externs_path], o3djs_docs_ezt_outpath,
- o3djs_docs_html_outpath, o3djs_exports_path)
- CopyStaticFiles(o3d_docs_ezt_outpath, o3d_docs_html_outpath)
- BuildCompiledO3DJS(o3djs_files + [o3djs_exports_path],
- externs_path,
- o3d_externs_path,
- compiled_o3djs_outpath)
+ try:
+ DeleteOldDocs(MakePath(docs_outpath))
+ BuildJavaScriptForDocsFromIDLs(idl_files, docs_js_outpath)
+ BuildO3DDocsFromJavaScript([o3d_extra_externs_path] + docs_js_files,
+ o3d_docs_ezt_outpath, o3d_docs_html_outpath)
+ BuildO3DClassHierarchy(o3d_docs_html_outpath)
+ BuildJavaScriptForExternsFromIDLs(idl_files, externs_js_outpath)
+ BuildO3DExternsFile(externs_js_outpath,
+ o3d_extra_externs_path,
+ o3d_externs_path)
+ BuildO3DJSDocs(o3djs_files + [o3d_externs_path], o3djs_docs_ezt_outpath,
+ o3djs_docs_html_outpath, o3djs_exports_path)
+ CopyStaticFiles(o3d_docs_ezt_outpath, o3d_docs_html_outpath)
+ BuildCompiledO3DJS(o3djs_files + [o3djs_exports_path],
+ externs_path,
+ o3d_externs_path,
+ compiled_o3djs_outpath)
+ except Exception:
+ if os.path.exists(compiled_o3djs_outpath):
+ os.unlink(compiled_o3djs_outpath)
+ raise
if __name__ == '__main__':
diff --git a/o3d/documentation/jsdoc-toolkit-templates/publish.js b/o3d/documentation/jsdoc-toolkit-templates/publish.js
index 73057df..fa990d1 100644
--- a/o3d/documentation/jsdoc-toolkit-templates/publish.js
+++ b/o3d/documentation/jsdoc-toolkit-templates/publish.js
@@ -742,19 +742,19 @@ function linkifySingleType(place, type) {
linkifySingleType(place, type.substring(7, closingAngle)) + '>';
}
} else if (startsWith(type, 'Object.<')) {
- var closingAngle = getIndexOfClosingCharacter(type, 6);
- if (closingAngle < 0) {
- generatePlaceError(place, 'Unmatched "<" in Object type : ' + type);
- } else {
- var objectSpec = type.substring(8, closingAngle);
- var elements = objectSpec.split(/\s*,\s*/);
- if (elements.length != 2) {
- generatePlaceError(place, 'An Object spec must have exactly 2 types');
- }
- link = 'Object.&lt;' +
- linkifySingleType(place, elements[0]) + ', ' +
- linkifySingleType(place, elements[1]) + '>';
+ var closingAngle = getIndexOfClosingCharacter(type, 7);
+ if (closingAngle < 0) {
+ generatePlaceError(place, 'Unmatched "<" in Object type : ' + type);
+ } else {
+ var objectSpec = type.substring(8, closingAngle);
+ var elements = objectSpec.split(/\s*,\s*/);
+ if (elements.length != 2) {
+ generatePlaceError(place, 'An Object spec must have exactly 2 types');
}
+ link = 'Object.&lt;' +
+ linkifySingleType(place, elements[0]) + ', ' +
+ linkifySingleType(place, elements[1]) + '>';
+ }
} else if (startsWith(type, 'function(')) {
var closingParen = getIndexOfClosingCharacter(type, 8);
if (closingParen < 0) {