- Fix confusion between %_ROSBE_ROSPREFIX% and %_ROSBE_PREFIX% introduced in the last commit.

We only use %_ROSBE_PREFIX% now, which should fix building with amd64.
- Readd chdefdir's feature to switch to the new default directory after changing it.
- Revert r40923 for chdefgcc.cmd. This broke switching from amd64 back to i386 (i.e. "charch amd64", "charch i386").
  Furthermore, chdefgcc must not mess around with ROS_ARCH. This is exclusively charch's privilege!
- Fix inability to switch back to i386 introduced by the last commit.

svn path=/trunk/tools/RosBE/; revision=1072
This commit is contained in:
Colin Finck 2009-07-09 12:54:03 +00:00
parent 7d2a84ff62
commit 7fc3b193c8
5 changed files with 15 additions and 16 deletions

View File

@ -38,8 +38,8 @@ if "%_ROSBE_USECCACHE%" == "1" (
set HOST_CC=%_ROSBE_CCACHE%gcc
set HOST_CPP=%_ROSBE_CCACHE%g++
set TARGET_CC=%_ROSBE_CCACHE%%_ROSBE_ROSPREFIX%gcc
set TARGET_CPP=%_ROSBE_CCACHE%%_ROSBE_ROSPREFIX%g++
set TARGET_CC=%_ROSBE_CCACHE%%_ROSBE_PREFIX%gcc
set TARGET_CPP=%_ROSBE_CCACHE%%_ROSBE_PREFIX%g++
:: Get the current date and time for use in in our build log's file name.
call "%_ROSBE_BASEDIR%\TimeDate.cmd"

View File

@ -22,13 +22,12 @@ if not defined APPDATA set APPDATA=%USERPROFILE%
:: Set defaults to work with and override them if edited by
:: the options utility.
if "%1%" == "" (
if "%1" == "" (
set ROS_ARCH=i386
) else (
set ROS_ARCH=%1
)
set _ROSBE_ROSPREFIX=""
set _ROSBE_BASEDIR=%~dp0
set _ROSBE_BASEDIR=%_ROSBE_BASEDIR:~0,-1%
set _ROSBE_VERSION=1.4.4

View File

@ -42,6 +42,6 @@ if /i "%SOURCEDIR%" == "previous" (
)
:EOC
set SOURCEDIR=%CD%
title ReactOS Build Environment %_ROSBE_VERSION%
endlocal & set _ROSBE_ROSSOURCEDIR=%SOURCEDIR%
endlocal & set _ROSBE_ROSSOURCEDIR=%CD%
cd /d %_ROSBE_ROSSOURCEDIR%

View File

@ -18,7 +18,7 @@ setlocal enabledelayedexpansion
title Change the current MinGW/GCC Host/Target directory...
:: Parse the command line arguments. Ask the user if certain parameters are missing.
if .%1. == .. (
if "%1" == "" (
set /p TOOLPATH="Please enter a MinGW/GCC directory (don't use quotes): "
if "!TOOLPATH!" == "" (
@ -42,7 +42,6 @@ if "%2" == "" (
:: Verify the entered values
if exist "%_ROSBE_BASEDIR%\%TOOLPATH%\." (
set ROS_ARCH=%TOOLPATH%
set TOOLPATH=%_ROSBE_BASEDIR%\%TOOLPATH%
) else if not exist "%TOOLPATH%\." (
echo ERROR: The path specified doesn't seem to exist.
@ -56,20 +55,17 @@ if not exist "%TOOLPATH%\bin\*gcc.exe" (
:: Set the values
if /i "%TOOLMODE%" == "target" (
if "%ROS_ARCH%" == "i386" (
set /p ROS_ARCH="Please specify the arch: "
)
echo Target Location: %TOOLPATH%
set _ROSBE_TARGET_MINGWPATH=%TOOLPATH%
endlocal & set _ROSBE_TARGET_MINGWPATH=%TOOLPATH%
) else if /i "%TOOLMODE%" == "host" (
echo Host Location: %TOOLPATH%
set _ROSBE_HOST_MINGWPATH=%TOOLPATH%
endlocal & set _ROSBE_HOST_MINGWPATH=%TOOLPATH%
) else (
echo ERROR: You specified wrong parameters.
endlocal
goto :EOC
)
endlocal & set _ROSBE_HOST_MINGWPATH=%_ROSBE_HOST_MINGWPATH%& set _ROSBE_TARGET_MINGWPATH=%_ROSBE_TARGET_MINGWPATH%& set ROS_ARCH=%ROS_ARCH%
call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
call "%_ROSBE_BASEDIR%\version.cmd"

View File

@ -17,10 +17,14 @@ if %_ROSBE_DEBUG% == 1 (
:: Check if we're switching to the AMD64 architecture
if "%ROS_ARCH%" == "amd64" (
set ROS_PREFIX=x86_64-pc-mingw32
) else (
set ROS_PREFIX=
)
if NOT "%ROS_PREFIX%" == "" (
set _ROSBE_PREFIX="%ROS_PREFIX%"-
if "%ROS_PREFIX%" == "" (
set _ROSBE_PREFIX=
) else (
set _ROSBE_PREFIX=%ROS_PREFIX%-
)
set PATH=%_ROSBE_TARGET_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%