diff options
author | Simon Pepping <spepping@apache.org> | 2009-08-18 20:05:01 +0000 |
---|---|---|
committer | Simon Pepping <spepping@apache.org> | 2009-08-18 20:05:01 +0000 |
commit | 40b065f45838f40ebdd7225e67f89e9c62ca3947 (patch) | |
tree | 98134f4aeac1ea535ff2dd953cd75284fe131e13 /build.xml | |
parent | c2b8346e6cdc2b2686b38c8f351c591802195242 (diff) | |
download | xmlgraphics-fop-40b065f45838f40ebdd7225e67f89e9c62ca3947.tar.gz xmlgraphics-fop-40b065f45838f40ebdd7225e67f89e9c62ca3947.zip |
Prepare for new hyphenation pattern files, which do not have their own classes and instead use the default classes in FOP. Modified the build process to a forked java task, in order to be able to set a larger stack size for the compilation of the large number of classes. Added an ant task to generate a new default classes file, to be used with an update of the Unicode Character Database.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@805561 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 52 |
1 files changed, 42 insertions, 10 deletions
@@ -157,6 +157,8 @@ list of possible build targets. <property name="fo.examples.force" value="false"/> <property name="lib.dir" value="${basedir}/lib"/> <property name="user.hyph.dir" value="${basedir}/hyph"/> + <property name="unidata.dir" value="${basedir}/UNIDATA"/> + <property name="hyph.stacksize" value="512k"/> <property name="build.dir" value="${basedir}/build"/> <property name="build.gensrc.dir" value="${build.dir}/gensrc"/> <property name="build.classes.dir" value="${build.dir}/classes"/> @@ -425,21 +427,51 @@ list of possible build targets. </copy> </target> <target name="compile" depends="compile-java, compile-copy-resources" description="Compiles the source code"/> -<!-- =================================================================== --> -<!-- compiles hyphenation patterns --> -<!-- =================================================================== --> - <target name="compile-hyphenation" depends="compile"> + <!-- =================================================================== --> + <!-- Helper task to generate source files that have already been checked --> + <!-- into the repository. This task uses Unicode Character Database --> + <!-- files. This task need only be run when the latter files have been --> + <!-- updated. This target should never be part of the normal build --> + <!-- process. Output is UnicodeClasses.CLASSES_XML --> + <!-- (src/java/org/apache/fop/hyphenation/classes.xml). --> + <!-- =================================================================== --> + <target name="codegen-hyphenation-classes"> + <java classname="org.apache.fop.hyphenation.UnicodeClasses" resultproperty="classes.result" classpath="${build.classes.dir}"> + <arg value="${unidata.dir}"/> + </java> + <condition property="classes.result.message" value="Generation of classes successful"> + <not> + <isfailure code="${classes.result}"/> + </not> + </condition> + <condition property="classes.result.message" value="Generation of classes failed"> + <isfailure code="${classes.result}"/> + </condition> + <echo message="${classes.result.message}"/> + </target> + <!-- =================================================================== --> + <!-- compiles hyphenation patterns --> + <!-- =================================================================== --> + <target name="compile-hyphenation" depends="compile" description="Compiles the hyphenation pattern files"> <path id="hyph-classpath"> <path refid="libs-build-classpath"/> <pathelement location="${build.classes.dir}"/> </path> - <taskdef name="serHyph" classname="org.apache.fop.tools.anttasks.SerializeHyphPattern" classpathref="hyph-classpath"/> <mkdir dir="${build.classes.dir}/hyph"/> - <serHyph targetDir="${build.classes.dir}/hyph"> - <fileset dir="${user.hyph.dir}"> - <include name="*.xml"/> - </fileset> - </serHyph> + <java classname="org.apache.fop.hyphenation.SerializeHyphPattern" fork="true" resultproperty="hyph.result" classpathref="hyph-classpath"> + <arg value="${user.hyph.dir}"/> + <arg value="${build.classes.dir}/hyph"/> + <jvmarg value="-Xss${hyph.stacksize}"/> + </java> + <condition property="hyph.result.message" value="Hyphenation successful"> + <not> + <isfailure code="${hyph.result}"/> + </not> + </condition> + <condition property="hyph.result.message" value="Hyphenation failed"> + <isfailure code="${hyph.result}"/> + </condition> + <echo message="${hyph.result.message}"/> </target> <target name="uptodate-jar-hyphenation" depends="compile-hyphenation"> <uptodate property="jar.hyphenation.uptodate" targetfile="${build.dir}/fop-hyph.jar"> |