aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/mathml/build.bat35
-rwxr-xr-xcontrib/mathml/build.sh8
-rw-r--r--contrib/mathml/build.xml57
3 files changed, 72 insertions, 28 deletions
diff --git a/contrib/mathml/build.bat b/contrib/mathml/build.bat
new file mode 100755
index 000000000..96aa30a7f
--- /dev/null
+++ b/contrib/mathml/build.bat
@@ -0,0 +1,35 @@
+@echo off
+
+echo MathML Build System
+echo ---------------------
+
+if "%JAVA_HOME%" == "" goto error
+
+set LIBDIR=..\..\lib
+set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\classes.zip
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\ant.jar
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xml-apis.jar
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xercesImpl-2.2.1.jar
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\xalan-2.4.1.jar
+
+set ANT_HOME=%LIBDIR%
+
+echo Building with classpath %LOCALCLASSPATH%
+
+echo Starting Ant...
+
+%JAVA_HOME%\bin\java.exe -Dant.home=%ANT_HOME% -classpath "%LOCALCLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5
+
+goto end
+
+:error
+
+echo ERROR: JAVA_HOME not found in your environment.
+echo Please, set the JAVA_HOME variable in your environment to match the
+echo location of the Java Virtual Machine you want to use.
+
+:end
+
+rem set LOCALCLASSPATH=
+
+pause \ No newline at end of file
diff --git a/contrib/mathml/build.sh b/contrib/mathml/build.sh
index e68eee93a..986d3c1e3 100755
--- a/contrib/mathml/build.sh
+++ b/contrib/mathml/build.sh
@@ -1,7 +1,7 @@
#!/bin/sh
echo
echo "MathML Build System"
-echo "----------------"
+echo "---------------------"
echo
if [ "$JAVA_HOME" = "" ] ; then
@@ -12,7 +12,11 @@ if [ "$JAVA_HOME" = "" ] ; then
exit 1
fi
LIBDIR=../../lib
-LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip:$LIBDIR/ant.jar:$LIBDIR/batik.jar:$LIBDIR/buildtools.jar:$LIBDIR/xercesImpl-2.0.1.jar:$LIBDIR/xalan-2.2D11.jar:$LIBDIR/xml-apis.jar:../../build/fop.jar:$LIBDIR/avalon-framework-cvs-20020806.jar:lib/jeuclid.jar
+LOCALCLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/classes.zip
+LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/ant.jar
+LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/xml-apis.jar
+LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/xercesImpl-2.2.1.jar
+LOCALCLASSPATH=$LOCALCLASSPATH:$LIBDIR/xalan-2.4.1.jar
ANT_HOME=$LIBDIR
echo
diff --git a/contrib/mathml/build.xml b/contrib/mathml/build.xml
index ee2146427..675a7843a 100644
--- a/contrib/mathml/build.xml
+++ b/contrib/mathml/build.xml
@@ -6,6 +6,18 @@
<project default="package" basedir=".">
+ <path id="libs-build-classpath">
+ <fileset dir="../../lib">
+ <include name="*.jar"/>
+ </fileset>
+ <fileset dir="../../build">
+ <include name="fop.jar"/>
+ </fileset>
+ <fileset dir="lib">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
@@ -20,9 +32,9 @@
<echo message="------------------- ${Name} ${version} [${year}] ----------------"/>
<property name="build.compiler" value="classic"/>
- <property name="debug" value="off"/>
- <property name="optimize" value="on"/>
- <property name="deprecation" value="off"/>
+ <property name="debug" value="on"/>
+ <property name="optimize" value="off"/>
+ <property name="deprecation" value="on"/>
<property name="src.dir" value="./src"/>
<property name="lib.dir" value="./lib"/>
@@ -35,36 +47,27 @@
<property name="resource.dir" value="resources"/>
<property name="mathml.dir" value="org/apache/fop/mathml"/>
- <property name="xslt" value="org.apache.xalan.xslt.Process"/>
-
+ <available property="jeuclid.present" classname="net.sourceforge.jeuclid.MathBase" classpathref="libs-build-classpath"/>
+ </target>
+ <target name="jeuclid-check" depends="init" unless="jeuclid.present">
+ <echo message="============================================================================="/>
+ <echo message="jeuclid.jar is missing in the lib directory."/>
+ <echo message="You can download it at: http://sourceforge.net/projects/jeuclid/"/>
+ <echo message="============================================================================="/>
+ <fail message="Dependecy check failed."/>
</target>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="usage">
- <echo message=""/>
- <echo message=""/>
- <echo message="${Name} Build file"/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=" available targets are:"/>
- <echo message=""/>
- <echo message=" package --> generates the ${name}.jar file (default)"/>
- <echo message=" compile --> compiles the source code"/>
- <echo message=" clean --> cleans up the directory"/>
- <echo message=" site --> generates the ${Name} web site (not yet implemented)"/>
- <echo message=""/>
- <echo message=" See the comments inside the build.xml file for more details."/>
- <echo message="-------------------------------------------------------------"/>
- <echo message=""/>
- <echo message=""/>
+ <echo message="Use the -projecthelp option instead"/>
</target>
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
- <target name="prepare" depends="init">
+ <target name="prepare" depends="init, jeuclid-check">
<!-- create directories -->
<echo message="Preparing the build directories"/>
<mkdir dir="${build.dir}"/>
@@ -89,7 +92,7 @@
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
- <target name="compile" depends="prepare-src">
+ <target name="compile" depends="prepare-src" description="Compile the Java sources">
<echo message="Compiling the sources "/>
<!-- create directories -->
<mkdir dir="${build.dest}"/>
@@ -99,13 +102,15 @@
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}"
- excludes=""/>
+ excludes="">
+ <classpath refid="libs-build-classpath"/>
+ </javac>
</target>
<!-- =================================================================== -->
<!-- Creates the class package -->
<!-- =================================================================== -->
- <target name="package" depends="compile">
+ <target name="package" depends="compile" description="Create jar file">
<echo message="Creating the jar file ${build.dir}/${name}.jar"/>
<tstamp>
<format property="ts" pattern="yyyyMMdd-HHmmss-z"/>
@@ -126,7 +131,7 @@
<!-- =================================================================== -->
<!-- Clean targets -->
<!-- =================================================================== -->
- <target name="clean" depends="init">
+ <target name="clean" depends="init" description="Cleans the build directory">
<delete dir="${build.dir}"/>
</target>