Add ROS_ARCH environment variable
[reactos.git] / reactos / tools / rbuild / rbuild.cpp
index e49f3ad..abe255f 100644 (file)
@@ -33,7 +33,7 @@ using std::string;
 using std::vector;
 
 static string BuildSystem;
-static string RootXmlFile = "ReactOS.rbuild";
+static string RootXmlFile;
 static Configuration configuration;
 
 bool
@@ -239,12 +239,11 @@ main ( int argc, char** argv )
        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" );
@@ -256,17 +255,20 @@ main ( int argc, char** argv )
                printf ( "  -vo{version|configuration} Adds subdirectory path to the default Intermediate-Outputdirectory.\n" );
                printf ( "\n" );
                printf ( "  buildsystem   Target build system. Can be one of:\n" );
-               std::map<std::string,Backend::Factory*>::iterator iter;
-               for (iter = Backend::Factory::map_begin(); iter != Backend::Factory::map_end(); iter++)
-               {
-                       Backend::Factory *factory = iter->second;
-                       printf ( "                %-10s %s\n", factory->Name(), factory->Description());
-               }
+
+               std::map<std::string,Backend::Factory*>::iterator iter;
+               for (iter = Backend::Factory::map_begin(); iter != Backend::Factory::map_end(); iter++)
+               {
+                       Backend::Factory *factory = iter->second;
+                       printf ( "                %-10s %s\n", factory->Name(), factory->Description());
+               }
                return 1;
        }
        try
        {
+               if ( RootXmlFile.length () == 0 )
+                       throw MissingArgumentException ( "-r" );
+
                string projectFilename ( RootXmlFile );
 
                printf ( "Reading build files..." );