-mi switch for rbuild to not have rbuild create install directories.
authorCasper Hornstrup <chorns@users.sourceforge.net>
Sat, 28 May 2005 18:43:25 +0000 (18:43 +0000)
committerCasper Hornstrup <chorns@users.sourceforge.net>
Sat, 28 May 2005 18:43:25 +0000 (18:43 +0000)
svn path=/trunk/; revision=15599

reactos/tools/rbuild/backend/mingw/mingw.cpp
reactos/tools/rbuild/configuration.cpp
reactos/tools/rbuild/rbuild.cpp
reactos/tools/rbuild/rbuild.h

index 45095a6..4c709bb 100644 (file)
@@ -670,7 +670,8 @@ MingwBackend::GenerateDirectories ()
        printf ( "Creating directories..." );
        intermediateDirectory->GenerateTree ( "", configuration.Verbose );
        outputDirectory->GenerateTree ( "", configuration.Verbose );
        printf ( "Creating directories..." );
        intermediateDirectory->GenerateTree ( "", configuration.Verbose );
        outputDirectory->GenerateTree ( "", configuration.Verbose );
-       installDirectory->GenerateTree ( "", configuration.Verbose );
+       if ( !configuration.MakeHandlesInstallDirectories )
+               installDirectory->GenerateTree ( "", configuration.Verbose );
        printf ( "done\n" );
 }
 
        printf ( "done\n" );
 }
 
index 64bd3b7..ec06521 100644 (file)
@@ -8,6 +8,7 @@ Configuration::Configuration ()
        Verbose = false;
        CleanAsYouGo = false;
        AutomaticDependencies = true;
        Verbose = false;
        CleanAsYouGo = false;
        AutomaticDependencies = true;
+       MakeHandlesInstallDirectories = false;
 }
 
 Configuration::~Configuration ()
 }
 
 Configuration::~Configuration ()
index 6502145..4862559 100644 (file)
@@ -20,10 +20,27 @@ static string BuildSystem;
 static string RootXmlFile = "ReactOS.xml";
 static Configuration configuration;
 
 static string RootXmlFile = "ReactOS.xml";
 static Configuration configuration;
 
+bool
+ParseMakeSwitch ( char switchChar2 )
+{
+       switch ( switchChar2 )
+       {
+               case 'i':
+                       configuration.MakeHandlesInstallDirectories = true;
+                       break;
+               default:
+                       printf ( "Unknown switch -m%c",
+                                switchChar2 );
+                       return false;
+       }
+       return true;
+}
+
 bool
 ParseSwitch ( int argc, char** argv, int index )
 {
 bool
 ParseSwitch ( int argc, char** argv, int index )
 {
-       char switchChar = argv[index][1];
+       char switchChar = strlen ( argv[index] ) > 1 ? argv[index][1] : ' ';
+       char switchChar2 = strlen ( argv[index] ) > 2 ? argv[index][2] : ' ';
        switch ( switchChar )
        {
                case 'v':
        switch ( switchChar )
        {
                case 'v':
@@ -38,6 +55,8 @@ ParseSwitch ( int argc, char** argv, int index )
                case 'r':
                        RootXmlFile = string(&argv[index][2]);
                        break;
                case 'r':
                        RootXmlFile = string(&argv[index][2]);
                        break;
+               case 'm':
+                       return ParseMakeSwitch ( switchChar2 );
                default:
                        printf ( "Unknown switch -%c",
                                 switchChar );
                default:
                        printf ( "Unknown switch -%c",
                                 switchChar );
@@ -72,12 +91,13 @@ main ( int argc, char** argv )
        if ( !ParseArguments ( argc, argv ) )
        {
                printf ( "Generates project files for buildsystems\n\n" );
        if ( !ParseArguments ( argc, argv ) )
        {
                printf ( "Generates project files for buildsystems\n\n" );
-               printf ( "  rbuild [-v] [-rfile.xml] buildsystem\n\n" );
+               printf ( "  rbuild [switches] buildsystem\n\n" );
                printf ( "Switches:\n" );
                printf ( "Switches:\n" );
-               printf ( "  -v           Be verbose\n" );
-               printf ( "  -c           Clean as you go. Delete generated files as soon as they are not needed anymore\n" );
+               printf ( "  -v           Be verbose.\n" );
+               printf ( "  -c           Clean as you go. Delete generated files as soon as they are not needed anymore.\n" );
                printf ( "  -d           Disable automatic dependencies.\n" );
                printf ( "  -d           Disable automatic dependencies.\n" );
-               printf ( "  -rfile.xml   Name of the root xml file. Default is ReactOS.xml\n" );
+               printf ( "  -rfile.xml   Name of the root xml file. Default is ReactOS.xml.\n" );
+               printf ( "  -mi          Let make handle creation of install directories. Rbuild will not generate the directories.\n" );
                printf ( "\n" );
                printf ( "  buildsystem  Target build system. Can be one of:\n" );
                printf ( "                 mingw   MinGW\n" );
                printf ( "\n" );
                printf ( "  buildsystem  Target build system. Can be one of:\n" );
                printf ( "                 mingw   MinGW\n" );
index 5e8c982..561c3a0 100644 (file)
@@ -76,6 +76,7 @@ public:
        bool Verbose;
        bool CleanAsYouGo;
        bool AutomaticDependencies;
        bool Verbose;
        bool CleanAsYouGo;
        bool AutomaticDependencies;
+       bool MakeHandlesInstallDirectories;
 };
 
 class Environment
 };
 
 class Environment