You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Kevin O'Neill <ke...@rocketred.com> on 2001/01/28 13:46:06 UTC

Changes to build file

I had some problems building slide from scratch. The instructions contained 
in the README file seem to be a little out of date.

So I've modified the build program to, in my opinion :), make it easier to 
get "up and building" with slide.

The major difference is that I symlink the dependent libraries into the lib 
directory. My modified build.sh adds each jar file in the lib directory to 
the classpath before launching ant. To enable or disable a feature is just a 
matter of adding or removing a link.

If this is an acceptable approach then I'll update the README and submit the 
diffs to this list. Of course this doesn't really help those on the wintel 
platform, but that's a problem for another day.

Regards,

k.
------ start build.sh ------
#! /bin/sh

# $Id: build.sh,v 1.6 2001/01/21 21:29:21 remm Exp $

BUILDFILE=build.xml

if test -z "${JAVA_HOME}" ; then
    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."
    exit
fi

if test ! -f ${JAVA_HOME}/lib/tools.jar ; then
    echo "ERROR: Your JAVA_HOME \"$JAVA_HOME\" environment variable doesn't 
seem to point to a valid JDK"
    exit
fi

LOCALCLASSPATH=$CLASSPATH

# convert the existing path to unix
if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
   LOCALCLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

LOCALCLASSPATH=`echo lib/*.jar | tr ' ' 
':'`:$JAVA_HOME/lib/tools.jar:$LOCALCLASSPATH:${ANT_HOME}/lib/ant.jar


# convert the unix path to windows
if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
   CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi

${JAVA_HOME}/bin/java -classpath ${LOCALCLASSPATH} org.apache.tools.ant.Main \
                      -buildfile ${BUILDFILE} "$@"
------ end build.sh ------