diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-09-16 15:29:21 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-09-16 15:29:21 +0000 |
commit | 9af0fb9f3511c2bdd5f6d477cb5ab63dc3624927 (patch) | |
tree | 2298db7f037e378d5ee3530d8082a2f1b42dbf38 | |
parent | 78378d2b15825efd007a67a5f3fe1d17a4f2e8ba (diff) | |
download | MPC-9af0fb9f3511c2bdd5f6d477cb5ab63dc3624927.tar.gz |
ChangeLogTag: Tue Sep 16 10:28:02 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | modules/ProjectCreator.pm | 3 | ||||
-rw-r--r-- | modules/WorkspaceCreator.pm | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 384101de..fa0e5589 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -1560,6 +1560,9 @@ sub list_generated_file { if (defined $self->{'generated_exts'}->{$gentype}->{$tag}) { my(@gen) = $self->get_component_list($gentype); my(@genexts) = $self->generated_extensions($gentype, $tag); + + $file = $self->escape_regex_special($file); + foreach my $gen (@gen) { ## If we are converting slashes, then we need to ## convert the component back to forward slashes diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index 4a209caa..35e62855 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -648,6 +648,13 @@ sub generate_hierarchy { $self->{'projects'} = \@saved; $self->{'project_info'} = \%sinfo; $self->{'workspace_name'} = $self->base_directory(); + + ## Add implict project dependencies based on source files + ## that have been used by multiple projects + if ($self->generate_implicit_project_dependencies()) { + $self->add_implicit_project_dependencies($generator, $self->getcwd()); + } + my($status, $error) = $self->write_workspace($generator); if (!$status) { print STDERR "$error\n"; @@ -672,6 +679,13 @@ sub generate_hierarchy { $self->{'projects'} = \@saved; $self->{'project_info'} = \%sinfo; $self->{'workspace_name'} = $self->base_directory(); + + ## Add implict project dependencies based on source files + ## that have been used by multiple projects + if ($self->generate_implicit_project_dependencies()) { + $self->add_implicit_project_dependencies($generator, $self->getcwd()); + } + my($status, $error) = $self->write_workspace($generator); if (!$status) { print STDERR "$error\n"; @@ -881,6 +895,7 @@ sub add_implicit_project_dependencies { my($generator) = shift; my($cwd) = shift; my(%bidir) = (); + my(%save) = (); ## Take the current working directory and regular expression'ize it. $cwd = $self->escape_regex_special($cwd); @@ -903,6 +918,7 @@ sub add_implicit_project_dependencies { $self->{'project_file_list'}->{$key}->[2], $self->{'project_file_list'}->{$ikey}->[2], \@over)) { + $save{$ikey} = $self->{'project_file_list'}->{$ikey}->[2]; $self->{'project_file_list'}->{$ikey}->[2] = \@over; if (defined $bidir{$key}) { push(@{$bidir{$key}}, $ikey); @@ -927,6 +943,12 @@ sub add_implicit_project_dependencies { } } } + + ## Restore the modified values in case this method is called again + ## which is the case when using the -hierarchy option. + foreach my $skey (keys %save) { + $self->{'project_file_list'}->{$skey}->[2] = $save{$skey}; + } } |