summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-06-14 12:16:29 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-06-14 12:16:29 +0000
commit6257b13e69cd4801755d5548c914e29c2efb6a8d (patch)
treee8019b895c0f99ec924c90b4540e5dd1d3885f6a
parentb28859ab322f7675958a2ac0299508a536099d58 (diff)
downloadMPC-6257b13e69cd4801755d5548c914e29c2efb6a8d.tar.gz
ChangeLogTag: Tue Jun 14 07:15:09 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog12
-rw-r--r--config/global.mpb3
-rw-r--r--modules/Creator.pm5
-rw-r--r--modules/WorkspaceCreator.pm90
4 files changed, 76 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 0126552d..ea93aff3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Tue Jun 14 07:15:09 2005 Chad Elliott <elliott_c@ociweb.com>
+
+ * config/global.mpb:
+
+ Set libpaths to '.' since libout is set to '.' as well.
+
+ * modules/Creator.pm:
+ * modules/WorkspaceCreator.pm:
+
+ Corrected support for scoping and exclusion from within an
+ aggregated workspace.
+
Fri Jun 10 06:36:02 2005 Chad Elliott <elliott_c@ociweb.com>
* USAGE:
diff --git a/config/global.mpb b/config/global.mpb
index 4011554c..cd6b5992 100644
--- a/config/global.mpb
+++ b/config/global.mpb
@@ -2,5 +2,6 @@
// $Id$
project {
- libout = .
+ libout = .
+ libpaths = .
}
diff --git a/modules/Creator.pm b/modules/Creator.pm
index c9d1eece..8b99d0c5 100644
--- a/modules/Creator.pm
+++ b/modules/Creator.pm
@@ -396,7 +396,8 @@ sub parse_scope {
}
}
else {
- ($status, $errorString) = $self->handle_scoped_unknown($type,
+ ($status, $errorString) = $self->handle_scoped_unknown($fh,
+ $type,
$flags,
$line);
if (!$status) {
@@ -580,7 +581,6 @@ sub process_assignment {
my($value) = shift;
my($assign) = shift;
-
## If no hash table was passed in
if (!defined $assign) {
## NOTE: If anything in this block changes, then you must make the
@@ -953,6 +953,7 @@ sub handle_unknown_assignment {
sub handle_scoped_unknown {
my($self) = shift;
+ my($fh) = shift;
my($type) = shift;
my($flags) = shift;
my($line) = shift;
diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm
index c50a8bb2..d9b32c0a 100644
--- a/modules/WorkspaceCreator.pm
+++ b/modules/WorkspaceCreator.pm
@@ -103,6 +103,7 @@ sub new {
$self->{'ordering_cache'} = {};
$self->{'handled_scopes'} = {};
$self->{'generate_ins'} = $genins;
+ $self->{'scoped_basedir'} = undef;
if (defined $$exclude[0]) {
my($type) = $self->{'wctype'};
@@ -251,15 +252,10 @@ sub parse_line {
}
}
elsif ($values[0] eq 'component') {
- if ($values[1] eq 'exclude') {
- ($status, $error) = $self->parse_exclude($ih, $values[2]);
- }
- else {
- ($status, $error) = $self->parse_scope($ih,
- $values[1],
- $values[2],
- \%validNames);
- }
+ ($status, $error) = $self->parse_scope($ih,
+ $values[1],
+ $values[2],
+ \%validNames);
}
else {
$error = "Unrecognized line: $line";
@@ -344,6 +340,24 @@ sub aggregated_workspace {
}
+sub parse_scope {
+ my($self) = shift;
+ my($fh) = shift;
+ my($name) = shift;
+ my($type) = shift;
+ my($validNames) = shift;
+ my($flags) = shift;
+ my($elseflags) = shift;
+
+ if ($name eq 'exclude') {
+ return $self->parse_exclude($fh, $type);
+ }
+ else {
+ return $self->SUPER::parse_scope($fh, $name, $type,
+ $validNames, $flags, $elseflags);
+ }
+}
+
sub parse_exclude {
my($self) = shift;
my($fh) = shift;
@@ -359,7 +373,6 @@ sub parse_exclude {
my(%types) = ();
@types{split(/\s*,\s*/, $typestr)} = ();
-
## If there is a negation at all, add our
## current type, it may be removed below
if ($typestr =~ /!/) {
@@ -395,6 +408,9 @@ sub parse_exclude {
last;
}
else {
+ if (defined $self->{'scoped_basedir'}) {
+ $line = $self->{'scoped_basedir'} . '/' . $line;
+ }
push(@exclude, $line);
}
}
@@ -407,10 +423,10 @@ sub parse_exclude {
}
}
else {
- ($status, $errorString) = $self->parse_scope($fh,
- 'exclude',
- $typestr,
- \%validNames);
+ ($status, $errorString) = $self->SUPER::parse_scope($fh,
+ 'exclude',
+ $typestr,
+ \%validNames);
}
return $status, $errorString;
@@ -450,7 +466,7 @@ sub handle_scoped_end {
}
## Go back to the previous directory and add the directory contents
- ($status, $error) = $self->handle_scoped_unknown($type, $flags, '.');
+ ($status, $error) = $self->handle_scoped_unknown(undef, $type, $flags, '.');
}
$self->{'handled_scopes'}->{$type} = undef;
@@ -460,6 +476,7 @@ sub handle_scoped_end {
sub handle_scoped_unknown {
my($self) = shift;
+ my($fh) = shift;
my($type) = shift;
my($flags) = shift;
my($line) = shift;
@@ -467,6 +484,21 @@ sub handle_scoped_unknown {
my($error) = undef;
my($dupchk) = undef;
+ if ($line =~ /^\w+.*{/) {
+ if (defined $fh) {
+ my(@values) = ();
+ my($tc) = $self->{$self->{'type_check'}};
+ $self->{$self->{'type_check'}} = 1;
+ ($status, $error, @values) = $self->parse_line($fh, $line);
+ $self->{$self->{'type_check'}} = $tc;
+ }
+ else {
+ $status = 0;
+ $error = 'Unhandled line: ' . $line;
+ }
+ return $status, $error;
+ }
+
if ($type eq $aggregated) {
$line = $self->{'scoped_basedir'} . ($line ne '.' ? "/$line" : '');
my(%dup) = ();
@@ -503,9 +535,9 @@ sub handle_scoped_unknown {
@files = @acceptable;
}
- if (defined $dupchk) {
- foreach my $file (@files) {
- if (exists $$dupchk{$file}) {
+ foreach my $file (@files) {
+ if (!$self->excluded($file)) {
+ if (defined $dupchk && exists $$dupchk{$file}) {
$self->warning("Duplicate mpc file ($file) added by an " .
'aggregate workspace. It will be ignored.');
}
@@ -515,12 +547,6 @@ sub handle_scoped_unknown {
}
}
}
- else {
- foreach my $file (@files) {
- $self->{'scoped_assign'}->{$file} = $flags;
- push(@{$self->{'project_files'}}, $file);
- }
- }
}
else {
if ($line =~ /\.$wsext$/) {
@@ -528,13 +554,15 @@ sub handle_scoped_unknown {
($status, $error) = $self->aggregated_workspace($line);
}
else {
- if (defined $dupchk && exists $$dupchk{$line}) {
- $self->warning("Duplicate mpc file ($line) added by an " .
- 'aggregate workspace. It will be ignored.');
- }
- else {
- $self->{'scoped_assign'}->{$line} = $flags;
- push(@{$self->{'project_files'}}, $line);
+ if (!$self->excluded($line)) {
+ if (defined $dupchk && exists $$dupchk{$line}) {
+ $self->warning("Duplicate mpc file ($line) added by an " .
+ 'aggregate workspace. It will be ignored.');
+ }
+ else {
+ $self->{'scoped_assign'}->{$line} = $flags;
+ push(@{$self->{'project_files'}}, $line);
+ }
}
}
}