Author: cfinck
Date: Tue Jan 26 21:17:49 2010
New Revision: 45273
URL:
http://svn.reactos.org/svn/reactos?rev=45273&view=rev
Log:
- Removed the unneeded -gstabs+ flag as the debug symbols of all toolchain binaries are
stripped off anyway after the build.
- Do some basic checks to verify that we're really in a checkout directory before
cleaning it.
- Fix the architecture environment variable in RosBE-Unix.
- Consider the ROS_AUTOMAKE and ROS_CDOUTPUT variables when cleaning.
The default makefile is always "makefile-ARCH.auto" now, also for i386. Will
be changed in the tree as well once we all update to 1.5.
- Leave out RosBE-Unix' version number for GCC's --with-pkgversion parameter as
this could be misleading for future updates.
- Many code simplifications
Removed:
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh
Modified:
trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh
trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh
trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh
trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/R…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/RosBE-Builder.sh [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -11,7 +11,7 @@
rs_host_cflags="-pipe -O2"
rs_needed_tools="bison flex gcc g++ grep makeinfo" # GNU Make has a
special check
rs_target="mingw32"
-rs_target_cflags="-pipe -gstabs+ -O2 -march=pentium -mtune=i686"
+rs_target_cflags="-pipe -O2 -march=pentium -mtune=i686"
# Get the absolute path to the script directory
cd `dirname $0`
@@ -295,7 +295,7 @@
export CFLAGS_FOR_TARGET="$rs_target_cflags"
export CXXFLAGS_FOR_TARGET="$rs_target_cflags"
- rs_do_command ../gcc/configure --prefix="$rs_prefixdir"
--target="$rs_target" --with-gmp="$rs_supportprefixdir"
--with-mpfr="$rs_supportprefixdir" --with-pkgversion="RosBE-Unix
$ROSBE_VERSION" --enable-languages=c,c++ --enable-checking=release
--enable-version-specific-runtime-libs --disable-shared --disable-nls --disable-werror
+ rs_do_command ../gcc/configure --prefix="$rs_prefixdir"
--target="$rs_target" --with-gmp="$rs_supportprefixdir"
--with-mpfr="$rs_supportprefixdir" --with-pkgversion="RosBE-Unix"
--enable-languages=c,c++ --enable-checking=release --enable-version-specific-runtime-libs
--disable-shared --disable-nls --disable-werror
rs_do_command $rs_makecmd -j $rs_cpucount
rs_do_command $rs_makecmd install
rs_clean_module "gcc"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE-rc [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -1,7 +1,3 @@
-# Set path
-source "$_ROSBE_ROSSCRIPTDIR/rosbelibrary.sh"
-set_path_variable
-
# Set aliases
alias basedir="source $_ROSBE_ROSSCRIPTDIR/basedir.sh"
alias charch="source $_ROSBE_ROSSCRIPTDIR/charch.sh"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/RosBE.sh [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -2,7 +2,7 @@
#
# Script for initializing RosBE
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2007-2009 Colin Finck <colin(a)reactos.org>
+# Copyright 2007-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
@@ -20,7 +20,7 @@
export _ROSBE_ROSSCRIPTDIR="$PWD"
# Save the current PATH variable
-export _ROSBE_OLDPATH="$PATH"
+export _ROSBE_OLDPATH="$_ROSBE_ROSSCRIPTDIR/bin:$PATH"
# Make sure that some important variables are clean
export HOST=
@@ -44,15 +44,8 @@
# Set the architecture to build for
source "$_ROSBE_ROSSCRIPTDIR/rosbelibrary.sh"
-if [ "$3" = "" ]; then
- # No architecture specified, fall back to i386 without any message
- export _ROSBE_ARCH="i386"
-else
- # Try to set the architecture to the one specified
- change_architecture $3
-fi
-
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/setvars.sh"
+# Try to set the architecture to the one specified or fallback to "i386"
+change_architecture "$3:-i386"
# Display banner
echo
"*******************************************************************************"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/charch.sh [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -2,7 +2,7 @@
#
# Change the current target build tools to an architecture to build for
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2009-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
@@ -18,8 +18,6 @@
# Change the architecture
source "$_ROSBE_ROSSCRIPTDIR/rosbelibrary.sh"
change_architecture $1
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/setvars.sh"
-set_path_variable
# Display tool versions
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/version.sh"
+source "$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/version.sh"
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/clean.sh [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -2,10 +2,27 @@
#
# Script for cleaning the ReactOS source directory
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2007-2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2007-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
-pushd "$_ROSBE_ROSSOURCEDIR" >& /dev/null
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/clean.sh"
-popd >& /dev/null
+# Check if the user set any custom filenames or pathes, otherwise locally set the
appropriate variables.
+ROS_AUTOMAKE="$ROS_AUTOMAKE:-makefile-$ROS_ARCH.auto"
+ROS_INTERMEDIATE="$ROS_INTERMEDIATE:-obj-$ROS_ARCH"
+ROS_OUTPUT="$ROS_OUTPUT:-output-$ROS_ARCH"
+ROS_CDOUTPUT="$ROS_CDOUTPUT:-reactos."
+
+# Do some basic sanity checks to verify that we are working in a ReactOS source tree.
+# Consider that we also want to clean half-complete builds, so don't depend on too
many existing files.
+if [ -d "$ROS_INTERMEDIATE" ] && [ -d "$ROS_OUTPUT" ]; then
+ echo "Cleaning ReactOS $ROS_ARCH source directory..."
+
+ rm -f "$ROS_AUTOMAKE"
+ rm -rf "$ROS_INTERMEDIATE"
+ rm -rf "$ROS_OUTPUT"
+ rm -rf "$ROS_CDOUTPUT"
+
+ echo "Done cleaning ReactOS $ROS_ARCH source directory."
+else
+ echo "ERROR: There is no $ROS_ARCH compiler output to clean."
+fi
Removed: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/clean.sh (removed)
@@ -1,18 +1,0 @@
-# Clean i386 source directories
-# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
-#
-# Released under GNU GPL v2 or any later version.
-
-if [ -d "obj-i386" ]; then
- echo "Cleaning ReactOS i386 source directory..."
-
- rm -rf "obj-i386"
- rm -rf "output-i386"
- rm -rf "reactos."
- rm -f "makefile.auto"
-
- echo "Done cleaning ReactOS i386 source directory."
-else
- echo "ERROR: There is no i386 compiler output to clean."
-fi
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh [iso-8859-1]
(original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/i386/setvars.sh [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -1,8 +1,8 @@
# Set architecture-specific environment variables
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2009-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
-export
ROSBE_TARGET_CFLAGS="-I$_ROSBE_ROSSCRIPTDIR/i386/lib/gcc/mingw32/4.1.3/include
-I$_ROSBE_ROSSCRIPTDIR/i386/mingw32/include"
-export ROSBE_TARGET_CXXFLAGS="-I$_ROSBE_ROSSCRIPTDIR/i386/include/c++/4.1.3
-I$_ROSBE_ROSSCRIPTDIR/i386/include/c++/4.1.3/mingw32
-I$_ROSBE_ROSSCRIPTDIR/i386/include/c++/4.1.3/backward
-I$_ROSBE_ROSSCRIPTDIR/i386/lib/gcc/mingw32/4.1.3/include
-I$_ROSBE_ROSSCRIPTDIR/i386/mingw32/include"
+export ROSBE_TARGET_CFLAGS=`mingw32-cpp -x c -v < /dev/null 2>&1 |
$_ROSBE_ROSSCRIPTDIR/bin/getincludes`
+export ROSBE_TARGET_CXXFLAGS=`mingw32-cpp -x c++ -v < /dev/null 2>&1 |
$_ROSBE_ROSSCRIPTDIR/bin/getincludes`
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh [iso-8859-1]
(original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/rosbelibrary.sh [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -1,10 +1,10 @@
# Shared functions for RosBE-Unix components
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2009-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
-# Check whether the given architecture is supported and if so, change the _ROSBE_ARCH
variable appropriately
+# Check whether the given architecture is supported and if so, change the ROS_ARCH
variable appropriately
# Parameter 1: The architecture to set
change_architecture()
{
@@ -12,14 +12,17 @@
if [ -f "$_ROSBE_ROSSCRIPTDIR/$new_arch/version.sh" ]; then
# Architecture parameter seems valid
- _ROSBE_ARCH="$new_arch"
+ ROS_ARCH="$new_arch"
else
echo "Unsupported architecture specified, falling back to i386!"
echo
- _ROSBE_ARCH="i386"
+ ROS_ARCH="i386"
fi
- export _ROSBE_ARCH
+ export PATH="$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/bin:$_ROSBE_OLDPATH"
+ export ROS_ARCH
+
+ source "$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/setvars.sh"
}
# Check whether we're running as root and warn the user in case we don't
@@ -43,10 +46,3 @@
fi
fi
}
-
-# Set the PATH variable properly for the specified architecture
-set_path_variable()
-{
- # Set the PATH
- PATH="$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/bin:$_ROSBE_ROSSCRIPTDIR/bin:$_ROSBE_OLDPATH"
-}
Modified: trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Unix/Base-i386/s…
==============================================================================
--- trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Unix/Base-i386/scripts/version.sh [iso-8859-1] Tue Jan 26
21:17:49 2010
@@ -2,7 +2,7 @@
#
# Show the tool versions
# Part of RosBE for Unix-based Operating Systems
-# Copyright 2007-2009 Colin Finck <mail(a)colinfinck.de>
+# Copyright 2007-2010 Colin Finck <colin(a)reactos.org>
#
# Released under GNU GPL v2 or any later version.
@@ -15,9 +15,9 @@
# Environment Information
rs_boldmsg "Environment Information"
-echo "Selected Target Architecture: $_ROSBE_ARCH"
+echo "Selected Target Architecture: $ROS_ARCH"
echo
# Display tool versions
rs_boldmsg "Build Tools"
-source "$_ROSBE_ROSSCRIPTDIR/$_ROSBE_ARCH/version.sh"
+source "$_ROSBE_ROSSCRIPTDIR/$ROS_ARCH/version.sh"
Modified: trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Buildtoo…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh
[iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Buildtoolchain/rosbe_1.5/buildtoolchain.sh
[iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -30,7 +30,7 @@
rs_host_cflags="-pipe -fno-common -O2 -march=pentium3 -mfpmath=sse" #
-fno-common needed for native builds due to GCC 4.4 bug according to Dmitry Gorbachev
rs_needed_tools="bison flex gcc g++ grep makeinfo" # GNU
Make has a special check
rs_target="mingw32"
-rs_target_cflags="-pipe -gstabs+ -O2 -march=pentium -mtune=i686"
+rs_target_cflags="-pipe -O2 -march=pentium -mtune=i686"
# Get the absolute path to the script directory
cd `dirname $0`
Modified: trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Cle…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] Tue Jan 26 21:17:49 2010
@@ -3,7 +3,7 @@
:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
:: FILE: Root/Clean.cmd
:: PURPOSE: Clean the ReactOS source directory.
-:: COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel(a)freenet.de>
+:: COPYRIGHT: Copyright 2010 Daniel Reimer <reimer.daniel(a)freenet.de>
:: Peter Ward <dralnix(a)gmail.com>
:: Colin Finck <colin(a)reactos.org>
::
@@ -51,50 +51,40 @@
:: Check if we have any binaries to clean, if so, clean them.
:BIN
-:: Apply modified obj and out paths for deletion.
-if "%_ROSBE_OBJPATH%" == "" (
- set OBJCLEANPATH=obj-%ROS_ARCH%
-) else (
- set OBJCLEANPATH=%_ROSBE_OBJPATH%
-)
+:: Check if the user set any custom filenames or pathes, otherwise locally set the
appropriate variables.
+if "%ROS_AUTOMAKE%" == "" (set
ROS_AUTOMAKE=makefile-%ROS_ARCH%.auto)
+if "%ROS_INTERMEDIATE%" == "" (set ROS_INTERMEDIATE=obj-%ROS_ARCH%)
+if "%ROS_OUTPUT%" == "" (set ROS_OUTPUT=output-%ROS_ARCH%)
+if "%ROS_CDOUTPUT%" == "" (set ROS_CDOUTPUT=reactos)
-if "%_ROSBE_OUTPATH%" == "" (
- set OUTCLEANPATH=output-%ROS_ARCH%
-) else (
- set OUTCLEANPATH=%_ROSBE_OUTPATH%
-)
+:: Do some basic sanity checks to verify that we are working in a ReactOS source tree.
+:: Consider that we also want to clean half-complete builds, so don't depend on too
many existing files.
+set IS_SOURCE_DIRECTORY=1
+call :BIN_CHECKEXISTENCE "%ROS_INTERMEDIATE%\." "%ROS_OUTPUT%\."
-if /i "%ROS_ARCH%" == "i386" (
- set MAKEFILE=makefile.auto
-) else (
- set MAKEFILE=makefile-%ROS_ARCH%.auto
-)
-
-if exist "%MAKEFILE%" (
- del "%MAKEFILE%" 1> NUL 2> NUL
-)
-
-if exist "%OBJCLEANPATH%\." (
+if "%IS_SOURCE_DIRECTORY%" == "1" (
echo Cleaning ReactOS %ROS_ARCH% source directory...
-
- if exist "%OBJCLEANPATH%\." (
- rd /s /q "%OBJCLEANPATH%" 1> NUL 2> NUL
- )
-
- if exist "%OUTCLEANPATH%\." (
- rd /s /q "%OUTCLEANPATH%" 1> NUL 2> NUL
- )
-
+
+ del "%ROS_AUTOMAKE%" 1>NUL 2>NUL
+ rd /s /q "%ROS_INTERMEDIATE%" 1>NUL 2>NUL
+ rd /s /q "%ROS_OUTPUT%" 1>NUL 2>NUL
+ rd /s /q "%ROS_CDOUTPUT%" 1>NUL 2>NUL
+
echo Done cleaning ReactOS %ROS_ARCH% source directory.
) else (
- echo ERROR: There is no %ROS_ARCH% compiler output to clean.
+ echo ERROR: This does not look like a ReactOS %ROS_ARCH% source directory to clean.
)
+goto :EOF
-if exist "reactos\." (
- rd /s /q "reactos" 1> NUL 2> NUL
+:: Check if all given files exist. If one does not, set IS_SOURCE_DIRECTORY to 0.
+:BIN_CHECKEXISTENCE
+if "%1" == "" (goto :EOF)
+if not exist "%1" (
+ set IS_SOURCE_DIRECTORY=0
+ goto :EOF
)
-
-goto :EOF
+shift /1
+goto :BIN_CHECKEXISTENCE %*
:EOC
title ReactOS Build Environment %_ROSBE_VERSION%
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 Jan 26 21:17:49 2010
@@ -3,8 +3,8 @@
:: LICENSE: GNU General Public License v2. (see LICENSE.txt)
:: FILE: Root/RosBE.cmd
:: PURPOSE: This script provides/sets up various build environments for
-:: ReactOS. Currently it provides a GCC 4.1.3 build environment.
-:: COPYRIGHT: Copyright 2009 Daniel Reimer <reimer.daniel(a)freenet.de>
+:: ReactOS. Currently it provides a GCC 4.4.3 build environment.
+:: COPYRIGHT: Copyright 2010 Daniel Reimer <reimer.daniel(a)freenet.de>
:: Peter Ward <dralnix(a)gmail.com>
:: Colin Finck <colin(a)reactos.org>
::