diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2003-12-22 16:32:20 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2003-12-22 16:32:20 +0000 |
commit | 8a4035a7c048680b85db52b0073c3eb00cf3c69d (patch) | |
tree | 59fb1b980b6ad7b3f286a1f8db667fbfece08f1d | |
parent | 1ae5082c83ec2c090b2e785eb860943b7cd4c28b (diff) | |
download | ATCD-8a4035a7c048680b85db52b0073c3eb00cf3c69d.tar.gz |
ChangeLogTag: Mon Dec 22 10:31:41 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 110 | ||||
-rw-r--r-- | bin/MakeProjectCreator/README | 3 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/Creator.pm | 6 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm | 27 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/ProjectCreator.pm | 72 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/VC6ProjectCreator.pm | 6 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm | 12 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/VC7ProjectCreator.pm | 6 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm | 10 | ||||
-rw-r--r-- | bin/MakeProjectCreator/modules/WorkspaceCreator.pm | 91 |
10 files changed, 220 insertions, 123 deletions
diff --git a/ChangeLog b/ChangeLog index be7545b4b39..6363ac09aa0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,40 @@ +Mon Dec 22 10:31:41 2003 Chad Elliott <elliott_c@ociweb.com> + + * bin/MakeProjectCreator/README: + + Added information about disallowing duplicate projects within a + single workspace regardless of the project type. It is nolonger + specific to the VC6 type. + + * bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm: + + Changed the workspace output to allow a user to make a specific + target within the workspace. If the user specified target + requires other projects, then those projects are built also. For + example, a user could execute "make CosNaming" using the Makefile + generated from the TAOACE.mwc file and the CosNaming library + would be built including everything else that was required to + build that library. + + * bin/MakeProjectCreator/modules/Creator.pm: + * bin/MakeProjectCreator/modules/ProjectCreator.pm: + * bin/MakeProjectCreator/modules/VC6ProjectCreator.pm: + * bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm: + * bin/MakeProjectCreator/modules/VC7ProjectCreator.pm: + * bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm: + * bin/MakeProjectCreator/modules/WorkspaceCreator.pm: + + Changed the output section of the code to only compare the + existing output file to the newly created output file only if + required by the individual project or workspace type. Currently + only VC6, EM3 (through inheritance), VC7 and VC71 (through + inheritance) use this. + Sun Dec 21 08:40:46 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> - * performance-tests/Synch-Benchmarks/Synch_Lib/Banechmark_Base.cpp: - - Fixed an annoying warning about redefinition. + * performance-tests/Synch-Benchmarks/Synch_Lib/Benchmark_Base.cpp: + + Fixed an annoying warning about redefinition. Sun Dec 21 13:55:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> @@ -12,9 +44,9 @@ Sun Dec 21 13:55:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> Sun Dec 21 10:16:43 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> - * *.bor: - Added missing Id tag to all Borland makefiles which didn't have it - yet. + * *.bor: + Added missing Id tag to all Borland makefiles which didn't have it + yet. Sun Dec 21 10:02:11 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> @@ -25,9 +57,9 @@ Sun Dec 21 10:02:11 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> Sun Dec 21 09:45:13 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> - * Kokyu/Makefile.bor: - * Kokyu/Makefile.Kokyu.bor: - Added Id tag to fix fuzz errors + * Kokyu/Makefile.bor: + * Kokyu/Makefile.Kokyu.bor: + Added Id tag to fix fuzz errors Sat Dec 20 17:51:49 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> @@ -36,58 +68,58 @@ Sat Dec 20 17:51:49 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> Sat Dec 20 14:21:13 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> - * ACEXML/*.bor: - Added missing Id tag to fix fuzz errors + * ACEXML/*.bor: + Added missing Id tag to fix fuzz errors Sat Dec 20 13:22:12 UTC 2003 Johnny Willemsen <jwillemsen@remedy.nl> - * bin/fuzz.pl: - Changed filters to the types of files a little so that a Makefile.bor is - handled as a Borland makefile. + * bin/fuzz.pl: + Changed filters to the types of files a little so that a Makefile.bor is + handled as a Borland makefile. Fri Dec 19 22:56:26 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> - * ace/RMCast/RMCast.h: - * ace/RMCast/RMCast_IO_UDP.cpp: - * ace/RMCast/RMCast_UDP_Proxy.cpp: + * ace/RMCast/RMCast.h: + * ace/RMCast/RMCast_IO_UDP.cpp: + * ace/RMCast/RMCast_UDP_Proxy.cpp: - Enums are evil, more so with broken compilers that cannot scope - enums within a class. LynxOS defines a bunch of #defines with - MT_* which starts colliding with the MT_* declaration in the - above files. Renamed the enums to be RMCAST_MT_*. Thanks to - Thomas Lockhart <Thomas.Lockhart@jpl.nasa.gov> for providing - patches to fix this. + Enums are evil, more so with broken compilers that cannot scope + enums within a class. LynxOS defines a bunch of #defines with + MT_* which starts colliding with the MT_* declaration in the + above files. Renamed the enums to be RMCAST_MT_*. Thanks to + Thomas Lockhart <Thomas.Lockhart@jpl.nasa.gov> for providing + patches to fix this. Fri Dec 19 22:34:42 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu> - * ace/INET_Addr.i: + * ace/INET_Addr.i: - Fix for [BUGID 1688]. Please see + Fix for [BUGID 1688]. Please see - http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1688 + http://deuce.doc.wustl.edu/bugzilla/show_bug.cgi?id=1688 - for more details. Thanks to Gary Maxey <gary.maxey@hp.com> for - the patch. + for more details. Thanks to Gary Maxey <gary.maxey@hp.com> for + the patch. Fri Dec 19 11:57:20 2003 Steve Huston <shuston@riverace.com> - * tests/Sigset_Ops_Test.cpp: Add an optional can_miss parameter to - the siglistset() function; defaults to 0 (current behavior). Pass - it as 1 when the full (sigfillset) set is being tested because - there's no guarantee that all signals from 1-ACE_NSIG are legit - and set in the sigset. This is true on Red Hat Linux w/ NPTL - (Redhat 9 and Enterprise Linux 3, for example). Thanks to - Roger Beathard (rbeathar@cisco.com) for reporting this issue. + * tests/Sigset_Ops_Test.cpp: Add an optional can_miss parameter to + the siglistset() function; defaults to 0 (current behavior). Pass + it as 1 when the full (sigfillset) set is being tested because + there's no guarantee that all signals from 1-ACE_NSIG are legit + and set in the sigset. This is true on Red Hat Linux w/ NPTL + (Redhat 9 and Enterprise Linux 3, for example). Thanks to + Roger Beathard (rbeathar@cisco.com) for reporting this issue. - * tests/Makefile.tests: Added TSS_Static_Test. + * tests/Makefile.tests: Added TSS_Static_Test. Fri Dec 19 08:43:44 2003 Douglas C. Schmidt <schmidt@ace.cs.wustl.edu> - * ace/Malloc_T.cpp: Reformatted some of the code to conform to - ACE guidelines. In particular, stuff like this: + * ace/Malloc_T.cpp: Reformatted some of the code to conform to + ACE guidelines. In particular, stuff like this: if ((this->lock_ = ACE_Malloc_Lock_Adapter_T<ACE_LOCK> ()(pool_name)) == 0) - return; + return; should be written like this: diff --git a/bin/MakeProjectCreator/README b/bin/MakeProjectCreator/README index 20a157a3385..30e2983f127 100644 --- a/bin/MakeProjectCreator/README +++ b/bin/MakeProjectCreator/README @@ -94,6 +94,9 @@ project (workspace) name contains a capital letter then each word will be capitalized. For instance, if the above mpc file example was named Example.mpc, then the modified project name would be Example_Client. +If multiple projects are going to be contained within a single workspace +(using mwc.pl), there can be no duplication of project names. This is +disallowed due to limitations of some workspace tools. Project Keywords ---------------- diff --git a/bin/MakeProjectCreator/modules/Creator.pm b/bin/MakeProjectCreator/modules/Creator.pm index 28ed2db3075..b063322450d 100644 --- a/bin/MakeProjectCreator/modules/Creator.pm +++ b/bin/MakeProjectCreator/modules/Creator.pm @@ -769,6 +769,12 @@ sub get_name_modifier { # Virtual Methods To Be Overridden # ************************************************************ +sub compare_output { + #my($self) = shift; + return 0; +} + + sub handle_scoped_end { #my($self) = shift; #my($type) = shift; diff --git a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm index 40fca8eebd5..9ba8da19926 100644 --- a/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/GNUACEWorkspaceCreator.pm @@ -76,9 +76,8 @@ sub write_comps { my($crlf) = $self->crlf(); my($projects) = $self->get_projects(); my(%targnum) = (); - my(@list) = $self->number_target_deps($projects, - $self->get_project_info(), - \%targnum); + my($pjs) = $self->get_project_info(); + my(@list) = $self->number_target_deps($projects, $pjs, \%targnum); ## Only use the list if there is more than one project if ($#list > 0) { @@ -91,14 +90,17 @@ sub write_comps { " KEEP_GOING = 1$crlf" . "else$crlf" . " KEEP_GOING = 0$crlf" . - "endif$crlf$crlf"; + "endif$crlf"; ## Print out each of the individual targets foreach my $project (@list) { - print $fh "\%.tgt$count:"; + my($pjname) = $$pjs{$project}->[0]; + print $fh "$crlf$pjname: all.$pjname$crlf$crlf" . + "%.$pjname:"; if (defined $targnum{$project}) { foreach my $number (@{$targnum{$project}}) { - print $fh " %.tgt$number"; + print $fh ' %.' . + $$pjs{$list[$number]}->[0]; } } my($cmd) = "\@\$(MAKE) -f " . basename($project) . ' -C ' . dirname($project) . " \$(*);$crlf"; @@ -118,7 +120,7 @@ sub write_comps { my($splitter) = 0; print $fh "$crlf$crlf$target:"; for(my $i = 0; $i < $count; ++$i) { - print $fh " $target.tgt$i"; + print $fh " $target." . $$pjs{$list[$i]}->[0]; ++$splitter; if ($i != $count - 1 && $splitter == $cutoff) { print $fh " \\$crlf " . (' ' x $tlen); @@ -136,7 +138,7 @@ sub write_comps { my($splitter) = 0; print $fh "$crlf$crlf$target:"; for(my $i = $count - 1; $i >= 0; --$i) { - print $fh " realclean.tgt$i"; + print $fh ' realclean.' . $$pjs{$list[$i]}->[0]; ++$splitter; if ($i != 0 && $splitter == $cutoff) { print $fh " \\$crlf " . (' ' x $tlen); @@ -144,6 +146,7 @@ sub write_comps { } } } + print $fh "$crlf$crlf"; } else { ## Otherwise, just list the call to make without a for loop @@ -154,9 +157,15 @@ sub write_comps { "\$(TARGETS_NESTED):$crlf" . "\t\@\$(MAKE) -f $base " . ($dir ne '.' ? "-C $dir " : '') . "\$(\@);$crlf$crlf" . + $$pjs{$list[0]}->[0] . ": all$crlf$crlf" . "reverseclean:$crlf" . "\t\@\$(MAKE) -f $base " . ($dir ne '.' ? "-C $dir " : '') . - "realclean$crlf"; + "realclean$crlf$crlf"; + } + + print $fh "project_name_list:$crlf"; + foreach my $project (@list) { + print $fh "\t\@echo $$pjs{$project}->[0]$crlf"; } } diff --git a/bin/MakeProjectCreator/modules/ProjectCreator.pm b/bin/MakeProjectCreator/modules/ProjectCreator.pm index db22fd21c16..e7455f10969 100644 --- a/bin/MakeProjectCreator/modules/ProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/ProjectCreator.pm @@ -2037,43 +2037,59 @@ sub write_output_file { mkpath($dir, 0, 0777); } - ## First write the output to a temporary file - my($tmp) = "MPC$>.$$"; - my($different) = 1; - if (open($fh, ">$tmp")) { - my($lines) = $tp->get_lines(); - foreach my $line (@$lines) { - print $fh $line; - } - close($fh); + if ($self->compare_output()) { + ## First write the output to a temporary file + my($tmp) = "MPC$>.$$"; + my($different) = 1; + if (open($fh, ">$tmp")) { + my($lines) = $tp->get_lines(); + foreach my $line (@$lines) { + print $fh $line; + } + close($fh); - if (-r $name && - -s $tmp == -s $name && compare($tmp, $name) == 0) { - $different = 0; + if (-r $name && + -s $tmp == -s $name && compare($tmp, $name) == 0) { + $different = 0; + } + } + else { + $error = "ERROR: Unable to open $tmp for output."; + $status = 0; } - } - else { - $error = "ERROR: Unable to open $tmp for output."; - $status = 0; - } - if ($status) { - ## If they are different, then rename the temporary file - if ($different) { - unlink($name); - if (rename($tmp, $name)) { - $self->add_file_written($name); + if ($status) { + ## If they are different, then rename the temporary file + if ($different) { + unlink($name); + if (rename($tmp, $name)) { + $self->add_file_written($name); + } + else { + $error = "ERROR: Unable to open $name for output."; + $status = 0; + } } else { - $error = "ERROR: Unable to open $name for output."; - $status = 0; + ## We will pretend that we wrote the file + unlink($tmp); + $self->add_file_written($name); } } - else { - ## We will pretend that we wrote the file - unlink($tmp); + } + else { + if (open($fh, ">$name")) { + my($lines) = $tp->get_lines(); + foreach my $line (@$lines) { + print $fh $line; + } + close($fh); $self->add_file_written($name); } + else { + $error = "ERROR: Unable to open $name for output."; + $status = 0; + } } } } diff --git a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm index 90ca66ce1f2..64d125cf692 100644 --- a/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/VC6ProjectCreator.pm @@ -21,6 +21,12 @@ use vars qw(@ISA); # Subroutine Section # ************************************************************ +sub compare_output { + #my($self) = shift; + return 1; +} + + sub base_project_name { my($self) = shift; return $self->transform_file_name($self->project_name()); diff --git a/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm index f3783754011..b80c2675703 100644 --- a/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/VC6WorkspaceCreator.pm @@ -23,6 +23,12 @@ use vars qw(@ISA); # ************************************************************ +sub compare_output { + #my($self) = shift; + return 1; +} + + sub crlf { my($self) = shift; return $self->windows_crlf(); @@ -47,12 +53,6 @@ sub pre_workspace { } -sub allow_duplicates { - #my($self) = shift; - return 0; -} - - sub write_comps { my($self) = shift; my($fh) = shift; diff --git a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm index bb3b970f365..f88e87415b1 100644 --- a/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm +++ b/bin/MakeProjectCreator/modules/VC7ProjectCreator.pm @@ -22,6 +22,12 @@ use vars qw(@ISA); # Subroutine Section # ************************************************************ +sub compare_output { + #my($self) = shift; + return 1; +} + + sub file_sorter { my($self) = shift; my($left) = shift; diff --git a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm index 521939a65e7..a1530429332 100644 --- a/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/VC7WorkspaceCreator.pm @@ -22,6 +22,12 @@ use vars qw(@ISA); # Subroutine Section # ************************************************************ +sub compare_output { + #my($self) = shift; + return 1; +} + + sub crlf { my($self) = shift; return $self->windows_crlf(); @@ -76,7 +82,7 @@ sub print_dependencies { my($pjs) = shift; my($crlf) = $self->crlf(); - ## I hate to add yet another loop through all the projects, but + ## I hate to add yet another loop through all the projects, but ## we must have some way to map plain project names to guids. my(%name_to_guid_map) = (); foreach my $project(@$list) { @@ -115,7 +121,7 @@ sub write_comps { my(@list) = $self->sort_dependencies($projects, $pjs); my($crlf) = $self->crlf(); - ## I hate to add yet another loop through all the projects, but + ## I hate to add yet another loop through all the projects, but ## we must have some way to map plain project names to guids. my(%name_to_guid_map) = (); foreach my $project(@list) { diff --git a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm index 485363f08db..55322e3e669 100644 --- a/bin/MakeProjectCreator/modules/WorkspaceCreator.pm +++ b/bin/MakeProjectCreator/modules/WorkspaceCreator.pm @@ -484,8 +484,8 @@ sub write_workspace { if ($self->get_toplevel()) { if ($addfile) { - ## VC6 is the only tool that currently cannot work with duplicate names, but - ## duplicates really don't make sense for anything but Makefile-style projects. + ## To be consistent across multiple project types, we disallow + ## duplicate project names for all types, not just VC6. ## Note that these name are handled case-insensitive by VC6 my(%names) = (); foreach my $project (@{$self->{'projects'}}) { @@ -506,8 +506,9 @@ sub write_workspace { my($name) = $self->transform_file_name($self->workspace_file_name()); my($abort_creation) = 0; - if ($duplicates > 0 && !$self->allow_duplicates()) { - print "ERROR: Duplicates not allowed.\n"; + if ($duplicates > 0) { + print "ERROR: Duplicate project names are " . + "not allowed within a workspace.\n"; $abort_creation = 1; } else { @@ -530,46 +531,64 @@ sub write_workspace { mkpath($dir, 0, 0777); } - ## First write the output to a temporary file - my($tmp) = "MWC$>.$$"; - my($different) = 1; - if (open($fh, ">$tmp")) { - $self->pre_workspace($fh); - $self->write_comps($fh, $creator); - $self->post_workspace($fh); - close($fh); - - if (-r $name && - -s $tmp == -s $name && compare($tmp, $name) == 0) { - $different = 0; + if ($self->compare_output()) { + ## First write the output to a temporary file + my($tmp) = "MWC$>.$$"; + my($different) = 1; + if (open($fh, ">$tmp")) { + $self->pre_workspace($fh); + $self->write_comps($fh, $creator); + $self->post_workspace($fh); + close($fh); + + if (-r $name && + -s $tmp == -s $name && compare($tmp, $name) == 0) { + $different = 0; + } + } + else { + $error = "ERROR: Unable to open $tmp for output."; + $status = 0; } - } - else { - $error = "ERROR: Unable to open $tmp for output."; - $status = 0; - } - if ($status) { - if ($different) { - unlink($name); - if (rename($tmp, $name)) { - if ($addfile) { - $self->add_file_written($name); + if ($status) { + if ($different) { + unlink($name); + if (rename($tmp, $name)) { + if ($addfile) { + $self->add_file_written($name); + } + } + else { + $error = 'ERROR: Unable to open ' . $self->getcwd() . + "/$name for output"; + $status = 0; } } else { - $error = 'ERROR: Unable to open ' . $self->getcwd() . - "/$name for output"; - $status = 0; + ## We will pretend that we wrote the file + unlink($tmp); + if ($addfile) { + $self->add_file_written($name); + } } } - else { - ## We will pretend that we wrote the file - unlink($tmp); + } + else { + if (open($fh, ">$name")) { + $self->pre_workspace($fh); + $self->write_comps($fh, $creator); + $self->post_workspace($fh); + close($fh); + if ($addfile) { $self->add_file_written($name); } } + else { + $error = "ERROR: Unable to open $name for output."; + $status = 0; + } } } else { @@ -1422,12 +1441,6 @@ sub generate_implicit_project_dependencies { } -sub allow_duplicates { - #my($self) = shift; - return 1; -} - - sub workspace_file_name { #my($self) = shift; return ''; |