Author: dreimer
Date: Tue Apr 21 17:20:51 2009
New Revision: 40634
URL: http://svn.reactos.org/svn/reactos?rev=40634&view=rev
Log:
a working and hopefully final sulution. Dedicated to Physicus. This should fix your problem. If anyone dislikes this bad workaround, I will hit him with a big large endlocal!
Removed:
trunk/tools/RosBE/RosBE-Windows/Root/setlocal.cmd
Modified:
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] Tue Apr 21 17:20:51 2009
@@ -8,6 +8,7 @@
:: Peter Ward <dralnix(a)gmail.com>
::
::
+
@echo off
if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
if %_ROSBE_DEBUG% == 1 (
@@ -66,7 +67,7 @@
goto :EndCommandParse
) else (
cls
- set _ROSBE_ARCH=%1
+ set ROS_ARCH=%1
call :RosBE4
)
::
Modified: trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/cha…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] Tue Apr 21 17:20:51 2009
@@ -24,9 +24,9 @@
set _1=%1
)
if /i "%_1%" == "i386" (
- set _ROSBE_ARCH=
+ set ROS_ARCH=
) else (
- set _ROSBE_ARCH=%_1%
+ set ROS_ARCH=%_1%
)
goto :EOA
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] Tue Apr 21 17:20:51 2009
@@ -23,19 +23,51 @@
set _ROSBE_ORIGINALPATH=%PATH%
)
-::
-:: Set the Arch Variables
-::
-set ROS_ARCH=
-set ROS_PREFIX=
-
if "%1" == "chdefgcc" (
goto :main
)
-set _ROSBE_OBJPATH=%_ROSBE_i386_OBJPATH%
-set _ROSBE_OUTPATH=%_ROSBE_i386_OUTPATH%
-"%_ROSBE_BASEDIR%\setlocal.cmd"
+setlocal enabledelayedexpansion
+
+set _ROSBE_OBJPATH=!_ROSBE_i386_OBJPATH!
+set _ROSBE_OUTPATH=!_ROSBE_i386_OUTPATH!
+
+if not "!ROS_ARCH!" == "" (
+ set ROS_PREFIX=!ROS_ARCH!-pc-mingw32
+ set _ROSBE_TARGET_MINGWPATH=!_ROSBE_BASEDIR!\!ROS_ARCH!
+
+ if "!ROS_ARCH!" == "arm" (
+ set _ROSBE_OBJPATH=!_ROSBE_ARM_OBJPATH!
+ set _ROSBE_OUTPATH=!_ROSBE_ARM_OUTPATH!
+ )
+ if "!ROS_ARCH!" == "ppc" (
+ set _ROSBE_OBJPATH=!_ROSBE_PPC_OBJPATH!
+ set _ROSBE_OUTPATH=!_ROSBE_PPC_OUTPATH!
+ )
+ if "!ROS_ARCH!" == "amd64" (
+ set _ROSBE_OBJPATH=!_ROSBE_AMD64_OBJPATH!
+ set _ROSBE_OUTPATH=!_ROSBE_AMD64_OUTPATH!
+ set ROS_PREFIX=x86_64-pc-mingw32
+ set _ROSBE_TARGET_MINGWPATH=!_ROSBE_BASEDIR!\x86_64
+ )
+)
+
+REM Check if existant arch
+
+if not exist "!_ROSBE_TARGET_MINGWPATH!\." (
+ echo Unsupported arch specified. Fallback to Default.
+ pause
+ set _ROSBE_OBJPATH=!_ROSBE_i386_OBJPATH!
+ set _ROSBE_OUTPATH=!_ROSBE_i386_OUTPATH!
+ set ROS_ARCH=
+ set ROS_PREFIX=
+ set _ROSBE_TARGET_MINGWPATH=!_ROSBE_HOST_MINGWPATH!
+)
+
+REM HAXX
+
+endlocal & set ROS_ARCH=%ROS_ARCH%& set ROS_PREFIX=%ROS_PREFIX%& set _ROSBE_OBJPATH=%_ROSBE_OBJPATH%& set _ROSBE_OUTPATH=%_ROSBE_OUTPATH%& set _ROSBE_TARGET_MINGWPATH=%_ROSBE_TARGET_MINGWPATH%& set _ROSBE_HOST_MINGWPATH=%_ROSBE_HOST_MINGWPATH%& set _ROSBE_MODE=%_ROSBE_MODE%& set _ROSBE_ORIGINALPATH=%_ROSBE_ORIGINALPATH%
+
::
:: Set up the GCC 4.x.x build environment.
::
Removed: trunk/tools/RosBE/RosBE-Windows/Root/setlocal.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/set…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/setlocal.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/setlocal.cmd (removed)
@@ -1,49 +1,0 @@
-::
-:: PROJECT: RosBE - ReactOS Build Environment for Windows
-:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
-:: FILE: Root/setlocal.cmd
-:: PURPOSE: Bypass for the stupid setlocal in CMD Batch
-:: COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel(a)freenet.de>
-::
-::
-@echo off
-if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
-if %_ROSBE_DEBUG% == 1 (
- @echo on
-)
-
-
-if not "%_ROSBE_ARCH%" == "" (
- set ROS_ARCH=%_ROSBE_ARCH%
- set ROS_PREFIX=%_ROSBE_ARCH%-pc-mingw32
- set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\%_ROSBE_ARCH%
-
- REM HAXX
-
- if "%_ROSBE_ARCH%" == "arm" (
- set _ROSBE_OBJPATH=%_ROSBE_ARM_OBJPATH%
- set _ROSBE_OUTPATH=%_ROSBE_ARM_OUTPATH%
- )
- if "%_ROSBE_ARCH%" == "ppc" (
- set _ROSBE_OBJPATH=%_ROSBE_PPC_OBJPATH%
- set _ROSBE_OUTPATH=%_ROSBE_PPC_OUTPATH%
- )
- if "%_ROSBE_ARCH%" == "amd64" (
- set _ROSBE_OBJPATH=%_ROSBE_AMD64_OBJPATH%
- set _ROSBE_OUTPATH=%_ROSBE_AMD64_OUTPATH%
- set ROS_PREFIX=x86_64-pc-mingw32
- set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\x86_64
- )
-
- REM Check if existant arch
-
- if not exist "%_ROSBE_TARGET_MINGWPATH%\." (
- echo Unsupported arch specified. Fallback to Default.
- pause
- set _ROSBE_OBJPATH=%_ROSBE_i386_OBJPATH%
- set _ROSBE_OUTPATH=%_ROSBE_i386_OUTPATH%
- set ROS_ARCH=
- set ROS_PREFIX=
- set _ROSBE_TARGET_MINGWPATH=
- )
-)