[ros-diffs] [dreimer] 35975: unneeded ifs are a pain and make the "code" harder to read. So byebye

dreimer at svn.reactos.org dreimer at svn.reactos.org
Sat Sep 6 10:11:48 CEST 2008


Author: dreimer
Date: Sat Sep  6 03:11:47 2008
New Revision: 35975

URL: http://svn.reactos.org/svn/reactos?rev=35975&view=rev
Log:
unneeded ifs are a pain and make the "code" harder to read. So byebye

Modified:
    trunk/tools/RosBE/RosBE-Windows/Root/Clean.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/Clean.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd?rev=35975&r1=35974&r2=35975&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] Sat Sep  6 03:11:47 2008
@@ -120,29 +120,27 @@
     )
     goto :ROS
 )
-if .%ROS_ARCH%. == .. (
+
+::
+:: Check if we have something to clean, if so, clean it.
+::
+if exist "obj-i386\." (
+    echo Cleaning ReactOS source directory...
     ::
-    :: Check if we have something to clean, if so, clean it.
+    : Remove directories created by the build.
     ::
     if exist "obj-i386\." (
-        echo Cleaning ReactOS source directory...
-        ::
-        : Remove directories created by the build.
-        ::
-        if exist "obj-i386\." (
-            rd /s /q "obj-i386" 1> NUL 2> NUL
-        )
-        if exist "output-i386\." (
-            rd /s /q "output-i386" 1> NUL 2> NUL
-        )
-        if exist "makefile.auto" (
-            del "makefile.auto" 1> NUL 2> NUL
-        )
-        echo Done cleaning ReactOS source directory.
-    ) else (
-        echo ERROR: There is no compiler output to clean.
+        rd /s /q "obj-i386" 1> NUL 2> NUL
     )
-    goto :ROS
+    if exist "output-i386\." (
+        rd /s /q "output-i386" 1> NUL 2> NUL
+    )
+    if exist "makefile.auto" (
+        del "makefile.auto" 1> NUL 2> NUL
+    )
+    echo Done cleaning ReactOS source directory.
+) else (
+    echo ERROR: There is no compiler output to clean.
 )
 
 :ROS

Modified: trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd?rev=35975&r1=35974&r2=35975&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] Sat Sep  6 03:11:47 2008
@@ -15,7 +15,7 @@
 
 ::
 :: Parse the command line arguments.
-:: ROS_ARCH: Set to x86, x64, ppc or arm.
+:: ROS_ARCH: Default is i386, can be set to amd64, ppc or arm.
 :: ROS_PREFIX: Default is mingw32. ppc could be ppc-pc-mingw32,
 ::             arm arm-pc-mingw32, x64 x86_64-pc-mingw32.
 ::

Modified: trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd?rev=35975&r1=35974&r2=35975&view=diff
==============================================================================
--- 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] Sat Sep  6 03:11:47 2008
@@ -26,6 +26,10 @@
 ::
 :: Set the Arch Variables
 ::
+
+set ROS_ARCH=
+set ROS_PREFIX=
+
 if .%_ROSBE_ARCH%. == .1. (
     set ROS_ARCH=arm
     set ROS_PREFIX=arm-pc-mingw32
@@ -37,10 +41,6 @@
 if .%_ROSBE_ARCH%. == .3. (
     set ROS_ARCH=amd64
     set ROS_PREFIX=x86_64-pc-mingw32
-)
-if .%_ROSBE_ARCH%. == .. (
-    set ROS_ARCH=
-    set ROS_PREFIX=
 )
 
 ::



More information about the Ros-diffs mailing list