From 79ee5ef94c017832940dca0bd3eda988adbe235f Mon Sep 17 00:00:00 2001 From: elliott_c Date: Thu, 11 Jul 2002 13:35:14 +0000 Subject: ChangeLogTag: Thu Jul 11 08:34:22 2002 Chad Elliott --- ChangeLog | 8 ++++++++ ChangeLogs/ChangeLog-03a | 8 ++++++++ bin/MakeProjectCreator/USAGE | 10 ++++++++++ bin/MakeProjectCreator/modules/Driver.pm | 30 +++++++++++++++++++----------- 4 files changed, 45 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4480bb3fa00..5ea3409748e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Thu Jul 11 08:34:22 2002 Chad Elliott + + * bin/MakeProjectCreator/USAGE: + * bin/MakeProjectCreator/modules/Driver.pm: + + Added new options and documentation dealing with generation of + relative paths in projects. + Wed Jul 10 11:46:02 2002 Mayur Deshpande * bin/auto_run_tests.lst: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index 4480bb3fa00..5ea3409748e 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,11 @@ +Thu Jul 11 08:34:22 2002 Chad Elliott + + * bin/MakeProjectCreator/USAGE: + * bin/MakeProjectCreator/modules/Driver.pm: + + Added new options and documentation dealing with generation of + relative paths in projects. + Wed Jul 10 11:46:02 2002 Mayur Deshpande * bin/auto_run_tests.lst: diff --git a/bin/MakeProjectCreator/USAGE b/bin/MakeProjectCreator/USAGE index e66edecf08a..31f84f51f76 100644 --- a/bin/MakeProjectCreator/USAGE +++ b/bin/MakeProjectCreator/USAGE @@ -12,6 +12,7 @@ projects for each one found. Usage: mwc.pl [-global ] [-include ] [-ti :] [-template ] [-dynamic_only] [-static_only] + [-relative NAME=VAR] [-noreldefs] [-type ] [files] @@ -26,6 +27,10 @@ Usage: mwc.pl [-global ] [-include ] -template Specifies the template name (with no extension). -dynamic_only Specifies that only dynamic projects will be generated. -static_only Specifies that only static projects will be generated. + -relative Any $() variable in an mpc that is matched to NAME + is replaced by VAR only if VAR can be made into a + relative path based on the current working directory. + -noreldefs Do not try to generate default relative definitions. -type Specifies the type of project file to generate. This option can be used multiple times to generate multiple types. @@ -73,6 +78,7 @@ project in the directory from which the script was started. Usage: mpc.pl [-global ] [-include ] [-ti :] [-template ] [-dynamic_only] [-static_only] + [-relative NAME=VAR] [-noreldefs] [-type ] [files] @@ -87,6 +93,10 @@ Usage: mpc.pl [-global ] [-include ] -template Specifies the template name (with no extension). -dynamic_only Specifies that only dynamic projects will be generated. -static_only Specifies that only static projects will be generated. + -relative Any $() variable in an mpc that is matched to NAME + is replaced by VAR only if VAR can be made into a + relative path based on the current working directory. + -noreldefs Do not try to generate default relative definitions. -type Specifies the type of project file to generate. This option can be used multiple times to generate multiple types. diff --git a/bin/MakeProjectCreator/modules/Driver.pm b/bin/MakeProjectCreator/modules/Driver.pm index bd4bc0ea324..2ca8ff71249 100644 --- a/bin/MakeProjectCreator/modules/Driver.pm +++ b/bin/MakeProjectCreator/modules/Driver.pm @@ -23,7 +23,7 @@ sub new { my(@creators) = @_; my($self) = bless {'path' => $path, 'name' => $name, - 'version' => 0.8, + 'version' => 0.9, 'types' => {}, 'creators' => \@creators, }, $class; @@ -45,7 +45,8 @@ sub usageAndExit { "[-ti :]\n" . (" " x (length($base) + 8)) . "[-template ] " . "[-dynamic_only] [-static_only]\n" . - (" " x (length($base) + 8)) . "[-relative NAME=VAR]\n" . + (" " x (length($base) + 8)) . "[-relative NAME=VAR] " . + "[-noreldefs]\n" . (" " x (length($base) + 8)) . "[-type <"; my(@keys) = sort keys %{$self->{'types'}}; @@ -73,6 +74,7 @@ sub usageAndExit { " -relative Any \$() variable in an mpc that is matched to NAME\n" . " is replaced by VAR only if VAR can be made into a\n" . " relative path based on the current working directory.\n" . +" -noreldefs Do not try to generate default relative definitions.\n" . " -type Specifies the type of project file to generate. This\n" . " option can be used multiple times to generate multiple\n" . " types.\n"; @@ -85,7 +87,7 @@ sub completion_command { my($self) = shift; my($str) = "complete $self->{'name'} " . "'c/-/(global include type template relative " . - "ti dynamic_only static_only)/' " . + "ti dynamic_only static_only noreldefs)/' " . "'c/dll:/f/' 'c/dll_exe:/f/' 'c/lib_exe:/f/' 'c/lib:/f/' " . "'n/-ti/(dll lib dll_exe lib_exe)/:' 'n/-type/("; @@ -116,6 +118,7 @@ sub run { my($static) = 1; my($signif) = 3; my(%relative) = (); + my($reldefs) = 1; ## Dynamically load in each perl module and set up ## the type tags and project creators @@ -165,6 +168,9 @@ sub run { } push(@include, $include); } + elsif ($arg eq '-noreldefs') { + $reldefs = 0; + } elsif ($arg eq '-template') { $i++; $template = $args[$i]; @@ -238,15 +244,17 @@ sub run { push(@include, $self->{'path'} . "/config"); push(@include, $self->{'path'} . "/templates"); } - if (!defined $relative{'ACE_ROOT'} && defined $ENV{ACE_ROOT}) { - $relative{'ACE_ROOT'} = $ENV{ACE_ROOT}; - } - if (!defined $relative{'TAO_ROOT'}) { - if (defined $ENV{TAO_ROOT}) { - $relative{'TAO_ROOT'} = $ENV{TAO_ROOT}; + if ($reldefs) { + if (!defined $relative{'ACE_ROOT'} && defined $ENV{ACE_ROOT}) { + $relative{'ACE_ROOT'} = $ENV{ACE_ROOT}; } - else { - $relative{'TAO_ROOT'} = "$relative{ACE_ROOT}/TAO"; + if (!defined $relative{'TAO_ROOT'}) { + if (defined $ENV{TAO_ROOT}) { + $relative{'TAO_ROOT'} = $ENV{TAO_ROOT}; + } + else { + $relative{'TAO_ROOT'} = "$relative{ACE_ROOT}/TAO"; + } } } -- cgit v1.2.1