< prev index next >

make/autoconf/toolchain_windows.m4

Print this page




 455             >> $EXTRACT_VC_ENV_BAT_FILE
 456         $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
 457             >> $EXTRACT_VC_ENV_BAT_FILE
 458         $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
 459             >> $EXTRACT_VC_ENV_BAT_FILE
 460         $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
 461             >> $EXTRACT_VC_ENV_BAT_FILE
 462         $ECHO "$WINPATH_BASH -c 'echo VCToolsRedistDir="'\"$VCToolsRedistDir \" >> set-vs-env.sh' \
 463             >> $EXTRACT_VC_ENV_BAT_FILE
 464         $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
 465             >> $EXTRACT_VC_ENV_BAT_FILE
 466         $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
 467             >> $EXTRACT_VC_ENV_BAT_FILE
 468       fi
 469 
 470       # Now execute the newly created bat file.
 471       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
 472       # Change directory so we don't need to mess with Windows paths in redirects.
 473       cd $VS_ENV_TMP_DIR
 474       $CMD /c extract-vs-env.bat | $CAT
 475       cd $CURDIR
 476 
 477       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
 478         AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
 479         AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
 480         AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
 481         AC_MSG_ERROR([Cannot continue])
 482       fi
 483 
 484       # Remove windows line endings
 485       $SED -i -e 's|\r||g' $VS_ENV_TMP_DIR/set-vs-env.sh
 486 
 487       # Now set all paths and other env variables. This will allow the rest of
 488       # the configure script to find and run the compiler in the proper way.
 489       AC_MSG_NOTICE([Setting extracted environment variables])
 490       . $VS_ENV_TMP_DIR/set-vs-env.sh
 491       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
 492       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
 493 
 494       # In WSL, the extracted VS_PATH is Windows style. This needs to be
 495       # rewritten as Unix style and the Windows style version is saved




 455             >> $EXTRACT_VC_ENV_BAT_FILE
 456         $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
 457             >> $EXTRACT_VC_ENV_BAT_FILE
 458         $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
 459             >> $EXTRACT_VC_ENV_BAT_FILE
 460         $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
 461             >> $EXTRACT_VC_ENV_BAT_FILE
 462         $ECHO "$WINPATH_BASH -c 'echo VCToolsRedistDir="'\"$VCToolsRedistDir \" >> set-vs-env.sh' \
 463             >> $EXTRACT_VC_ENV_BAT_FILE
 464         $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
 465             >> $EXTRACT_VC_ENV_BAT_FILE
 466         $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
 467             >> $EXTRACT_VC_ENV_BAT_FILE
 468       fi
 469 
 470       # Now execute the newly created bat file.
 471       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
 472       # Change directory so we don't need to mess with Windows paths in redirects.
 473       cd $VS_ENV_TMP_DIR
 474       $CMD /c extract-vs-env.bat | $CAT
 475       cd $CONFIGURE_START_DIR
 476 
 477       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
 478         AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
 479         AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
 480         AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
 481         AC_MSG_ERROR([Cannot continue])
 482       fi
 483 
 484       # Remove windows line endings
 485       $SED -i -e 's|\r||g' $VS_ENV_TMP_DIR/set-vs-env.sh
 486 
 487       # Now set all paths and other env variables. This will allow the rest of
 488       # the configure script to find and run the compiler in the proper way.
 489       AC_MSG_NOTICE([Setting extracted environment variables])
 490       . $VS_ENV_TMP_DIR/set-vs-env.sh
 491       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
 492       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
 493 
 494       # In WSL, the extracted VS_PATH is Windows style. This needs to be
 495       # rewritten as Unix style and the Windows style version is saved


< prev index next >