#!/bin/sh

export JAVA_HOME=$JDK_HOME

echo
echo "SDX Build System"
echo "Using Java : $JAVA_HOME"
echo "--------------------------"

# cp ./lib/core/xalan*.jar ./tools/lib
# cp ./lib/core/xerces*.jar ./tools/lib
# cp ./lib/core/xml-api*.jar ./tools/lib

chmod u+x ./tools/bin/antRun
chmod u+x ./tools/bin/ant

ACTUAL_ANT_HOME=$ANT_HOME
ACTUAL_CLASSPATH=$CLASSPATH
export ACTUAL_ANT_HOME ACTUAL_CLASSPATH
unset ANT_HOME
unset CLASSPATH

$PWD/tools/bin/ant -logger org.apache.tools.ant.NoBannerLogger -emacs $@

CLASSPATH=$ACTUAL_CLASSPATH
ANT_HOME=$ACTUAL_ANT_HOME
export CLASSPATH ANT_HOME
