buildframework/helium/tools/common/helium_docs.ant.xml
changeset 645 b8d81fa19e7d
parent 628 7c4a911dc066
equal deleted inserted replaced
643:27cf35f95864 645:b8d81fa19e7d
    49                     find-python-dependencies,helium-api-dependency-images,helium-api-html-docs"/>
    49                     find-python-dependencies,helium-api-dependency-images,helium-api-html-docs"/>
    50     
    50     
    51     
    51     
    52     <target name="helium-prep-textdocs">
    52     <target name="helium-prep-textdocs">
    53         <mkdir dir="${doc.temp.dir}/minibuilds"/>
    53         <mkdir dir="${doc.temp.dir}/minibuilds"/>
    54         <copy todir="${doc.temp.dir}/development/minibuilds" failonerror="false">
    54         <copy todir="${doc.temp.dir}/development/minibuilds">
    55             <fileset dir="${helium.dir}/tests/minibuilds/">
    55             <fileset dir="${helium.dir}/tests/minibuilds/">
    56                 <include name="*/doc/**/*"/>
    56                 <include name="*/doc/**/*"/>
    57             </fileset>
    57             </fileset>
    58         </copy>
    58         </copy>
    59         
    59         
    67                         <include name="**/*.css"/>
    67                         <include name="**/*.css"/>
    68                         <include name="**/*.dot"/>
    68                         <include name="**/*.dot"/>
    69                         <include name="**/*.png"/>
    69                         <include name="**/*.png"/>
    70                     </fileset>
    70                     </fileset>
    71                 </copy>
    71                 </copy>
       
    72                 <hlm:rstPrepMacro destdir="${doc.temp.dir}/helium-antlib">
       
    73                     <resources>
       
    74                         <path>
       
    75                             <pathelement path="@{dir}"/>
       
    76                         </path>
       
    77                     </resources>
       
    78                 </hlm:rstPrepMacro>
    72             </sequential>
    79             </sequential>
    73         </for>
    80         </for>
    74         <for param="dir">
    81         <for param="dir">
    75             <dirset dir="${helium.dir}">
    82             <dirset dir="${helium.dir}">
    76                 <include name="*/java/*" />
    83                 <include name="*/java/*" />
   103         <!-- URL for the database.xml of last major release
   110         <!-- URL for the database.xml of last major release
   104         @type string
   111         @type string
   105         @scope private
   112         @scope private
   106         -->
   113         -->
   107         <property name="last.major.release.database.url" value="${documentation.url.root}/${last.major.helium.version}/database.xml"/>
   114         <property name="last.major.release.database.url" value="${documentation.url.root}/${last.major.helium.version}/database.xml"/>
   108         <hlm:python>
   115         <hlm:python failonerror="true">
   109 import urllib
   116 import urllib
   110 import helium.documentation
   117 import helium.documentation
   111 
   118 
   112 old_db_file = urllib.urlopen(r'${last.major.release.database.url}')
   119 old_db_file = urllib.urlopen(r'${last.major.release.database.url}')
   113 writer = helium.documentation.APIDeltaWriter(old_db_file.read(), open(r'${database.file}').read())
   120 writer = helium.documentation.APIDeltaWriter(old_db_file.read(), open(r'${database.file}').read())
   383         <loadfile srcfile="${doc.temp.dir}/antdependencies.grph" property="antdependencies"/>
   390         <loadfile srcfile="${doc.temp.dir}/antdependencies.grph" property="antdependencies"/>
   384         <replace file="${dependency.grph}" token="}" value="${antdependencies}}"/>
   391         <replace file="${dependency.grph}" token="}" value="${antdependencies}}"/>
   385         
   392         
   386         <antcall target="dependency-grouping"/>
   393         <antcall target="dependency-grouping"/>
   387         
   394         
   388         <exec executable="dot">
   395         <exec executable="dot" failonerror="true">
   389             <arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.grph} -O"/>
   396             <arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.grph} -O"/>
   390         </exec>
   397         </exec>
   391         
   398         
   392         <delete dir="${doc.temp.dir}/dependencylibs"/>
   399         <delete dir="${doc.temp.dir}/dependencylibs"/>
   393     </target>
   400     </target>
   411         <!-- Ivy configuration file
   418         <!-- Ivy configuration file
   412         @type string
   419         @type string
   413         @scope private
   420         @scope private
   414         -->
   421         -->
   415         <property name="ivy.xml.file" value="${helium.dir}/config/ivy/ivy.xml"/>
   422         <property name="ivy.xml.file" value="${helium.dir}/config/ivy/ivy.xml"/>
   416         <hlm:python>
   423         <hlm:python failonerror="true">
   417 import os
   424 import os
   418 import dependancygraph
   425 import dependancygraph
   419 
   426 
   420 dependancygraph.createGraph(r'${ivy.xml.file}', r'${dependency.grph}', r'${python.dir}', r'${python.internal.dir}', r'${subcon}')
   427 dependancygraph.createGraph(r'${ivy.xml.file}', r'${dependency.grph}', r'${python.dir}', r'${python.internal.dir}', r'${subcon}')
   421         </hlm:python>
   428         </hlm:python>
   483 import dependancygraph
   490 import dependancygraph
   484 
   491 
   485 dependancygraph.findLogFiles(r'${database.file}.parsed', r'${dependency.external.grph}')
   492 dependancygraph.findLogFiles(r'${database.file}.parsed', r'${dependency.external.grph}')
   486         </hlm:python>
   493         </hlm:python>
   487         <!---->
   494         <!---->
   488         <exec executable="dot">
   495         <exec executable="dot" failonerror="true">
   489             <arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.external.grph} -O"/>
   496             <arg line="-Tpng -Grankdir=LR -Nshape=box -Nfontsize=9 -Nwidth=0.3 -Nheight=0.2 ${dependency.external.grph} -O"/>
   490         </exec>
   497         </exec>
   491     </target>
   498     </target>
   492     
   499     
   493 
   500 
   501         </fmpp>
   508         </fmpp>
   502         <for param="dot.file">
   509         <for param="dot.file">
   503             <fileset dir="${doc.temp.dir}" includes="user_graph.dot"/>
   510             <fileset dir="${doc.temp.dir}" includes="user_graph.dot"/>
   504             <sequential>
   511             <sequential>
   505                 <echo>Processing dot file: @{dot.file}</echo>
   512                 <echo>Processing dot file: @{dot.file}</echo>
   506                 <exec executable="dot" dir="${doc.temp.dir}/">
   513                 <exec executable="dot" dir="${doc.temp.dir}/" failonerror="true">
   507                     <arg line="-Tcmap @{dot.file} -O"/>
   514                     <arg line="-Tcmap @{dot.file} -O"/>
   508                 </exec>
   515                 </exec>
   509                 <exec executable="dot" dir="${doc.build.dir}/api">
   516                 <exec executable="dot" dir="${doc.build.dir}/api" failonerror="true">
   510                     <arg line="-Tpng @{dot.file} -O"/>
   517                     <arg line="-Tpng @{dot.file} -O"/>
   511                 </exec>
   518                 </exec>
   512             </sequential>
   519             </sequential>
   513         </for>
   520         </for>
   514         <!-- This must have special handling because the rst file uses raw HTML to include it. -->
   521         <!-- This must have special handling because the rst file uses raw HTML to include it. -->