# HG changeset patch # User dcubed # Date 1269559632 25200 # Node ID 39e409a664b340ca0eaaa5a4e55dddfa99c82bdd # Parent 21141e23627adc7d46b4a52905538e7c9d6c1e53 6938185: 3/4 6923488 breaks Windows command shell builds Summary: Fix build.bat so invoking command shell doesn't exit on error. Fix dirname assumptions. Document some MKS environment dependencies. Reviewed-by: coleenp diff -r 21141e23627a -r 39e409a664b3 make/windows/build.bat --- a/make/windows/build.bat Tue Mar 16 17:47:03 2010 -0600 +++ b/make/windows/build.bat Thu Mar 25 16:27:12 2010 -0700 @@ -28,6 +28,9 @@ REM Since we don't have uname and we could be cross-compiling, REM Use the compiler to determine which ARCH we are building REM +REM Note: Running this batch file from the Windows command shell requires +REM that "grep" be accessible on the PATH. An MKS install does this. +REM cl 2>&1 | grep "IA-64" >NUL if %errorlevel% == 0 goto isia64 cl 2>&1 | grep "AMD64" >NUL @@ -109,7 +112,7 @@ echo bootstrap_dir is a full path to a JDK in which bin/java echo and bin/javac are present and working, and build_id is an echo optional build identifier displayed by java -version -exit 1 +exit /b 1 :end -exit %errorlevel% +exit /b %errorlevel% diff -r 21141e23627a -r 39e409a664b3 make/windows/build.make --- a/make/windows/build.make Tue Mar 16 17:47:03 2010 -0600 +++ b/make/windows/build.make Thu Mar 25 16:27:12 2010 -0700 @@ -27,6 +27,9 @@ # environment variables (Variant, WorkSpace, BootStrapDir, BuildUser, HOTSPOT_BUILD_VERSION) # are passed in as command line arguments. +# Note: Running nmake or build.bat from the Windows command shell requires +# that "sh" be accessible on the PATH. An MKS install does this. + # SA components are built if BUILD_WIN_SA=1 is specified. # See notes in README. This produces files: # 1. sa-jdi.jar - This is built before building jvm.dll diff -r 21141e23627a -r 39e409a664b3 make/windows/create.bat --- a/make/windows/create.bat Tue Mar 16 17:47:03 2010 -0600 +++ b/make/windows/create.bat Thu Mar 25 16:27:12 2010 -0700 @@ -36,6 +36,9 @@ REM Since we don't have uname and we could be cross-compiling, REM Use the compiler to determine which ARCH we are building REM +REM Note: Running this batch file from the Windows command shell requires +REM that "grep" be accessible on the PATH. An MKS install does this. +REM cl 2>&1 | grep "IA-64" >NUL if %errorlevel% == 0 goto isia64 cl 2>&1 | grep "AMD64" >NUL diff -r 21141e23627a -r 39e409a664b3 make/windows/get_msc_ver.sh --- a/make/windows/get_msc_ver.sh Tue Mar 16 17:47:03 2010 -0600 +++ b/make/windows/get_msc_ver.sh Thu Mar 25 16:27:12 2010 -0700 @@ -48,6 +48,7 @@ TOOL_DIR=`dirname "$SH"` fi +DIRNAME="$TOOL_DIR/dirname" HEAD="$TOOL_DIR/head" ECHO="$TOOL_DIR/echo" EXPR="$TOOL_DIR/expr" @@ -76,8 +77,13 @@ else # use the "link" command that is co-located with the "cl" command cl_cmd=`which cl` - cl_dir=`dirname $cl_cmd` - LINK_VER_RAW=`$cl_dir/link 2>&1 | "$HEAD" -n 1 | "$SED" 's/.*Version[\ ]*\([0-9][0-9.]*\).*/\1/'` + if [ "x$cl_cmd" != "x" ]; then + link_cmd=`$DIRNAME "$cl_cmd"`/link + else + # which can't find "cl" so just use which ever "link" we find + link_cmd="link" + fi + LINK_VER_RAW=`"$link_cmd" 2>&1 | "$HEAD" -n 1 | "$SED" 's/.*Version[\ ]*\([0-9][0-9.]*\).*/\1/'` LINK_VER_MAJOR=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f1` LINK_VER_MINOR=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f2` LINK_VER_MICRO=`"$ECHO" $LINK_VER_RAW | "$CUT" -d'.' -f3`