summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2002-07-11 13:35:14 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2002-07-11 13:35:14 +0000
commit6fe6a3a17a1be9f7f097003b1fcf3f5af0e89b13 (patch)
treeaacd9495c385dd9c4d1aeaf434794229d5e8579b
parentffa7af66488478eaa8242242d7a0877f3d09cc1f (diff)
downloadMPC-6fe6a3a17a1be9f7f097003b1fcf3f5af0e89b13.tar.gz
ChangeLogTag: Thu Jul 11 08:34:22 2002 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--modules/Driver.pm30
1 files changed, 19 insertions, 11 deletions
diff --git a/modules/Driver.pm b/modules/Driver.pm
index bd4bc0ea..2ca8ff71 100644
--- a/modules/Driver.pm
+++ b/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";
+ }
}
}