#!/bin/sh # Copyright 2004-2005 Uwyn bvba/sprl # Distributed under the terms of the GNU General Public License, v2 or later # $Id$ PROGDIR="`dirname $0`" case "${PROGDIR}" in [^/]*) export PROGDIR="`pwd`/${PROGDIR}" ;; esac echo "==========================================================================" echo "The build.sh file is intended to compile the application with Omnicore" echo "Codeguide's cgjavac compiler. This compiles 1.5 Java code directly to" echo "backwards compatible 1.4 classes. More info on http://www.omnicore.com" echo echo "This is only intended to be used on platforms that have no JDK 1.5 release" echo "yet (MacOSX)." echo echo "If you're on Linux or Windows, please use ant and the regular build.xml" echo "instead." echo "==========================================================================" export ANT_HOME="${PROGDIR}/lib/ant-1.6" export JSR14DISTR="${PROGDIR}/generics" export PATH="${ANT_HOME}/bin:${PATH}" export CGJAVAC_ADDITIONAL_OPTIONS="-Xbootclasspath/p:${JSR14DISTR}/collect.jar -incremental" export EXECUTABLE="$(which cgjavac)" if [ -z "$EXECUTABLE" ] then echo echo "Could not find cgjavac anywhere on your PATH." exit 1 fi if ! [ -f "${JSR14DISTR}/collect.jar" ] then echo echo "The JSR-14 generics jars weren't found. This is needed if you want" echo "to compile Bla-bla List with cgjavac. You should copy the 'collect.jar'" echo "and the 'gjc-rt.jar' files from the JSR-014 v2.4 distribution to the" echo "'generics' directory. The distribution archive can be downloaded from" echo "http://developer.java.sun.com/developer/earlyAccess/adding_generics/" echo exit 1 fi echo "Using ${EXECUTABLE}" echo "Using $(which ant)" if [ ! "$*" ]; then ant -Dexecutable="$EXECUTABLE" -Dtarget=1.4-cgjavac else ant -Dexecutable="$EXECUTABLE" -Dtarget=1.4-cgjavac $@ fi