Author: dreimer
Date: Wed Nov 26 01:35:12 2008
New Revision: 37653
URL:
http://svn.reactos.org/svn/reactos?rev=37653&view=rev
Log:
Fix a rare case problem when u switch in one session between MinGW Mode and RosBE Mode or
between GCC 3.4.5 and 4.1.3++. Clean up the previous vars to keep it clean. The behavior
should not have changed in all other cases.
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1
trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/rosbe-gcc-env.ps1 [iso-8859-1] Wed Nov 26
01:35:12 2008
@@ -46,6 +46,8 @@
#
$ENV:PATH =
"$_ROSBE_HOST_MINGWPATH\bin;$_ROSBE_TARGET_MINGWPATH\bin;$_ROSBE_ORIGINALPATH"
$global:_ROSBE_MINGWMAKE = "$_ROSBE_HOST_MINGWPATH\bin\mingw32-make.exe"
+$ENV:LIBRARY_PATH = $null
+
if ($ENV:ROS_ARCH -ne $null) {
& "$ENV:ROS_PREFIX-gcc" -v 2> gcctvers.tmp
$global:_ROSBE_GCCVERSION = (select-string -path .\gcctvers.tmp "gcc
version") -replace ".*version ((\d|\.)+).*",'$1'
@@ -63,7 +65,14 @@
if ($_ROSBE_MODE -eq "MinGW") {
$ENV:C_INCLUDE_PATH =
"$_ROSBE_HOST_MINGWPATH\include;$_ROSBE_HOST_MINGWPATH\lib\gcc\$_ROSBE_GCCTARGET\$_ROSBE_GCCVERSION\include"
$ENV:CPLUS_INCLUDE_PATH =
"$_ROSBE_HOST_MINGWPATH\include;$_ROSBE_HOST_MINGWPATH\include\c++\$_ROSBE_GCCVERSION;$_ROSBE_HOST_MINGWPATH\include\c++\$_ROSBE_GCCVERSION\$_ROSBE_GCCTARGET;$_ROSBE_HOST_MINGWPATH\lib\gcc\$_ROSBE_GCCTARGET\$_ROSBE_GCCVERSION\include"
+ $ENV:HOST_CFLAGS = $null
+ $ENV:HOST_CPPFLAGS = $null
+ $ENV:TARGET_CFLAGS = $null
+ $ENV:TARGET_CPPFLAGS = $null
+
} else {
+ $ENV:C_INCLUDE_PATH = $null
+ $ENV:CPLUS_INCLUDE_PATH = $null
$ENV:HOST_CFLAGS = "-I""$_ROSBE_HOST_MINGWPATH\include""
-I""$_ROSBE_HOST_MINGWPATH\lib\gcc\$_ROSBE_HOST_GCCTARGET\$_ROSBE_HOST_GCCVERSION\include"""
$ENV:HOST_CPPFLAGS = "-I""$_ROSBE_HOST_MINGWPATH\include""
-I""$_ROSBE_HOST_MINGWPATH\include\c++\$_ROSBE_HOST_GCCVERSION""
-I""$_ROSBE_HOST_MINGWPATH\include\c++\$_ROSBE_HOST_GCCVERSION\$_ROSBE_HOST_GCCTARGET""
-I""$_ROSBE_HOST_MINGWPATH\lib\gcc\$_ROSBE_HOST_GCCTARGET\$_ROSBE_HOST_GCCVERSION\include"""
$ENV:TARGET_CFLAGS = "-I""$_ROSBE_TARGET_MINGWPATH\include""
-I""$_ROSBE_TARGET_MINGWPATH\lib\gcc\$_ROSBE_GCCTARGET\$_ROSBE_GCCVERSION\include"""
Modified: trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] Wed Nov 26
01:35:12 2008
@@ -57,6 +57,7 @@
set PATH=%_ROSBE_HOST_MINGWPATH%\bin;%_ROSBE_TARGET_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%
set _ROSBE_MINGWMAKE=%_ROSBE_HOST_MINGWPATH%\bin\mingw32-make.exe
+set LIBRARY_PATH=
if not .%ROS_ARCH%. == .. (
for /f "usebackq tokens=3" %%i in (`"%ROS_PREFIX%-gcc -v 2>&1 |
find "gcc version""`) do set _ROSBE_GCCVERSION=%%i
@@ -72,7 +73,14 @@
if "%_ROSBE_MODE%" == "MinGW" (
set
C_INCLUDE_PATH=%_ROSBE_HOST_MINGWPATH%\include;%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
set
CPLUS_INCLUDE_PATH=%_ROSBE_HOST_MINGWPATH%\include;%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%;%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_GCCVERSION%\%_ROSBE_GCCTARGET%;%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include
+ set HOST_CFLAGS=
+ set HOST_CPPFLAGS=
+ set TARGET_CFLAGS=
+ set TARGET_CPPFLAGS=
+
) else (
+ set C_INCLUDE_PATH=
+ set CPLUS_INCLUDE_PATH=
set HOST_CFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include"
-I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
set HOST_CPPFLAGS=-I"%_ROSBE_HOST_MINGWPATH%\include"
-I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%"
-I"%_ROSBE_HOST_MINGWPATH%\include\c++\%_ROSBE_HOST_GCCVERSION%\%_ROSBE_HOST_GCCTARGET%"
-I"%_ROSBE_HOST_MINGWPATH%\lib\gcc\%_ROSBE_HOST_GCCTARGET%\%_ROSBE_HOST_GCCVERSION%\include"
set TARGET_CFLAGS=-I"%_ROSBE_TARGET_MINGWPATH%\include"
-I"%_ROSBE_TARGET_MINGWPATH%\lib\gcc\%_ROSBE_GCCTARGET%\%_ROSBE_GCCVERSION%\include"