summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2002-09-23 17:08:11 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2002-09-23 17:08:11 +0000
commit10f3c216a2e7c9ed8106cee4ff83e6c9702544c3 (patch)
tree17efd1528ab41872907b13c9c5fffe1bc1d47ba1
parent8cd6102346a371eb88d1f54a81260289bfd801a6 (diff)
downloadATCD-10f3c216a2e7c9ed8106cee4ff83e6c9702544c3.tar.gz
ChangeLogTag: Mon Sep 23 12:05:38 2002 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog27
-rw-r--r--ChangeLogs/ChangeLog-03a27
-rw-r--r--bin/MakeProjectCreator/modules/BorlandProjectCreator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm8
-rw-r--r--bin/MakeProjectCreator/modules/Creator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm2
-rw-r--r--bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm6
-rw-r--r--bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm6
-rw-r--r--bin/MakeProjectCreator/modules/TemplateParser.pm8
-rw-r--r--bin/MakeProjectCreator/modules/WorkspaceCreator.pm104
10 files changed, 142 insertions, 50 deletions
diff --git a/ChangeLog b/ChangeLog
index b7a3c1d8d95..054402ad72a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,30 @@
+Mon Sep 23 12:05:38 2002 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/WorkspaceCreator.pm:
+
+ For GNU, NMake and Borland projects, create a workspace per
+ project file.
+
+ * bin/MakeProjectCreator/modules/BorlandProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/TemplateParser.pm:
+
+ Remove trailing whitespace.
+
Sun Sep 22 08:49:41 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
- * ace/Svc_Handler.cpp (flush_i): Don't flush the queued messages
- if the connection fails. Thanks to Andrew Finnell
- <andrew@activesol.net> for this fix.
+ * ace/Svc_Handler.cpp (flush_i): Don't flush the queued messages
+ if the connection fails. Thanks to Andrew Finnell
+ <andrew@activesol.net> for this fix.
Sat Sep 21 23:05:56 2002 Balachandran Natarajan <bala@cs.wustl.edu>
- * bin/subst_env.pl: Improved conversion to different coding
- styles. Thanks to Oliver Kellog for suggesting this.
+ * bin/subst_env.pl: Improved conversion to different coding
+ styles. Thanks to Oliver Kellog for suggesting this.
Fri Sep 20 13:52:23 2002 Chad Elliott <elliott_c@ociweb.com>
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index b7a3c1d8d95..054402ad72a 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,13 +1,30 @@
+Mon Sep 23 12:05:38 2002 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/WorkspaceCreator.pm:
+
+ For GNU, NMake and Borland projects, create a workspace per
+ project file.
+
+ * bin/MakeProjectCreator/modules/BorlandProjectCreator.pm:
+ * bin/MakeProjectCreator/modules/Creator.pm:
+ * bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm:
+ * bin/MakeProjectCreator/modules/TemplateParser.pm:
+
+ Remove trailing whitespace.
+
Sun Sep 22 08:49:41 2002 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu>
- * ace/Svc_Handler.cpp (flush_i): Don't flush the queued messages
- if the connection fails. Thanks to Andrew Finnell
- <andrew@activesol.net> for this fix.
+ * ace/Svc_Handler.cpp (flush_i): Don't flush the queued messages
+ if the connection fails. Thanks to Andrew Finnell
+ <andrew@activesol.net> for this fix.
Sat Sep 21 23:05:56 2002 Balachandran Natarajan <bala@cs.wustl.edu>
- * bin/subst_env.pl: Improved conversion to different coding
- styles. Thanks to Oliver Kellog for suggesting this.
+ * bin/subst_env.pl: Improved conversion to different coding
+ styles. Thanks to Oliver Kellog for suggesting this.
Fri Sep 20 13:52:23 2002 Chad Elliott <elliott_c@ociweb.com>
diff --git a/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
index 58c11239b3e..6d3769ed4f7 100644
--- a/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
+++ b/bin/MakeProjectCreator/modules/BorlandProjectCreator.pm
@@ -53,7 +53,7 @@ sub fill_value {
}
$value = join(";", sort keys %dirnames);
}
-
+
return $value;
}
diff --git a/bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm
index 84a9033f748..5b22ff642de 100644
--- a/bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/BorlandWorkspaceCreator.pm
@@ -29,6 +29,12 @@ sub workspace_file_name {
}
+sub workspace_per_project {
+ my($self) = shift;
+ return 1;
+}
+
+
sub pre_workspace {
my($self) = shift;
my($fh) = shift;
@@ -70,7 +76,7 @@ sub write_comps {
}
}
}
-
+
## These commands will work. In practicality, only the
## default configuration can be built at the top level.
print $fh ($chdir ? "\t\@cd $dir$crlf" : "") .
diff --git a/bin/MakeProjectCreator/modules/Creator.pm b/bin/MakeProjectCreator/modules/Creator.pm
index 0ed522688f9..bdfe8dd455e 100644
--- a/bin/MakeProjectCreator/modules/Creator.pm
+++ b/bin/MakeProjectCreator/modules/Creator.pm
@@ -315,7 +315,7 @@ sub get_relative {
sub windows_crlf {
- my($self) = shift;
+ my($self) = shift;
if ($^O eq 'MSWin32') {
return "\n";
}
diff --git a/bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm
index 3ff4ae8dfdb..d81f0aeccbd 100644
--- a/bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/GHSWorkspaceCreator.pm
@@ -60,7 +60,7 @@ sub write_comps {
foreach my $project (@list) {
## Convert all /'s to \
$project =~ s/\//\\/g;
-
+
print $fh "..\\$project$crlf";
if ($gen->exe_target()) {
print $fh "\tprogram$crlf";
diff --git a/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm
index 939fee923f4..c86d8db73ba 100644
--- a/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/GNUWorkspaceCreator.pm
@@ -29,6 +29,12 @@ sub workspace_file_name {
}
+sub workspace_per_project {
+ my($self) = shift;
+ return 1;
+}
+
+
sub pre_workspace {
my($self) = shift;
my($fh) = shift;
diff --git a/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm
index 59a9ba3184a..1fb9dce4805 100644
--- a/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/NMakeWorkspaceCreator.pm
@@ -36,6 +36,12 @@ sub workspace_file_name {
}
+sub workspace_per_project {
+ my($self) = shift;
+ return 1;
+}
+
+
sub pre_workspace {
my($self) = shift;
my($fh) = shift;
diff --git a/bin/MakeProjectCreator/modules/TemplateParser.pm b/bin/MakeProjectCreator/modules/TemplateParser.pm
index 844748901d8..d34873a0b27 100644
--- a/bin/MakeProjectCreator/modules/TemplateParser.pm
+++ b/bin/MakeProjectCreator/modules/TemplateParser.pm
@@ -171,7 +171,7 @@ sub adjust_value {
foreach my $part (@$parts) {
if ($part ne $$val[1] && $part ne "") {
$value .= "$part ";
- }
+ }
}
$value =~ s/^\s+//;
$value =~ s/\s+$//;
@@ -274,8 +274,8 @@ sub relative {
}
$start += length($whole);
}
- }
- }
+ }
+ }
return $value;
}
@@ -657,7 +657,7 @@ sub handle_flag_overrides {
## Given a line that starts with an identifier, we split
## then name from the possible value stored inside ()'s and
-## we stop looking at the line when we find the %> ending
+## we stop looking at the line when we find the %> ending
sub split_name_value {
my($self) = shift;
my($line) = shift;
diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
index 28054197623..e2a09c39637 100644
--- a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
+++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm
@@ -80,7 +80,16 @@ sub parse_line {
$self->generate_defaults();
## End of project; Have subclass write out the file
- $self->write_workspace();
+ ## Generate the project files
+ my($gstat, $generator) = $self->generate_project_files();
+ if ($gstat) {
+ $self->write_workspace($generator);
+ }
+ else {
+ $errorString = "ERROR: Unable to " .
+ "generate all of the project files";
+ $status = 0;
+ }
$self->{'workspace_name'} = undef;
$self->{'projects'} = [];
@@ -220,31 +229,24 @@ sub get_workspace_name {
sub write_workspace {
- my($self) = shift;
-
- ## Generate the project files
- my($status, $generator) = $self->generate_project_files();
- if ($status) {
- my($fh) = new FileHandle();
- my($name) = $self->transform_file_name($self->workspace_file_name());
- my($dir) = dirname($name);
-
- if ($dir ne ".") {
- mkpath($dir, 0, 0777);
- }
- if (open($fh, ">$name")) {
- $self->pre_workspace($fh);
- $self->write_comps($fh, $generator);
- $self->post_workspace($fh);
- close($fh);
- }
- else {
- print STDERR "ERROR: Unable to open $name for output\n";
- $status = 0;
- }
+ my($self) = shift;
+ my($generator) = shift;
+ my($status) = 1;
+ my($fh) = new FileHandle();
+ my($name) = $self->transform_file_name($self->workspace_file_name());
+ my($dir) = dirname($name);
+
+ if ($dir ne ".") {
+ mkpath($dir, 0, 0777);
+ }
+ if (open($fh, ">$name")) {
+ $self->pre_workspace($fh);
+ $self->write_comps($fh, $generator);
+ $self->post_workspace($fh);
+ close($fh);
}
else {
- print STDERR "ERROR: Unable to generate all of the project files\n";
+ print STDERR "ERROR: Unable to open $name for output\n";
$status = 0;
}
@@ -252,6 +254,23 @@ sub write_workspace {
}
+sub save_project_info {
+ my($self) = shift;
+ my($gen) = shift;
+ my($gpi) = shift;
+ my($dir) = shift;
+ my($projects) = shift;
+ my($pi) = shift;
+ my($c) = 0;
+ foreach my $pj (@$gen) {
+ my($full) = ($dir ne "." ? "$dir/" : "") . $pj;
+ push(@$projects, $full);
+ $$pi{$full} = $$gpi[$c];
+ $c++;
+ }
+}
+
+
sub generate_project_files {
my($self) = shift;
my($status) = 0;
@@ -278,16 +297,31 @@ sub generate_project_files {
## Get the individual project information and
## generated file name(s)
$gen = $generator->get_files_written();
+
+ ## If we need to generate a workspace file per project
+ ## then we generate a temporary project info and projects
+ ## array and call write_project().
+ if ($dir ne "." && $self->workspace_per_project()) {
+ my(%perpi) = ();
+ my(@perprojects) = ();
+ my($gpi) = $generator->get_project_info();
+ $self->save_project_info($gen, $gpi, $dir, \@perprojects, \%perpi);
+
+ ## Set our per project information
+ $self->{'projects'} = \@perprojects;
+ $self->{'project_info'} = \%perpi;
+
+ ## Write our per project workspace
+ $self->write_workspace();
+
+ ## Reset our project information to empty
+ $self->{'projects'} = [];
+ $self->{'project_info'} = {};
+ }
chdir($cwd);
}
my($gpi) = $generator->get_project_info();
- my($c) = 0;
- foreach my $pj (@$gen) {
- my($full) = ($dir ne "." ? "$dir/" : "") . $pj;
- push(@projects, $full);
- $pi{$full} = $$gpi[$c];
- $c++;
- }
+ $self->save_project_info($gen, $gpi, $dir, \@projects, \%pi);
}
$self->{'projects'} = \@projects;
@@ -372,7 +406,7 @@ sub sort_dependencies {
sub project_creator {
- my($self) = shift;
+ my($self) = shift;
my($str) = "$self";
## NOTE: If the subclassed WorkspaceCreator name prefix does not
@@ -405,6 +439,12 @@ sub workspace_file_name {
}
+sub workspace_per_project {
+ my($self) = shift;
+ return 0;
+}
+
+
sub pre_workspace {
my($self) = shift;
my($fh) = shift;