2005-06-23 16:40:26 -04:00
|
|
|
<project name="ReferenceDocumentation" default="all.doc" basedir=".">
|
|
|
|
<!-- Allow this to be overriden by others importing this project. -->
|
|
|
|
<dirname property="imported.basedir" file="${ant.file.ReferenceDocumentation}"/>
|
2004-06-03 12:31:32 -04:00
|
|
|
|
|
|
|
<!-- Set build directories for all formats. -->
|
|
|
|
<property name="build.dir" value="${basedir}/build"/>
|
|
|
|
|
|
|
|
<!-- Support files for build process. -->
|
2005-06-23 16:40:26 -04:00
|
|
|
<property name="support.dir" value="${imported.basedir}/support"/>
|
|
|
|
|
|
|
|
<!-- Base name for documentation artifacts. -->
|
|
|
|
<property name="docname" value="hibernate_reference"/>
|
2004-06-03 12:31:32 -04:00
|
|
|
|
|
|
|
<!-- Set DocBook stylesheets. -->
|
|
|
|
<property name="db.style.fopdf" value="fopdf.xsl"/>
|
|
|
|
<property name="db.style.html" value="html_chunk.xsl"/>
|
|
|
|
<property name="db.style.htmlsingle" value="html.xsl"/>
|
|
|
|
|
|
|
|
<!-- Classpath for the build tools. -->
|
|
|
|
<path id="lib.classpath">
|
|
|
|
<fileset dir="${support.dir}/lib">
|
|
|
|
<include name="**/*.jar"/>
|
|
|
|
</fileset>
|
|
|
|
</path>
|
|
|
|
|
|
|
|
<!-- ################################################################## -->
|
|
|
|
|
|
|
|
<target name="all.doc"
|
|
|
|
depends="clean"
|
|
|
|
description="Compile documentation for all languages and all formats.">
|
|
|
|
|
|
|
|
<!-- TRANSLATOR: Duplicate this line for your language -->
|
|
|
|
<antcall target="lang.all"><param name="lang" value="en"/></antcall>
|
2005-05-21 14:59:44 -04:00
|
|
|
<antcall target="lang.all"><param name="lang" value="zh-cn"/></antcall>
|
2005-06-13 08:04:11 -04:00
|
|
|
<antcall target="lang.all"><param name="lang" value="es"/></antcall>
|
2005-06-18 08:39:09 -04:00
|
|
|
<antcall target="lang.all"><param name="lang" value="ko"/></antcall>
|
2004-06-03 12:31:32 -04:00
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="all.revdiff"
|
|
|
|
description="Generates a diff report for all translated versions.">
|
|
|
|
|
|
|
|
<!-- TRANSLATOR: Duplicate this line for your language -->
|
2005-05-21 14:59:44 -04:00
|
|
|
<antcall target="lang.revdiff"><param name="lang" value="zh-cn"/></antcall>
|
2005-06-13 08:04:11 -04:00
|
|
|
<antcall target="lang.revdiff"><param name="lang" value="es"/></antcall>
|
2005-06-18 08:39:09 -04:00
|
|
|
<antcall target="lang.revdiff"><param name="lang" value="ko"/></antcall>
|
2004-06-03 12:31:32 -04:00
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- ################################################################## -->
|
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
|
|
|
|
<!-- Delete build directory. -->
|
|
|
|
<delete dir="${build.dir}"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lang.all">
|
|
|
|
<!-- Compile the documentation for a single language in all formats. -->
|
|
|
|
<antcall target="lang.docpdf"/>
|
|
|
|
<antcall target="lang.dochtml"/>
|
|
|
|
<antcall target="lang.dochtmlsingle"/>
|
|
|
|
<antcall target="lang.htmlmisc"/>
|
|
|
|
</target>
|
|
|
|
|
2004-08-09 23:08:00 -04:00
|
|
|
|
|
|
|
<target name="lang.docpdf.prepare">
|
2004-06-03 12:31:32 -04:00
|
|
|
|
|
|
|
<!-- Copy all the images to the output location, will be removed later. -->
|
|
|
|
<copy todir="${build.dir}/${lang}/pdf/images">
|
|
|
|
<fileset dir="${basedir}/${lang}/images">
|
|
|
|
<include name="**/*.png"/>
|
|
|
|
<include name="**/*.svg"/>
|
|
|
|
<include name="**/*.gif"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- Create the XSL/FO temporary file. -->
|
2005-05-21 14:59:44 -04:00
|
|
|
<java classname="com.icl.saxon.StyleSheet" fork="true" dir="${basedir}" maxmemory="128m" >
|
2004-06-03 12:31:32 -04:00
|
|
|
<classpath refid="lib.classpath"/>
|
|
|
|
<arg value="-o"/>
|
|
|
|
<arg value="${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
|
|
|
|
<arg value="${basedir}/${lang}/master.xml"/>
|
|
|
|
<arg value="${basedir}/${lang}/styles/${db.style.fopdf}"/>
|
|
|
|
</java>
|
|
|
|
|
2004-08-09 23:08:00 -04:00
|
|
|
<available property="custom.fop.userconfig.present" file="userconfig.xml" filepath="${basedir}/${lang}/fop"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lang.docpdf.customized" depends="lang.docpdf.prepare" if="custom.fop.userconfig.present">
|
|
|
|
|
|
|
|
<copy todir="${build.dir}/${lang}/pdf">
|
|
|
|
<fileset dir="${basedir}/${lang}/fop">
|
|
|
|
<include name="*"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- Create a PDF from the XSL/FO, using customized fop userconfig.xml -->
|
2005-05-21 14:59:44 -04:00
|
|
|
<java classname="org.apache.fop.apps.Fop" fork="true" dir="${basedir}" maxmemory="128m" >
|
2004-08-09 23:08:00 -04:00
|
|
|
<classpath refid="lib.classpath"/>
|
|
|
|
<arg value="-c"/>
|
|
|
|
<arg value="${basedir}/${lang}/fop/userconfig.xml"/>
|
|
|
|
<arg value="${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
|
2005-06-23 16:40:26 -04:00
|
|
|
<arg value="${build.dir}/${lang}/pdf/${docname}.pdf"/>
|
2004-08-09 23:08:00 -04:00
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lang.docpdf.normal" depends="lang.docpdf.prepare" unless="custom.fop.userconfig.present">
|
2004-06-03 12:31:32 -04:00
|
|
|
<!-- Create a PDF from the XSL/FO. -->
|
|
|
|
<java classname="org.apache.fop.apps.Fop" fork="true" dir="${basedir}">
|
|
|
|
<classpath refid="lib.classpath"/>
|
|
|
|
<arg value="${build.dir}/${lang}/pdf/docbook_fop.tmp"/>
|
2005-06-23 16:40:26 -04:00
|
|
|
<arg value="${build.dir}/${lang}/pdf/${docname}.pdf"/>
|
2004-06-03 12:31:32 -04:00
|
|
|
</java>
|
2004-08-09 23:08:00 -04:00
|
|
|
</target>
|
2004-06-03 12:31:32 -04:00
|
|
|
|
2004-08-09 23:08:00 -04:00
|
|
|
<target name="lang.docpdf" depends="lang.docpdf.normal,lang.docpdf.customized">
|
|
|
|
<!-- House keeping,delete temporary files. -->
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${build.dir}/${lang}/pdf" excludes="**/*.pdf"/>
|
|
|
|
</delete>
|
2004-06-03 12:31:32 -04:00
|
|
|
<delete dir="${build.dir}/${lang}/pdf/images"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lang.dochtml">
|
|
|
|
|
|
|
|
<mkdir dir="${build.dir}/${lang}/html/"/>
|
|
|
|
|
|
|
|
<java classname="com.icl.saxon.StyleSheet" fork="true" dir="${build.dir}/${lang}/html">
|
|
|
|
<classpath refid="lib.classpath"/>
|
|
|
|
<arg value="${basedir}/${lang}/master.xml"/>
|
|
|
|
<arg value="${basedir}/${lang}/styles/${db.style.html}"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lang.dochtmlsingle">
|
|
|
|
|
|
|
|
<mkdir dir="${build.dir}/${lang}/html_single/"/>
|
|
|
|
|
|
|
|
<java classname="com.icl.saxon.StyleSheet" fork="true" dir="${basedir}">
|
|
|
|
<classpath refid="lib.classpath"/>
|
|
|
|
<arg value="-o"/>
|
|
|
|
<arg value="${build.dir}/${lang}/html_single/index.html"/>
|
|
|
|
<arg value="${basedir}/${lang}/master.xml"/>
|
|
|
|
<arg value="${basedir}/${lang}/styles/${db.style.htmlsingle}"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lang.htmlmisc">
|
|
|
|
|
|
|
|
<!-- Copy images and CSS for HTML documentation, language specific. -->
|
|
|
|
<copy todir="${build.dir}/${lang}/shared/images">
|
|
|
|
<fileset dir="${basedir}/${lang}/images">
|
|
|
|
<include name="**/*.png"/>
|
|
|
|
<include name="**/*.gif"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
<copy todir="${build.dir}/${lang}/shared/css">
|
|
|
|
<fileset dir="${basedir}/${lang}/styles">
|
|
|
|
<include name="**/*.css"/>
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="lang.revdiff">
|
|
|
|
|
|
|
|
<taskdef name="revdiff"
|
|
|
|
classname="org.hibernate.docproc.revdiff.RevDiffReportTask"
|
|
|
|
classpathref="lib.classpath">
|
|
|
|
|
|
|
|
</taskdef>
|
|
|
|
|
|
|
|
<revdiff original="${basedir}/en/master.xml"
|
|
|
|
copy="${basedir}/${lang}/master.xml"
|
|
|
|
report="${build.dir}/status_${lang}.html"/>
|
|
|
|
|
|
|
|
</target>
|
|
|
|
|
2005-03-29 22:46:36 -05:00
|
|
|
<target name="lang.section-check">
|
|
|
|
<java classname="com.icl.saxon.StyleSheet" fork="true" dir="${build.dir}/${lang}/html">
|
|
|
|
<classpath refid="lib.classpath"/>
|
|
|
|
<arg value="${basedir}/${lang}/master.xml"/>
|
|
|
|
<arg value="${support.dir}/section-check.xsl"/>
|
|
|
|
</java>
|
|
|
|
</target>
|
2004-06-03 12:31:32 -04:00
|
|
|
|
|
|
|
</project>
|