common/autoconf/basics_windows.m4
changeset 29790 79641c886929
parent 25882 bd4315f0084b
child 30022 362d77fbf008
equal deleted inserted replaced
29789:bfb0c4f25f0f 29790:79641c886929
   381   # called fixpath.
   381   # called fixpath.
   382   FIXPATH=
   382   FIXPATH=
   383   if test "x$OPENJDK_BUILD_OS" = xwindows; then
   383   if test "x$OPENJDK_BUILD_OS" = xwindows; then
   384     AC_MSG_CHECKING([if fixpath can be created])
   384     AC_MSG_CHECKING([if fixpath can be created])
   385     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
   385     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
   386     FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
   386     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
       
   387     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
   387     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
   388     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
   388       FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
       
   389       FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
       
   390       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
   389       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
   391       FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
   390       FIXPATH="$FIXPATH_BIN -c"
   392     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
   391     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
   393       FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
       
   394       FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
       
   395 
       
   396       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
   392       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
   397       # @ was chosen as separator to minimize risk of other tools messing around with it
   393       # @ was chosen as separator to minimize risk of other tools messing around with it
   398       all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
   394       all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \
       
   395           | tr ' ' '\n' | grep '^/./' | sort | uniq`
   399       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
   396       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
   400 
   397       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
   401       FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
   398     fi
   402     fi
   399     FIXPATH_SRC_W="$FIXPATH_SRC"
   403     rm -f $OUTPUT_ROOT/fixpath*
   400     FIXPATH_BIN_W="$FIXPATH_BIN"
   404     cd $OUTPUT_ROOT
   401     BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
   405     $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
   402     BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
       
   403     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
       
   404     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
       
   405     cd $FIXPATH_DIR
       
   406     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
   406     cd $CURDIR
   407     cd $CURDIR
   407 
   408 
   408     if test ! -x $OUTPUT_ROOT/fixpath.exe; then
   409     if test ! -x $FIXPATH_BIN; then
   409       AC_MSG_RESULT([no])
   410       AC_MSG_RESULT([no])
   410       cat $OUTPUT_ROOT/fixpath1.log
   411       cat $FIXPATH_DIR/fixpath1.log
   411       AC_MSG_ERROR([Could not create $OUTPUT_ROOT/fixpath.exe])
   412       AC_MSG_ERROR([Could not create $FIXPATH_BIN])
   412     fi
   413     fi
   413     AC_MSG_RESULT([yes])
   414     AC_MSG_RESULT([yes])
   414     AC_MSG_CHECKING([if fixpath.exe works])
   415     AC_MSG_CHECKING([if fixpath.exe works])
   415     cd $OUTPUT_ROOT
   416     cd $FIXPATH_DIR
   416     $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
   417     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
       
   418         > $FIXPATH_DIR/fixpath2.log 2>&1
   417     cd $CURDIR
   419     cd $CURDIR
   418     if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
   420     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
   419       AC_MSG_RESULT([no])
   421       AC_MSG_RESULT([no])
   420       cat $OUTPUT_ROOT/fixpath2.log
   422       cat $FIXPATH_DIR/fixpath2.log
   421       AC_MSG_ERROR([fixpath did not work!])
   423       AC_MSG_ERROR([fixpath did not work!])
   422     fi
   424     fi
   423     AC_MSG_RESULT([yes])
   425     AC_MSG_RESULT([yes])
   424     rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
       
   425   fi
   426   fi
   426 
   427 
   427   AC_SUBST(FIXPATH)
   428   AC_SUBST(FIXPATH)
   428 ])
   429 ])