summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-08-20 12:00:43 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-08-20 12:00:43 +0000
commitfda133cc50cdb71362305d50c0560170f65ac41e (patch)
treea5aae7b004c701fb9fd38b22ff97fd77d7a02023
parent3176e3a57d5d0926810507388df21af707e708ed (diff)
downloadMPC-fda133cc50cdb71362305d50c0560170f65ac41e.tar.gz
ChangeLogTag: Wed Aug 20 06:59:52 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--modules/VC6WorkspaceCreator.pm4
-rw-r--r--modules/WorkspaceCreator.pm22
2 files changed, 21 insertions, 5 deletions
diff --git a/modules/VC6WorkspaceCreator.pm b/modules/VC6WorkspaceCreator.pm
index 921461aa..cbb1cfe8 100644
--- a/modules/VC6WorkspaceCreator.pm
+++ b/modules/VC6WorkspaceCreator.pm
@@ -61,10 +61,6 @@ sub write_comps {
my($deps) = $self->get_validated_ordering($project);
if (defined $names{$name}) {
## Having duplicate project names is an error in a VC6 Workspace.
- ## We will create the project, but we will warn the user that
- ## the project has duplicate names and will not load properly.
- print "WARNING: A project with the following name " .
- "has already been added: '$name'\n";
++$dupfound;
}
else {
diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm
index b3f32a17..4ed23b3d 100644
--- a/modules/WorkspaceCreator.pm
+++ b/modules/WorkspaceCreator.pm
@@ -470,7 +470,27 @@ sub write_workspace {
my($error) = '';
if ($self->get_toplevel()) {
- if (!$addfile) {
+ if ($addfile) {
+ ## NOTE: If support for VC6 is ever removed, then we can remove
+ ## this block of code. So far, VC6 is the only tool we support
+ ## that can not handle projects that exist in different directories
+ ## but have the same name.
+ my(%names) = ();
+ foreach my $project (@{$self->{'projects'}}) {
+ my($name) = $self->{'project_info'}->{$project}->[0];
+ if (defined $names{$name}) {
+ ## Having duplicate project names is an error in a VC6 Workspace.
+ ## We will create the project, but we will warn the user that
+ ## the project has duplicate names.
+ print "WARNING: A duplicate project named '$name' " .
+ "has already been added.\n";
+ }
+ else {
+ $names{$name} = 1;
+ }
+ }
+ }
+ else {
$self->{'per_project_workspace_name'} = 1;
}
my($name) = $self->transform_file_name($self->workspace_file_name());