head	1.1;
access;
symbols
	CDT_GA_1_1_0_20030516:1.1
	cdt_1_1:1.1.0.4
	Root_cdt_1_1:1.1
	build_against_2_1_0:1.1
	cdt_1_0_1:1.1.0.2
	Root_cdt_1_0_1:1.1
	GA_1_0_candidate_20021105:1.1;
locks; strict;
comment	@# @;
expand	@b@;


1.1
date	2002.10.09.15.36.40;	author jgreen;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Added build scripts to build the CDT from the command line, using ANT
@
text
@#! /bin/sh

export ANT_OPTS=-Xmx256m

bootclasspath=$JAVA_HOME/jre/lib/rt.jar
os=""
ws=""
target=""
install=""

usage="usage: $0 -os <osType> -ws <windowingSystemType> [-bc <bootclasspath>] [-target <target>] [-install <install>]"

if [ $# -lt 1 ]
then
	echo >&2 "$usage"
	exit 1
fi

while [ $# -gt 0 ]
do
	case "$1" in
		-os) os="$2"; shift;;
		-ws) ws="$2"; shift;;
		-bc) bootclasspath="$2"; shift;;
		-target) target="$2"; shift;;
        -install) install="-Dinstall=$2"; shift;;

		-*)
			echo >&2 $usage
			exit 1;;
		*) break;;	# terminate while loop
	esac
	shift
done

if [ "x$os" = "x" ]
then
	echo >&2 "$usage"
	exit 1
fi

if [ "x$ws" = "x" ]
then
	echo >&2 "$usage"
	exit 1
fi

if [ "$os-$ws" = "linux-motif" ] || [ "$os-$ws" = "linux-gtk" ] || [ "$os-$ws" = "solaris-motif" ] || [ "$os-$ws" = "aix-motif" ] || [ "$os-$ws" = "hpux-motif" ] || [ "$os-$ws" = "qnx-photon" ] || [ "$os-$ws" = "win32-win32" ]
then
	ant -buildfile buildCDT.xml $target $install -Dos=$os -Dws=$ws -Dbootclasspath=$bootclasspath
else
	echo "The os-ws combination of $os-$ws is not valid."
	exit 1
fi
@
