Author: cfinck
Date: Wed Aug 12 22:54:02 2009
New Revision: 42641
URL:
http://svn.reactos.org/svn/reactos?rev=42641&view=rev
Log:
- Get rid of the Doskey macro file, just add %_ROSBE_BASEDIR% (and %_ROSBE_BASEDIR%\Tools
for svn.exe) to the PATH and call all .cmd files directly.
I've renamed some batch files to match the macro names and added some new ones, for
which no batch file existed. (except "env", this command has been removed)
Now these commands can be called from other batch files and stuff like "clean &
make" will work as well.
- Fix raddr2line.cmd to properly handle spaces in the path.
Thanks to Gunnar for the hints :-)
Added:
trunk/tools/RosBE/RosBE-Windows/Root/Basedir.cmd (with props)
trunk/tools/RosBE/RosBE-Windows/Root/Make.cmd
- copied unchanged from r42638, trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
trunk/tools/RosBE/RosBE-Windows/Root/Makex.cmd
- copied unchanged from r42638,
trunk/tools/RosBE/RosBE-Windows/Root/Build-Multi.cmd
trunk/tools/RosBE/RosBE-Windows/Root/Renv.cmd (with props)
trunk/tools/RosBE/RosBE-Windows/Root/raddr2line.cmd
- copied, changed from r42638,
trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd
Removed:
trunk/tools/RosBE/RosBE-Windows/Root/Build-Multi.cmd
trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac
trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd
Modified:
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
Added: trunk/tools/RosBE/RosBE-Windows/Root/Basedir.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Bas…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Basedir.cmd (added)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Basedir.cmd [iso-8859-1] Wed Aug 12 22:54:02
2009
@@ -1,0 +1,1 @@
+@cd /d "%_ROSBE_ROSSOURCEDIR%"
Propchange: trunk/tools/RosBE/RosBE-Windows/Root/Basedir.cmd
------------------------------------------------------------------------------
svn:eol-style = native
Removed: trunk/tools/RosBE/RosBE-Windows/Root/Build-Multi.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Bui…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Build-Multi.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Build-Multi.cmd (removed)
@@ -1,24 +1,0 @@
-::
-:: PROJECT: RosBE - ReactOS Build Environment for Windows
-:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
-:: FILE: Root/Build-Multi.cmd
-:: PURPOSE: Perform a multiprocessor build
-:: COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel(a)freenet.de>
-:: Colin Finck <colin(a)reactos.org>
-:: Peter Ward <dralnix(a)gmail.com>
-::
-
-@echo off
-if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
-if %_ROSBE_DEBUG% == 1 (
- @echo on
-)
-
-setlocal enabledelayedexpansion
-
-:: Set the options for a multiprocessor build
-set MAKE_JOBS=%_ROSBE_MAKEX_JOBS%
-set TITLE_COMMAND=makex %*
-
-call "%_ROSBE_BASEDIR%\Build-Shared.cmd" %*
-endlocal
Removed: trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Bui…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd (removed)
@@ -1,24 +1,0 @@
-::
-:: PROJECT: RosBE - ReactOS Build Environment for Windows
-:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
-:: FILE: Root/Build.cmd
-:: PURPOSE: Perform a uniprocessor build
-:: COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel(a)freenet.de>
-:: Colin Finck <colin(a)reactos.org>
-:: Peter Ward <dralnix(a)gmail.com>
-::
-
-@echo off
-if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
-if %_ROSBE_DEBUG% == 1 (
- @echo on
-)
-
-setlocal enabledelayedexpansion
-
-:: Set the options for a uniprocessor build
-set MAKE_JOBS=1
-set TITLE_COMMAND=make %*
-
-call "%_ROSBE_BASEDIR%\Build-Shared.cmd" %*
-endlocal
Added: trunk/tools/RosBE/RosBE-Windows/Root/Renv.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Ren…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Renv.cmd (added)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Renv.cmd [iso-8859-1] Wed Aug 12 22:54:02 2009
@@ -1,0 +1,1 @@
+@for /f "usebackq tokens=*" %%i in (`set _ROSBE_`) do @echo %%i
Propchange: trunk/tools/RosBE/RosBE-Windows/Root/Renv.cmd
------------------------------------------------------------------------------
svn:eol-style = native
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] Wed Aug 12 22:54:02 2009
@@ -43,7 +43,7 @@
set _ROSBE_SHOWVERSION=0
set _ROSBE_HOST_MINGWPATH=%_ROSBE_BASEDIR%\i386
set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\%ROS_ARCH%
-set _ROSBE_ORIGINALPATH=%_ROSBE_HOST_MINGWPATH%\bin;%PATH%
+set
_ROSBE_ORIGINALPATH=%_ROSBE_BASEDIR%;%_ROSBE_BASEDIR%\Tools;%_ROSBE_HOST_MINGWPATH%\bin;%PATH%
set _ROSBE_MINGWMAKE=%_ROSBE_HOST_MINGWPATH%\bin\mingw32-make.exe
:: Get the number of CPUs in the system so we know how many jobs to execute.
@@ -86,20 +86,6 @@
)
)
-:: Load the DOSKEY macros and remove non-existent ones
-doskey /macrofile="%_ROSBE_BASEDIR%\RosBE.mac"
-
-if not exist "%_ROSBE_BASEDIR%\chdefdir.cmd" ( doskey CHDEFDIR= )
-if not exist "%_ROSBE_BASEDIR%\chdefgcc.cmd" ( doskey CHDEFGCC= )
-if not exist "%_ROSBE_BASEDIR%\charch.cmd" ( doskey CHARCH= )
-if not exist "%_ROSBE_BASEDIR%\Config.cmd" ( doskey CONFIG= )
-if not exist "%_ROSBE_BASEDIR%\reladdr2line.cmd" ( doskey RADDR2LINE= )
-if not exist "%_ROSBE_BASEDIR%\scut.cmd" ( doskey SCUT= )
-if not exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( doskey SSVN= )
-if not exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( doskey SVN= )
-if not exist "%_ROSBE_BASEDIR%\update.cmd" ( doskey UPDATE= )
-if not exist "%_ROSBE_BASEDIR%\options.cmd" ( doskey OPTIONS= )
-
call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
cls
Removed: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Ros…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.mac (removed)
@@ -1,18 +1,0 @@
-BASEDIR = cd /d "%_ROSBE_ROSSOURCEDIR%"
-CHDEFDIR = "%_ROSBE_BASEDIR%\chdefdir.cmd" $*
-CHDEFGCC = "%_ROSBE_BASEDIR%\chdefgcc.cmd" $*
-CHARCH = "%_ROSBE_BASEDIR%\charch.cmd" $*
-CLEAN = "%_ROSBE_BASEDIR%\Clean.cmd" $*
-CONFIG = "%_ROSBE_BASEDIR%\Config.cmd" $*
-ENV = set
-HELP = "%_ROSBE_BASEDIR%\Help.cmd" $*
-MAKE = "%_ROSBE_BASEDIR%\Build.cmd" $*
-MAKEX = "%_ROSBE_BASEDIR%\Build-Multi.cmd" $*
-RADDR2LINE = "%_ROSBE_BASEDIR%\reladdr2line.cmd" $*
-RENV = for /f "usebackq tokens=*" %i in (`set _ROSBE_`) do @echo %i
-SCUT = "%_ROSBE_BASEDIR%\scut.cmd" $*
-SSVN = "%_ROSBE_BASEDIR%\sSVN.cmd" $*
-SVN = "%_ROSBE_BASEDIR%\Tools\svn.exe" $*
-UPDATE = "%_ROSBE_BASEDIR%\update.cmd" $*
-OPTIONS = "%_ROSBE_BASEDIR%\options.cmd" $*
-VERSION = "%_ROSBE_BASEDIR%\version.cmd" $*
Copied: trunk/tools/RosBE/RosBE-Windows/Root/raddr2line.cmd (from r42638,
trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd)
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/rad…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/raddr2line.cmd [iso-8859-1] Wed Aug 12 22:54:02
2009
@@ -49,9 +49,9 @@
:: Check if the user supplied a path, if they didn't look for
:: the specified file in the current directory and any
:: sub-directories.
-"%_ROSBE_BASEDIR%\Tools\chkslash.exe" %FILEPATH%
+"%_ROSBE_BASEDIR%\Tools\chkslash.exe" "%FILEPATH%"
if errorlevel 2 (
- for /f "usebackq" %%i in (`"dir /a:-d /s /b %FILEPATH% 2>NUL |
findstr "%FILEPATH%""`) do set FILEPATH=%%i
+ for /f "usebackq" %%i in (`"dir /a:-d /s /b "%FILEPATH%"
2>NUL | findstr "%FILEPATH%""`) do set FILEPATH=%%i
)
:: First get the ImageBase of the File. If its smaller than the given
@@ -60,7 +60,7 @@
:: give the result to raddr2line.
echo %FILEPATH%
-for /f "tokens=2" %%i in ('"objdump -p %FILEPATH% 2>NUL | findstr
ImageBase"') do set BASEADDRESS=0x%%i
+for /f "tokens=2" %%i in ('"objdump -p "%FILEPATH%" 2>NUL
| findstr ImageBase"') do set BASEADDRESS=0x%%i
if %%i lss %ADDRESS% (
"%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%FILEPATH%"
"%ADDRESS%"
Removed: trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/rel…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd (removed)
@@ -1,76 +1,0 @@
-::
-:: PROJECT: RosBE - ReactOS Build Environment for Windows
-:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
-:: FILE: Root/reladdr2line.cmd
-:: PURPOSE: Converts a value to hex and displays it.
-:: COPYRIGHT: Copyright 2009 Christoph von Wittich <Christoph_vW(a)reactos.org>
-:: Daniel Reimer <reimer.daniel(a)freenet.de>
-:: Peter Ward <dralnix(a)gmail.com>
-:: Colin Finck <colin(a)reactos.org>
-::
-
-@echo off
-if not defined _ROSBE_DEBUG set _ROSBE_DEBUG=0
-if %_ROSBE_DEBUG% == 1 (
- @echo on
-)
-
-setlocal enabledelayedexpansion
-title reladdr2line...
-
-if not "%3" == "" (
- echo ERROR: Too many parameters specified.
- goto :EOC
-)
-
-:: Receive all parameters
-if "%1" == "" (
- set /p FILEPATH="Please enter the path/file to be examined: "
-) else (
- set FILEPATH=%1
-)
-
-if "%2" == "" (
- set /p ADDRESS="Please enter the address you would like to analyze: "
-) else (
- set ADDRESS=%2
-)
-
-:: Check if parameters were really given
-if "%FILEPATH%" == "" (
- echo ERROR: You must specify a path/file to examine.
- goto :EOC
-)
-if "%ADDRESS%" == "" (
- echo ERROR: You must specify a address to analyze.
- goto :EOC
-)
-
-:: Check if the user supplied a path, if they didn't look for
-:: the specified file in the current directory and any
-:: sub-directories.
-"%_ROSBE_BASEDIR%\Tools\chkslash.exe" %FILEPATH%
-if errorlevel 2 (
- for /f "usebackq" %%i in (`"dir /a:-d /s /b %FILEPATH% 2>NUL |
findstr "%FILEPATH%""`) do set FILEPATH=%%i
-)
-
-:: First get the ImageBase of the File. If its smaller than the given
-:: Parameter, everything is ok, because it was already added onto the
-:: adress and can be given directly to raddr2line. If not, add it and
-:: give the result to raddr2line.
-echo %FILEPATH%
-
-for /f "tokens=2" %%i in ('"objdump -p %FILEPATH% 2>NUL | findstr
ImageBase"') do set BASEADDRESS=0x%%i
-
-if %%i lss %ADDRESS% (
- "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%FILEPATH%"
"%ADDRESS%"
-) else (
- set /a BASEADDRESS+=0x%ADDRESS%
-
- for /f %%i in ('""%_ROSBE_BASEDIR%\Tools\echoh.exe"
!BASEADDRESS!"') do set RELBASE=%%i
- "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "!FILEPATH!"
"!RELBASE!"
-)
-
-:EOC
-title ReactOS Build Environment %_ROSBE_VERSION%
-endlocal