summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2002-06-27 14:00:44 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2002-06-27 14:00:44 +0000
commitf07e707f870cd04343443f34cec62b14f2d23eb6 (patch)
treed9d569033f30a1f0322831b3b3768966cc5d0609
parent57d72d897a7ef9e7ccb3793aaccfa10fd815e5cc (diff)
downloadATCD-f07e707f870cd04343443f34cec62b14f2d23eb6.tar.gz
Fixed cirular dependencies and VC7 missing dependencies
-rw-r--r--bin/MakeProjectCreator/modules/Driver.pm2
-rw-r--r--bin/MakeProjectCreator/modules/ProjectCreator.pm12
-rw-r--r--bin/MakeProjectCreator/modules/VC6ProjectCreator.pm35
-rw-r--r--bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm9
-rw-r--r--bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm6
5 files changed, 43 insertions, 21 deletions
diff --git a/bin/MakeProjectCreator/modules/Driver.pm b/bin/MakeProjectCreator/modules/Driver.pm
index 9fab7a7a526..c5faef73725 100644
--- a/bin/MakeProjectCreator/modules/Driver.pm
+++ b/bin/MakeProjectCreator/modules/Driver.pm
@@ -140,7 +140,7 @@ sub run {
push(@generators, $call);
}
else {
- $self->usageAndExit("Invalid type: $type");
+ $self->usageAndExit("Invalid type: $args[$i]");
}
}
elsif ($arg eq '-global') {
diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm
index fc7f552cd5b..5014561a242 100644
--- a/bin/MakeProjectCreator/modules/ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm
@@ -1167,11 +1167,6 @@ sub update_project_info {
my($value) = "";
my($arr) = ($append && defined $$pi[0] ? pop(@$pi) : []);
- ## Set up the hash table when we are starting a new project_info
- if ($append == 0) {
- $self->{'project_info_hash_table'} = {};
- }
-
## Append the values of all names into one string
my(@narr) = @$names;
for(my $i = 0; $i <= $#narr; $i++) {
@@ -1182,12 +1177,15 @@ sub update_project_info {
}
## If we haven't seen this value yet, put it on the array
- if (!defined $self->{'project_info_hash_table'}->{$value}) {
- $self->{'project_info_hash_table'}->{$value} = 1;
+ if (!defined $self->{'last_info_seen'} ||
+ "@narr" ne $self->{'last_info_seen'}) {
$self->save_project_value("@narr", $value);
push(@$arr, $value);
}
+ ## Save the last info name seen, so we don't add duplicates above.
+ $self->{'last_info_seen'} = "@narr";
+
## Always push the array back onto the project_info
push(@$pi, $arr);
}
diff --git a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
index 13ff1bea5f5..5debe0c6b3c 100644
--- a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm
@@ -18,6 +18,15 @@ use vars qw(@ISA);
@ISA = qw(ProjectCreator);
# ************************************************************
+# Data Section
+# ************************************************************
+
+my($dynamiclib) = "DLL";
+my($staticlib) = "LIB";
+my($dynamicexe) = "EXE";
+my($staticexe) = "Static EXE";
+
+# ************************************************************
# Subroutine Section
# ************************************************************
@@ -27,19 +36,19 @@ sub get_type_append {
if ($self->lib_target()) {
## Set the type_append preserving whitespace
if ($self->get_writing_type() == 1) {
- $type = " LIB";
+ $type = " $staticlib";
}
else {
- $type = " DLL";
+ $type = " $dynamiclib";
}
}
else {
## Set the type_append preserving whitespace
if ($self->get_writing_type() == 1) {
- $type = " Static EXE";
+ $type = " $staticexe";
}
else {
- $type = " EXE";
+ $type = " $dynamicexe";
}
}
return $type;
@@ -53,7 +62,7 @@ sub translate_value {
if ($key eq 'depends' && $val ne "") {
my($arr) = $self->create_array($val);
- my($app) = "DLL";
+ my($app) = $dynamiclib;
$val = "";
## Only write dependencies for non-static projects
@@ -61,11 +70,21 @@ sub translate_value {
my($wt) = $self->get_writing_type();
if ($wt == 0 || $self->exe_target()) {
if ($wt == 1) {
- $app = "LIB";
+ $app = $staticlib;
}
-
foreach my $entry (@$arr) {
- $val .= "\"$entry $app\" ";
+ my($dep) = $app;
+ ## Hack for executable dependencies
+ if ($entry =~ /exe/i) {
+ if ($wt == 1) {
+ $dep = $staticexe;
+ }
+ else {
+ $dep = $dynamicexe;
+ }
+ }
+
+ $val .= "\"$entry $dep\" ";
}
$val =~ s/\s+$//;
}
diff --git a/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm
index 5a40aa1d836..288695f3054 100644
--- a/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm
@@ -66,9 +66,12 @@ sub write_comps {
if (defined $deps && $deps ne "") {
my($darr) = $self->create_array($deps);
foreach my $dep (@$darr) {
- print $fh " Begin Project Dependency\r\n" .
- " Project_Dep_Name $dep\r\n" .
- " End Project Dependency\r\n";
+ ## Avoid cirular dependencies
+ if ($name ne $dep) {
+ print $fh " Begin Project Dependency\r\n" .
+ " Project_Dep_Name $dep\r\n" .
+ " End Project Dependency\r\n";
+ }
}
}
diff --git a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm
index 8566e142e74..8d6c58c546d 100644
--- a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm
@@ -92,8 +92,10 @@ sub write_comps {
if (!defined $val) {
$val = $dep;
}
- print $fh " {$pguid}.$i = {$val}\r\n";
- $i++;
+ if ($pguid ne $val) {
+ print $fh " {$pguid}.$i = {$val}\r\n";
+ $i++;
+ }
}
}
}