Author: hpoussin
Date: Fri Aug 3 15:35:01 2007
New Revision: 28124
URL:
http://svn.reactos.org/svn/reactos?rev=28124&view=rev
Log:
Add ROS_ARCH environment variable
Set -r option of rbuild as mandatory
Added:
trunk/reactos/ReactOS-i386.rbuild
- copied unchanged from r28101, trunk/reactos/ReactOS.rbuild
Removed:
trunk/reactos/ReactOS.rbuild
Modified:
trunk/reactos/Makefile
trunk/reactos/tools/rbuild/exception.cpp
trunk/reactos/tools/rbuild/exception.h
trunk/reactos/tools/rbuild/rbuild.cpp
trunk/reactos/tools/tools.mak
Modified: trunk/reactos/Makefile
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/Makefile?rev=28124&r1=…
==============================================================================
--- trunk/reactos/Makefile (original)
+++ trunk/reactos/Makefile Fri Aug 3 15:35:01 2007
@@ -48,6 +48,10 @@
#
#
# Accepted environment variables:
+#
+# ROS_ARCH
+# This variable specifies the name of the architecture to build ReactOS for.
+# The variable defaults to i386.
#
# ROS_PREFIX
# This variable specifies the prefix of the MinGW installation. On Windows
@@ -323,13 +327,19 @@
endif
endif
+ifneq ($(ROS_ARCH),)
+ ARCH := $(ROS_ARCH)
+else
+ ARCH := i386
+endif
+
ifneq ($(ROS_INTERMEDIATE),)
INTERMEDIATE := $(ROS_INTERMEDIATE)
else
ifneq ($(ROS_CDOUTPUT),)
INTERMEDIATE := obj-$(ROS_CDOUTPUT)
else
- INTERMEDIATE := obj-i386
+ INTERMEDIATE := obj-$(ARCH)
endif
endif
INTERMEDIATE_ := $(INTERMEDIATE)$(SEP)
@@ -340,7 +350,7 @@
ifneq ($(ROS_CDOUTPUT),)
OUTPUT := output-$(ROS_CDOUTPUT)
else
- OUTPUT := output-i386
+ OUTPUT := output-$(ARCH)
endif
endif
OUTPUT_ := $(OUTPUT)$(SEP)
@@ -392,7 +402,6 @@
include tools/tools.mak
include boot/freeldr/bootsect/bootsect.mak
-include $(ROS_AUTOMAKE)
-include tools/nci/nci.mak
PREAUTO := \
$(BIN2C_TARGET) \
@@ -402,17 +411,17 @@
$(BUGCODES_RC) \
$(ERRCODES_H) \
$(ERRCODES_RC) \
- $(GENDIB_DIB_FILES)
+ $(GENDIB_DIB_FILES) \
+ $(NCI_SERVICE_FILES)
POSTAUTO : \
psdk \
- $(IDL_FILES) \
- $(NCI_SERVICE_FILES)
+ $(IDL_FILES)
$(ROS_AUTOMAKE): $(RBUILD_TARGET) $(PREAUTO) $(XMLBUILDFILES)
${mkdir} $(INTERMEDIATE_)media$(SEP)inf 2>$(NUL)
$(ECHO_RBUILD)
- $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) mingw
+ $(Q)$(RBUILD_TARGET) $(ROS_RBUILDFLAGS) -rReactOS-$(ARCH).rbuild mingw
@$(MAKE) POSTAUTO
world: all bootcd livecd
Removed: trunk/reactos/ReactOS.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS.rbuild?rev=28123&a…
==============================================================================
--- trunk/reactos/ReactOS.rbuild (original)
+++ trunk/reactos/ReactOS.rbuild (removed)
@@ -1,104 +1,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
-<project name="ReactOS" makefile="makefile.auto"
xmlns:xi="http://www.w3.org/2001/XInclude">
- <xi:include href="config.rbuild">
- <xi:fallback>
- <xi:include href="config.template.rbuild" />
- </xi:fallback>
- </xi:include>
-
- <xi:include href="baseaddress.rbuild" />
-
- <define name="_M_IX86" />
- <define name="_X86_" />
- <define name="__i386__" />
- <define name="_REACTOS_" />
- <if property="MP" value="1">
- <define name="CONFIG_SMP" value="1" />
- </if>
- <if property="DBG" value="1">
- <define name="DBG" value="1" />
- <define name="_SEH_ENABLE_TRACE" />
- <property name="DBG_OR_KDBG" value="true" />
- </if>
- <if property="KDBG" value="1">
- <define name="KDBG" value="1" />
- <property name="DBG_OR_KDBG" value="true" />
- </if>
-
- <if property="GDB" value="0">
- <if property="OPTIMIZE" value="1">
- <compilerflag>-Os</compilerflag>
- <compilerflag>-ftracer</compilerflag>
- <compilerflag>-momit-leaf-frame-pointer</compilerflag>
- <compilerflag>-mpreferred-stack-boundary=2</compilerflag>
- </if>
- <if property="OPTIMIZE" value="2">
- <compilerflag>-Os</compilerflag>
- <compilerflag>-mpreferred-stack-boundary=2</compilerflag>
- </if>
- <if property="OPTIMIZE" value="3">
- <compilerflag>-O1</compilerflag>
- <compilerflag>-mpreferred-stack-boundary=2</compilerflag>
- </if>
- <if property="OPTIMIZE" value="4">
- <compilerflag>-O2</compilerflag>
- <compilerflag>-mpreferred-stack-boundary=2</compilerflag>
- </if>
- <if property="OPTIMIZE" value="5">
- <compilerflag>-O3</compilerflag>
- <compilerflag>-mpreferred-stack-boundary=2</compilerflag>
- </if>
- </if>
-
- <compilerflag>-Wno-strict-aliasing</compilerflag>
- <compilerflag>-Wpointer-arith</compilerflag>
- <linkerflag>-enable-stdcall-fixup</linkerflag>
-
- <include>.</include>
- <include>include</include>
- <include>include/psdk</include>
- <include root="intermediate">include/psdk</include>
- <include>include/dxsdk</include>
- <include>include/crt</include>
- <include>include/ddk</include>
- <include>include/GL</include>
- <include>include/ndk</include>
- <include>include/reactos</include>
- <include>include/reactos/libs</include>
-
- <directory name="base">
- <xi:include href="base/base.rbuild" />
- </directory>
- <directory name="boot">
- <xi:include href="boot/boot.rbuild" />
- </directory>
- <directory name="dll">
- <xi:include href="dll/dll.rbuild" />
- </directory>
- <directory name="drivers">
- <xi:include href="drivers/drivers.rbuild" />
- </directory>
- <directory name="hal">
- <xi:include href="hal/hal.rbuild" />
- </directory>
- <directory name="include">
- <xi:include href="include/directory.rbuild" />
- </directory>
- <directory name="lib">
- <xi:include href="lib/lib.rbuild" />
- </directory>
- <directory name="media">
- <xi:include href="media/media.rbuild" />
- </directory>
- <directory name="modules">
- <xi:include href="modules/directory.rbuild" />
- </directory>
- <directory name="ntoskrnl">
- <xi:include href="ntoskrnl/ntoskrnl.rbuild" />
- </directory>
- <directory name="subsystems">
- <xi:include href="subsystems/subsystems.rbuild" />
- </directory>
-
-</project>
Modified: trunk/reactos/tools/rbuild/exception.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/exception.cpp…
==============================================================================
--- trunk/reactos/tools/rbuild/exception.cpp (original)
+++ trunk/reactos/tools/rbuild/exception.cpp Fri Aug 3 15:35:01 2007
@@ -48,6 +48,13 @@
void Exception::SetMessageV ( const char* message, va_list args )
{
_e = ssvprintf ( message, args);
+}
+
+
+MissingArgumentException::MissingArgumentException ( const string& argument )
+ : Exception ( "Argument '%s' is missing",
+ argument.c_str () )
+{
}
Modified: trunk/reactos/tools/rbuild/exception.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/exception.h?r…
==============================================================================
--- trunk/reactos/tools/rbuild/exception.h (original)
+++ trunk/reactos/tools/rbuild/exception.h Fri Aug 3 15:35:01 2007
@@ -36,6 +36,13 @@
private:
std::string _e;
+};
+
+
+class MissingArgumentException : public Exception
+{
+public:
+ MissingArgumentException ( const std::string& argument );
};
Modified: trunk/reactos/tools/rbuild/rbuild.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.cpp (original)
+++ trunk/reactos/tools/rbuild/rbuild.cpp Fri Aug 3 15:35:01 2007
@@ -33,7 +33,7 @@
using std::vector;
static string BuildSystem;
-static string RootXmlFile = "ReactOS.rbuild";
+static string RootXmlFile;
static Configuration configuration;
bool
@@ -239,12 +239,11 @@
if ( !ParseArguments ( argc, argv ) )
{
printf ( "Generates project files for buildsystems\n\n" );
- printf ( " rbuild [switches] buildsystem\n\n" );
+ printf ( " rbuild [switches] -r{rootfile.rbuild} buildsystem\n\n" );
printf ( "Switches:\n" );
printf ( " -v Be verbose.\n" );
printf ( " -c Clean as you go. Delete generated files as soon as they
are not\n" );
printf ( " needed anymore.\n" );
- printf ( " -r{file.rbuild} Name of the root rbuild file. Default is
ReactOS.rbuild.\n" );
printf ( " -dd Disable automatic dependencies.\n" );
printf ( " -dm{module} Check only automatic dependencies for this
module.\n" );
printf ( " -ud Disable multiple source files per compilation
unit.\n" );
@@ -267,6 +266,9 @@
}
try
{
+ if ( RootXmlFile.length () == 0 )
+ throw MissingArgumentException ( "-r" );
+
string projectFilename ( RootXmlFile );
printf ( "Reading build files..." );
Modified: trunk/reactos/tools/tools.mak
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/tools.mak?rev=28124&…
==============================================================================
--- trunk/reactos/tools/tools.mak (original)
+++ trunk/reactos/tools/tools.mak Fri Aug 3 15:35:01 2007
@@ -48,6 +48,7 @@
include tools/dbgprint/dbgprint.mak
include tools/gendib/gendib.mak
include tools/mkhive/mkhive.mak
+include tools/nci/nci.mak
include tools/pefixup.mak
include tools/raddr2line.mak
include tools/rbuild/rbuild.mak