diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-11 13:35:14 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2002-07-11 13:35:14 +0000 |
commit | 79ee5ef94c017832940dca0bd3eda988adbe235f (patch) | |
tree | 4a855266f7e57f342a8d304772b143dc97dffd26 /bin/MakeProjectCreator | |
parent | 9574a089c9393c8c848542ee292ba5d1ba5206af (diff) | |
download | ATCD-79ee5ef94c017832940dca0bd3eda988adbe235f.tar.gz |
ChangeLogTag: Thu Jul 11 08:34:22 2002 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'bin/MakeProjectCreator')
-rw-r--r-- | bin/MakeProjectCreator/USAGE | 10 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/Driver.pm | 30 |
2 files changed, 29 insertions, 11 deletions
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 <file>] [-include <directory>] [-ti <dll | lib | dll_exe | lib_exe>:<file>] [-template <file>] [-dynamic_only] [-static_only] + [-relative NAME=VAR] [-noreldefs] [-type <bor | em3 | gnu | nma | va4 | vc6 | vc7>] [files] @@ -26,6 +27,10 @@ Usage: mwc.pl [-global <file>] [-include <directory>] -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 <file>] [-include <directory>] [-ti <dll | lib | dll_exe | lib_exe>:<file>] [-template <file>] [-dynamic_only] [-static_only] + [-relative NAME=VAR] [-noreldefs] [-type <bor | em3 | ghs | gnu | nma | va4 | vc6 | vc7>] [files] @@ -87,6 +93,10 @@ Usage: mpc.pl [-global <file>] [-include <directory>] -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 <dll | lib | dll_exe | lib_exe>:<file>]\n" . (" " x (length($base) + 8)) . "[-template <file>] " . "[-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"; + } } } |