From: Casper Hornstrup Date: Sat, 28 May 2005 18:43:25 +0000 (+0000) Subject: -mi switch for rbuild to not have rbuild create install directories. X-Git-Tag: backups/new_headers@23355^2~10 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=8d5843e40644bbf1c68d2ba8cee79c5898497aa2 -mi switch for rbuild to not have rbuild create install directories. svn path=/trunk/; revision=15599 --- diff --git a/reactos/tools/rbuild/backend/mingw/mingw.cpp b/reactos/tools/rbuild/backend/mingw/mingw.cpp index 45095a6dfb0..4c709bbba56 100644 --- a/reactos/tools/rbuild/backend/mingw/mingw.cpp +++ b/reactos/tools/rbuild/backend/mingw/mingw.cpp @@ -670,7 +670,8 @@ MingwBackend::GenerateDirectories () 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" ); } diff --git a/reactos/tools/rbuild/configuration.cpp b/reactos/tools/rbuild/configuration.cpp index 64bd3b76063..ec06521d066 100644 --- a/reactos/tools/rbuild/configuration.cpp +++ b/reactos/tools/rbuild/configuration.cpp @@ -8,6 +8,7 @@ Configuration::Configuration () Verbose = false; CleanAsYouGo = false; AutomaticDependencies = true; + MakeHandlesInstallDirectories = false; } Configuration::~Configuration () diff --git a/reactos/tools/rbuild/rbuild.cpp b/reactos/tools/rbuild/rbuild.cpp index 65021458600..48625592bde 100644 --- a/reactos/tools/rbuild/rbuild.cpp +++ b/reactos/tools/rbuild/rbuild.cpp @@ -20,10 +20,27 @@ static string BuildSystem; 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 ) { - 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': @@ -38,6 +55,8 @@ ParseSwitch ( int argc, char** argv, int index ) case 'r': RootXmlFile = string(&argv[index][2]); break; + case 'm': + return ParseMakeSwitch ( switchChar2 ); 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" ); - printf ( " rbuild [-v] [-rfile.xml] buildsystem\n\n" ); + printf ( " rbuild [switches] 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 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 ( " -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" ); diff --git a/reactos/tools/rbuild/rbuild.h b/reactos/tools/rbuild/rbuild.h index 5e8c982c89f..561c3a0f04b 100644 --- a/reactos/tools/rbuild/rbuild.h +++ b/reactos/tools/rbuild/rbuild.h @@ -76,6 +76,7 @@ public: bool Verbose; bool CleanAsYouGo; bool AutomaticDependencies; + bool MakeHandlesInstallDirectories; }; class Environment