Mercurial > hg > graal-jvmci-8
comparison mx/commands.py @ 5708:1c7852e6a39a
small refinement to generated javadoc
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 27 Jun 2012 18:44:47 +0200 |
parents | e149c0e252e0 |
children | dab877fe7c31 |
comparison
equal
deleted
inserted
replaced
5707:e149c0e252e0 | 5708:1c7852e6a39a |
---|---|
1057 | 1057 |
1058 if not chunk2.text: | 1058 if not chunk2.text: |
1059 mx.log('Could not find footer section in ' + path) | 1059 mx.log('Could not find footer section in ' + path) |
1060 return | 1060 return |
1061 | 1061 |
1062 content = chunk1.replace(content, '<div class="header"><div class="subTitle"><div class="block">' + chunk2.text + topLink +'</div></div></div>') | 1062 content = chunk1.replace(content, '<div class="header"><div class="subTitle"><div class="block">' + topLink + chunk2.text +'</div></div></div>') |
1063 content = chunk2.replace(content, '') | 1063 content = chunk2.replace(content, '') |
1064 | 1064 |
1065 with open(path, 'w') as fp: | 1065 with open(path, 'w') as fp: |
1066 fp.write(content) | 1066 fp.write(content) |
1067 | 1067 |
1092 # Create unified javadoc for all projects | 1092 # Create unified javadoc for all projects |
1093 if exists(unified): | 1093 if exists(unified): |
1094 shutil.rmtree(unified) | 1094 shutil.rmtree(unified) |
1095 mx.javadoc(['--base', args.base, | 1095 mx.javadoc(['--base', args.base, |
1096 '--unified', | 1096 '--unified', |
1097 '--arg', '@-windowtitle', '--arg', '@Unified Graal Javadoc', | 1097 '--arg', '@-windowtitle', '--arg', '@Graal OpenJDK Project Documentation', |
1098 '--arg', '@-doctitle', '--arg', '@Unified Graal Javadoc', | 1098 '--arg', '@-doctitle', '--arg', '@Graal OpenJDK Project Documentation', |
1099 '--arg', '@-overview', '--arg', '@' + join(_graal_home, 'graal', 'overview.html')]) | 1099 '--arg', '@-overview', '--arg', '@' + join(_graal_home, 'graal', 'overview.html')]) |
1100 os.rename(join(args.base, 'javadoc'), unified) | 1100 os.rename(join(args.base, 'javadoc'), unified) |
1101 | 1101 |
1102 # Generate dependency graph with Graphviz | 1102 # Generate dependency graph with Graphviz |
1103 _, tmp = tempfile.mkstemp() | 1103 _, tmp = tempfile.mkstemp() |
1144 if f == 'overview-summary.html': | 1144 if f == 'overview-summary.html': |
1145 path = join(root, f) | 1145 path = join(root, f) |
1146 topLink = '' | 1146 topLink = '' |
1147 if top != path: | 1147 if top != path: |
1148 link = os.path.relpath(join(args.base, 'all', 'index.html'), dirname(path)) | 1148 link = os.path.relpath(join(args.base, 'all', 'index.html'), dirname(path)) |
1149 topLink = '<p><a href="' + link + '", target="_top">[return to the unified Graal javadoc]</a></p>' | 1149 topLink = '<p><a href="' + link + '", target="_top">[return to the overall Graal documentation]</a></p>' |
1150 _fix_overview_summary(path, topLink) | 1150 _fix_overview_summary(path, topLink) |
1151 | 1151 |
1152 print 'Created website - root is ' + join(unified, 'index.html') | 1152 print 'Created website - root is ' + join(unified, 'index.html') |
1153 | 1153 |
1154 def mx_init(): | 1154 def mx_init(): |