123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project default="generate.help" basedir=".">
- <property name="wikitext.standalone" location="${basedir}/lib" />
- <property name="help.prefix" value="help" />
- <property name="help.dir" location="${basedir}/${help.prefix}" />
- <path id="wikitext.classpath">
- <fileset dir="${wikitext.standalone}">
- <include name="org.eclipse.mylyn.wikitext.*core*.jar" />
- </fileset>
- </path>
- <taskdef classpathref="wikitext.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties" />
- <target name="assemble.sections" description="Joins individual wiki source files so that they can be presented to the Eclipse help generator as a single file.">
- <assemble.section.sources src.dir="${help.dir}/04_C-Code_Generator" src.list="sec_04" dest.file="c_code_generator.textile" />
- <assemble.section.sources src.dir="${help.dir}/05_Java-Code_Generator" src.list="sec_05" dest.file="java_code_generator.textile" />
- </target>
- <!-- Building the master TOC (toc.xml) and registering it along with the sub-TOCs produced by this target in the plugin.xml file must still be done manually. -->
- <!-- The help contexts file (contexts.xml) is not yet updated automatically, either. -->
- <target name="generate.help" depends="assemble.sections" description="Runs the Eclipse help generator on the listed wiki source files">
- <generate.section.help src.dir="${help.dir}/01_Overview" src.file="overview.textile" prefix="${help.prefix}/01_Overview" />
- <generate.section.help src.dir="${help.dir}/02_Installation" src.file="installation.textile" prefix="${help.prefix}/02_Installation" />
- <generate.section.help src.dir="${help.dir}/03_Statechart_Modeling_and_Simulation" src.file="modeling_simulation.textile" prefix="${help.prefix}/03_Statechart_Modeling_and_Simulation"/>
- <generate.section.help src.dir="${help.dir}/04_C-Code_Generator" src.file="c_code_generator.textile" prefix="${help.prefix}/04_C-Code_Generator" />
- <generate.section.help src.dir="${help.dir}/05_Java-Code_Generator" src.file="java_code_generator.textile" prefix="${help.prefix}/05_Java-Code_Generator" />
- <generate.section.help src.dir="${help.dir}/06_UML_Transformation" src.file="uml_transformation.textile" prefix="${help.prefix}/06_UML_Transformation"/>
- <generate.section.help src.dir="${help.dir}/07_Reference" src.file="sc_reference.textile" prefix="${help.prefix}/07_Reference" />
- </target>
- <target name="clean">
- <delete>
- <fileset dir="${help.dir}">
- <include name="**/**/*.html" />
- <include name="**/**/*toc.xml" />
- <!-- Include joined source files produced by assemble.sections here -->
- <include name="**/**/c_code_generator.textile" />
- <include name="**/**/java_code_generator.textile" />
- </fileset>
- </delete>
- </target>
- <macrodef name="assemble.section.sources" description="Concats individual wiki source files">
- <attribute name="src.dir" />
- <attribute name="index.file" default="@{src.dir}/index.txt" />
- <attribute name="src.list" />
- <attribute name="dest.file" />
- <sequential>
- <loadfile srcfile="@{index.file}" property="@{src.list}">
- <filterchain>
- <tokenfilter>
- <replacestring from="\n" to="," />
- </tokenfilter>
- </filterchain>
- </loadfile>
- <!-- Attribute fixlastline does not work (on the Mac). Begin wiki files with new line for now! -->
- <concat destfile="@{src.dir}/@{dest.file}" append="false" fixlastline="yes">
- <filelist dir="@{src.dir}" files="${@{src.list}}" />
- </concat>
- </sequential>
- </macrodef>
- <macrodef name="generate.section.help" description="Runs the Eclipse help generator on the provided wiki input file. Produces an HTML document and a corresponding toc.xml">
- <attribute name="src.dir" />
- <attribute name="src.file" />
- <attribute name="prefix" />
- <sequential>
- <wikitext-to-eclipse-help markupLanguage="Textile" multipleOutputFiles="false" navigationImages="true" formatoutput="true" helpPrefix="@{prefix}">
- <fileset dir="@{src.dir}">
- <include name="@{src.file}" />
- </fileset>
- <stylesheet url="../content/PLUGINS_ROOT/PRODUCT_PLUGIN/book.css" />
- <stylesheet url="../style.css" />
- </wikitext-to-eclipse-help>
- </sequential>
- </macrodef>
- </project>
|