diff options
| author | Magesh Umasankar <umagesh@apache.org> | 2002-06-01 12:26:43 +0000 |
|---|---|---|
| committer | Magesh Umasankar <umagesh@apache.org> | 2002-06-01 12:26:43 +0000 |
| commit | ca91f8cb7e4f2bfe1a191dea6126a32649af9565 (patch) | |
| tree | 987dedb3cd79ebe75c1c7d7286acffa77470d14c /src/script | |
| parent | f19f07d6e4c72f241057ecfc32d80be21201bbf7 (diff) | |
| download | ant-ca91f8cb7e4f2bfe1a191dea6126a32649af9565.tar.gz | |
Merge changes made to 1.5 Beta1.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272826 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/script')
| -rw-r--r-- | src/script/ant | 3 | ||||
| -rw-r--r-- | src/script/runant.pl | 33 |
2 files changed, 31 insertions, 5 deletions
diff --git a/src/script/ant b/src/script/ant index 3609e8196..3d00feb69 100644 --- a/src/script/ant +++ b/src/script/ant @@ -110,7 +110,7 @@ if $rpm_mode; then if [ -z "$LOCALCLASSPATH" ] ; then LOCALCLASSPATH=$JAVALIBDIR/$i.jar else - LOCALCLASSPATH="$i.jar":"$LOCALCLASSPATH" + LOCALCLASSPATH="$JAVALIBDIR/$i.jar":"$LOCALCLASSPATH" fi done else @@ -175,6 +175,7 @@ if $cygwin; then JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` CLASSPATH=`cygpath --path --windows "$CLASSPATH"` LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"` + ANT_OPTS="$ANT_OPTS -Dcygwin.user.home="`cygpath --path --windows "$HOME"` fi "$JAVACMD" -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@" diff --git a/src/script/runant.pl b/src/script/runant.pl index f4e506786..9b7257ed3 100644 --- a/src/script/runant.pl +++ b/src/script/runant.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Copyright (c) 2001 The Apache Software Foundation. All rights +# Copyright (c) 2001-2002 The Apache Software Foundation. All rights # reserved. # ####################################################################### @@ -55,11 +55,18 @@ if ($HOME eq "") my $JAVACMD = $ENV{JAVACMD}; $JAVACMD = "java" if $JAVACMD eq ""; +my $onnetware = 0; +if ($^O eq "NetWare") +{ + $onnetware = 1; +} + #ISSUE: what java wants to split up classpath varies from platform to platform #and perl is not too hot at hinting which box it is on. -#here I assume ":" 'cept on win32 and dos. Add extra tests here as needed. +#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed. my $s=":"; -if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin")) +if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin") || + ($onnetware == 1)) { $s=";"; } @@ -71,6 +78,13 @@ if ($localpath eq "") print "warning: no initial classpath\n" if ($debug); $localpath=""; } +if ($onnetware == 1) +{ +# avoid building a command line bigger than 512 characters - make localpath +# only include the "extra" stuff, and add in the system classpath as an expanded +# variable. + $localpath=""; +} #add jar files. I am sure there is a perl one liner to do this. my $jarpattern="$HOME/lib/*.jar"; @@ -117,7 +131,18 @@ if($ENV{JIKESPATH} ne "") #construct arguments to java my @ARGS; -push @ARGS, "-classpath", "$localpath", "-Dant.home=$HOME"; +if ($onnetware == 1) +{ +# make classpath literally $CLASSPATH; and then the contents of $localpath +# this is to avoid pushing us over the 512 character limit +# even skip the ; - that is already in $localpath + push @ARGS, "-classpath", "\$CLASSPATH$localpath"; +} +else +{ + push @ARGS, "-classpath", "$localpath"; +} +push @ARGS, "-Dant.home=$HOME"; push @ARGS, @ANT_OPTS; push @ARGS, "org.apache.tools.ant.Main", @ANT_ARGS; push @ARGS, @ARGV; |
