@@ -16,11 +16,12 @@ | |||||
# limitations under the License. | # limitations under the License. | ||||
# OS specific support. $var _must_ be set to either true or false. | # OS specific support. $var _must_ be set to either true or false. | ||||
cygwin=false; | |||||
darwin=false; | |||||
cygwin=false | |||||
darwin=false | |||||
case "`uname`" in | case "`uname`" in | ||||
CYGWIN*) | CYGWIN*) | ||||
cygwin=true ;; | |||||
cygwin=true | |||||
;; | |||||
Darwin*) | Darwin*) | ||||
darwin=true | darwin=true | ||||
if [ -z "$JAVA_HOME" ]; then | if [ -z "$JAVA_HOME" ]; then | ||||
@@ -60,7 +61,7 @@ fi | |||||
# JAVA_HOME/jre/sh for java and rmid | # JAVA_HOME/jre/sh for java and rmid | ||||
# JAVA_HOME/sh for javac and rmic | # JAVA_HOME/sh for javac and rmic | ||||
if [ -z "$JAVAC" ]; then | if [ -z "$JAVAC" ]; then | ||||
if [ -n "$JAVA_HOME" ]; then | |||||
if [ -n "$JAVA_HOME" ]; then | |||||
if [ -x "$JAVA_HOME/sh/javac" ]; then | if [ -x "$JAVA_HOME/sh/javac" ]; then | ||||
JAVAC=${JAVA_HOME}/sh/javac; | JAVAC=${JAVA_HOME}/sh/javac; | ||||
else | else | ||||
@@ -71,7 +72,7 @@ if [ -z "$JAVAC" ]; then | |||||
fi | fi | ||||
fi | fi | ||||
if [ -z "$JAVACMD" ]; then | if [ -z "$JAVACMD" ]; then | ||||
if [ -n "$JAVA_HOME" ]; then | |||||
if [ -n "$JAVA_HOME" ]; then | |||||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then | if [ -x "$JAVA_HOME/jre/sh/java" ]; then | ||||
JAVACMD=$JAVA_HOME/jre/sh/java | JAVACMD=$JAVA_HOME/jre/sh/java | ||||
else | else | ||||
@@ -16,8 +16,8 @@ | |||||
# limitations under the License. | # limitations under the License. | ||||
# OS specific support. $var _must_ be set to either true or false. | # OS specific support. $var _must_ be set to either true or false. | ||||
cygwin=false; | |||||
darwin=false; | |||||
cygwin=false | |||||
darwin=false | |||||
case "`uname`" in | case "`uname`" in | ||||
CYGWIN*) | CYGWIN*) | ||||
cygwin=true | cygwin=true | ||||
@@ -1,3 +1,4 @@ | |||||
#!/bin/sh | |||||
# Licensed to the Apache Software Foundation (ASF) under one or more | # Licensed to the Apache Software Foundation (ASF) under one or more | ||||
# contributor license agreements. See the NOTICE file distributed with | # contributor license agreements. See the NOTICE file distributed with | ||||
# this work for additional information regarding copyright ownership. | # this work for additional information regarding copyright ownership. | ||||
@@ -12,8 +13,8 @@ | |||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
# See the License for the specific language governing permissions and | # See the License for the specific language governing permissions and | ||||
# limitations under the License. | # limitations under the License. | ||||
for arg in "$@" ; do | |||||
echo $arg out | |||||
sleep 1 | |||||
echo $arg err>&2 | |||||
for arg in "$@"; do | |||||
echo $arg out | |||||
sleep 1 | |||||
echo $arg err>&2 | |||||
done | done |
@@ -27,7 +27,7 @@ if [ -z "$PROTECT_NL" ]; then | |||||
os=`uname -s` | os=`uname -s` | ||||
rel=`uname -r` | rel=`uname -r` | ||||
# heirloom bourne-shell used by Solaris 10 is not POSIX | # heirloom bourne-shell used by Solaris 10 is not POSIX | ||||
# it lacks features necessary to protect trailing NL from subshell trimming | |||||
# it lacks features necessary to protect trailing NL from subshell trimming | |||||
if [ "$os" = SunOS -a "$rel" = "5.10" ]; then | if [ "$os" = SunOS -a "$rel" = "5.10" ]; then | ||||
PROTECT_NL=false | PROTECT_NL=false | ||||
fi | fi | ||||
@@ -40,11 +40,11 @@ for arg in "$@"; do | |||||
use_jikes_default=true | use_jikes_default=true | ||||
elif [ "$arg" = "--execdebug" ]; then | elif [ "$arg" = "--execdebug" ]; then | ||||
ant_exec_debug=true | ant_exec_debug=true | ||||
elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ]; then | |||||
elif [ my"$arg" = my"--h" -o my"$arg" = my"--help" ]; then | |||||
show_help=true | show_help=true | ||||
ant_exec_args="$ant_exec_args -h" | ant_exec_args="$ant_exec_args -h" | ||||
else | else | ||||
if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ]; then | |||||
if [ my"$arg" = my"-h" -o my"$arg" = my"-help" ]; then | |||||
show_help=true | show_help=true | ||||
fi | fi | ||||
@@ -69,9 +69,9 @@ for arg in "$@"; do | |||||
quoted_arg="\"$esc_arg\"" | quoted_arg="\"$esc_arg\"" | ||||
if $ant_exec_debug; then | if $ant_exec_debug; then | ||||
# using printf to avoid echo line continuation and escape interpretation | |||||
printf "arg : %s\n" "$arg" | |||||
printf "quoted_arg: %s\n" "$quoted_arg" | |||||
# using printf to avoid echo line continuation and escape interpretation | |||||
printf "arg : %s\n" "$arg" | |||||
printf "quoted_arg: %s\n" "$quoted_arg" | |||||
fi | fi | ||||
ant_exec_args="$ant_exec_args $quoted_arg" | ant_exec_args="$ant_exec_args $quoted_arg" | ||||
fi | fi | ||||
@@ -84,9 +84,9 @@ if $no_config; then | |||||
else | else | ||||
# load system-wide ant configuration (ONLY if ANT_HOME has NOT been set) | # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set) | ||||
if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then | if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then | ||||
if [ -f "/etc/ant.conf" ]; then | |||||
. /etc/ant.conf | |||||
fi | |||||
if [ -f "/etc/ant.conf" ]; then | |||||
. /etc/ant.conf | |||||
fi | |||||
fi | fi | ||||
# load user ant configuration | # load user ant configuration | ||||
@@ -133,9 +133,9 @@ case "`uname`" in | |||||
fi | fi | ||||
fi | fi | ||||
;; | ;; | ||||
MINGW*) | |||||
mingw=true | |||||
;; | |||||
MINGW*) | |||||
mingw=true | |||||
;; | |||||
esac | esac | ||||
if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ]; then | if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ]; then | ||||
@@ -187,7 +187,7 @@ if [ -z "$JAVACMD" ]; then | |||||
else | else | ||||
JAVACMD=`which java 2> /dev/null ` | JAVACMD=`which java 2> /dev/null ` | ||||
if [ -z "$JAVACMD" ]; then | if [ -z "$JAVACMD" ]; then | ||||
JAVACMD=java | |||||
JAVACMD=java | |||||
fi | fi | ||||
fi | fi | ||||
fi | fi | ||||
@@ -264,9 +264,9 @@ if $rpm_mode && [ -x /usr/bin/build-classpath ]; then | |||||
else | else | ||||
# not using rpm_mode; use launcher to determine classpaths | # not using rpm_mode; use launcher to determine classpaths | ||||
if [ -z "$LOCALCLASSPATH" ]; then | if [ -z "$LOCALCLASSPATH" ]; then | ||||
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar | |||||
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar | |||||
else | else | ||||
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH | |||||
LOCALCLASSPATH=$ANT_LIB/ant-launcher.jar:$LOCALCLASSPATH | |||||
fi | fi | ||||
fi | fi | ||||
@@ -368,8 +368,8 @@ else | |||||
fi | fi | ||||
ant_exec_command="exec \"\$JAVACMD\" $ANT_OPTS -classpath \"\$LOCALCLASSPATH\" -Dant.home=\"\$ANT_HOME\" -Dant.library.dir=\"\$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"\$CLASSPATH\"" | ant_exec_command="exec \"\$JAVACMD\" $ANT_OPTS -classpath \"\$LOCALCLASSPATH\" -Dant.home=\"\$ANT_HOME\" -Dant.library.dir=\"\$ANT_LIB\" $ant_sys_opts org.apache.tools.ant.launch.Launcher $ANT_ARGS -cp \"\$CLASSPATH\"" | ||||
if $ant_exec_debug; then | if $ant_exec_debug; then | ||||
# using printf to avoid echo line continuation and escape interpretation confusion | |||||
printf "%s\n" "$ant_exec_command $ant_exec_args" | |||||
# using printf to avoid echo line continuation and escape interpretation confusion | |||||
printf "%s\n" "$ant_exec_command $ant_exec_args" | |||||
fi | fi | ||||
eval "$ant_exec_command $ant_exec_args" | eval "$ant_exec_command $ant_exec_args" |
@@ -83,7 +83,7 @@ sub getTargets { | |||||
my $cacheFile = $buildFile; | my $cacheFile = $buildFile; | ||||
$cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|; | $cacheFile =~ s|(.*/)?(.*)|${1}.ant-targets-${2}|; | ||||
if ((!-e $cacheFile) || (-z $cacheFile) || (-M $buildFile) < (-M $cacheFile)) { | if ((!-e $cacheFile) || (-z $cacheFile) || (-M $buildFile) < (-M $cacheFile)) { | ||||
open(CACHE, '>'.$cacheFile) || die "can\'t write $cacheFile: $!\n"; | |||||
open(CACHE, '>' . $cacheFile) || die "can\'t write $cacheFile: $!\n"; | |||||
open(HELP, "$antCmd -projecthelp -debug -buildfile '$buildFile'|") || return(); | open(HELP, "$antCmd -projecthelp -debug -buildfile '$buildFile'|") || return(); | ||||
my %targets; | my %targets; | ||||
while (<HELP>) { | while (<HELP>) { | ||||
@@ -70,7 +70,7 @@ my $oncygwin = ($^O eq "cygwin"); | |||||
#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed. | #here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed. | ||||
my $s = ":"; | my $s = ":"; | ||||
if (($^O eq "MSWin32") || ($^O eq "dos") || $oncygwin || $onnetware) { | if (($^O eq "MSWin32") || ($^O eq "dos") || $oncygwin || $onnetware) { | ||||
$s=";"; | |||||
$s = ";"; | |||||
} | } | ||||
#build up standard classpath | #build up standard classpath | ||||
@@ -1,3 +1,4 @@ | |||||
#!/bin/sh | |||||
# Licensed to the Apache Software Foundation (ASF) under one or more | # Licensed to the Apache Software Foundation (ASF) under one or more | ||||
# contributor license agreements. See the NOTICE file distributed with | # contributor license agreements. See the NOTICE file distributed with | ||||
# this work for additional information regarding copyright ownership. | # this work for additional information regarding copyright ownership. | ||||
@@ -12,8 +13,8 @@ | |||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||||
# See the License for the specific language governing permissions and | # See the License for the specific language governing permissions and | ||||
# limitations under the License. | # limitations under the License. | ||||
for arg in "$@" ; do | |||||
echo $arg out | |||||
sleep 1 | |||||
echo $arg err>&2 | |||||
for arg in "$@"; do | |||||
echo $arg out | |||||
sleep 1 | |||||
echo $arg err>&2 | |||||
done | done |