| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project name="org.eclipse.tracecompass.doc.user" default="build"> |
| 3 | <description> |
| 4 | Generate Eclipse help content for the Trace Compass User Guide |
| 5 | </description> |
| 6 | |
| 7 | <property name="document.title" value="Trace Compass User Guide" /> |
| 8 | |
| 9 | <path id="wikitext.tasks.classpath"> |
| 10 | <!-- Search in the local Eclipse plugins directory for the Wikitext plugin --> |
| 11 | <fileset dir="${osgi.syspath}" erroronmissingdir="false"> |
| 12 | <include name="org.eclipse.mylyn.wikitext.*core*.jar" /> |
| 13 | <include name="com.google.guava_*.jar" /> |
| 14 | </fileset> |
| 15 | |
| 16 | <!-- For Maven builds: use the compile_classpath --> |
| 17 | <pathelement path="${compile_classpath}" /> |
| 18 | </path> |
| 19 | |
| 20 | <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/ant/tasks.properties" /> |
| 21 | |
| 22 | <target name="build" description="Generate Eclipse help content for the Trace Compass User Guide"> |
| 23 | <wikitext-to-eclipse-help markupLanguage="MediaWiki" |
| 24 | validate="true" |
| 25 | failonvalidationerror="true" |
| 26 | overwrite="true" |
| 27 | multipleOutputFiles="true" |
| 28 | navigationimages="true" |
| 29 | title="${document.title}" |
| 30 | formatoutput="true" |
| 31 | helpPrefix="doc"> |
| 32 | <fileset dir="./doc"> |
| 33 | <include name="User-Guide.mediawiki" /> |
| 34 | </fileset> |
| 35 | <stylesheet url="book.css" /> |
| 36 | </wikitext-to-eclipse-help> |
| 37 | <antcall target="test" /> |
| 38 | </target> |
| 39 | |
| 40 | <target name="test" description="Verify that all of the HTML files are well-formed XML"> |
| 41 | <!-- |
| 42 | Don't bother with DTD validation: we only care if the files are well-formed. |
| 43 | We therefore provide an empty DTD |
| 44 | --> |
| 45 | <xmlvalidate lenient="true"> |
| 46 | <fileset dir="doc"> |
| 47 | <include name="**/*.html" /> |
| 48 | </fileset> |
| 49 | <dtd publicid="-//W3C//DTD XHTML 1.0 Transitional//EN" location="../.empty.dtd" /> |
| 50 | </xmlvalidate> |
| 51 | </target> |
| 52 | |
| 53 | <target name ="clean" description="Delete all generated files"> |
| 54 | <delete failonerror="false" includeemptydirs="true"> |
| 55 | <fileset dir="doc" includes="**/*.html" /> |
| 56 | <fileset dir="doc" includes="**/*.xml" /> |
| 57 | </delete> |
| 58 | </target> |
| 59 | |
| 60 | <target name="build.index" description="Builds search index for the plug-in" if="eclipse.running"> |
| 61 | <help.buildHelpIndex manifest="${basedir}/plugin.xml" destination="${basedir}" /> |
| 62 | </target> |
| 63 | </project> |