diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2004-08-26 14:18:10 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2004-08-26 14:18:10 +0000 |
commit | 99c0b03ee0271d13298ed7af037dfced5a0aea4b (patch) | |
tree | 58a5c4738a9e98ef4428d68c240db87ce7130290 | |
parent | 728b08a173f10c137db2e111bbb678a0990ffb86 (diff) | |
download | MPC-99c0b03ee0271d13298ed7af037dfced5a0aea4b.tar.gz |
ChangeLogTag: Thu Aug 26 09:14:57 2004 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 79 | ||||
-rw-r--r-- | modules/AutomakeProjectCreator.pm | 2 | ||||
-rw-r--r-- | modules/AutomakeWorkspaceCreator.pm | 2 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 52 | ||||
-rw-r--r-- | modules/VC6ProjectCreator.pm | 32 | ||||
-rw-r--r-- | modules/VC7ProjectCreator.pm | 33 | ||||
-rw-r--r-- | modules/WorkspaceCreator.pm | 40 |
7 files changed, 143 insertions, 97 deletions
@@ -1,52 +1,73 @@ +Thu Aug 26 09:14:57 2004 Chad Elliott <elliott_c@ociweb.com> + + * modules/AutomakeProjectCreator.pm: + * modules/AutomakeWorkspaceCreator.pm: + + Give proper credit to the authors of these files. + + * modules/ProjectCreator.pm: + * modules/VC6ProjectCreator.pm: + * modules/VC7ProjectCreator.pm: + + Corrected a bug where dependencies would not be placed in the + workspace when the -apply_project option was used (in conjunction + with -name_modifier). + + * modules/WorkspaceCreator.pm: + + Fixed a problem with the group circular dependency detection + algorithm. Previously, it could take days to detect a circular + dependency if there were a large number of directories. + Wed Aug 18 23:08:35 2004 J.T. Conklin <jtc@acorntoolworks.com> - * modules/AutomakeWorkspaceCreator.pm: + * modules/AutomakeWorkspaceCreator.pm: - Changed to scan the generated project files for the use of - $(ACE_ROOT), $(TAO_ROOT), etc. and provide the appropriate - definition if they are found. While this behavior is ACE/TAO - specific, there isn't much that can be done without something - like a workspace template. + Changed to scan the generated project files for the use of + $(ACE_ROOT), $(TAO_ROOT), etc. and provide the appropriate + definition if they are found. While this behavior is ACE/TAO + specific, there isn't much that can be done without something + like a workspace template. Wed Aug 18 08:56:01 2004 J.T. Conklin <jtc@acorntoolworks.com> - * templates/automake.mpd: + * templates/automake.mpd: - Changed to use am_includes, rev_avoids, and rev_requires. + Changed to use am_includes, rev_avoids, and rev_requires. - * modules/AutomakeProjectCreator.pm: + * modules/AutomakeProjectCreator.pm: - Changed fill_value to understand am_includes, rev_avoids, and - rev_requires. am_includes prepends $(srcdir) to any relative - include paths; rev_avoids and and rev_requires reverses the - order of the avoids and requires lists. This is useful for - the trailing comments after the "endif" in conditionals. + Changed fill_value to understand am_includes, rev_avoids, and + rev_requires. am_includes prepends $(srcdir) to any relative + include paths; rev_avoids and and rev_requires reverses the + order of the avoids and requires lists. This is useful for + the trailing comments after the "endif" in conditionals. Fri Aug 13 18:31:01 2004 J.T. Conklin <jtc@acorntoolworks.com> - * templates/automake.mpd: - Use INSTALL_THIS_TARGET to determine whether to use the - noinst_ prefix. + * templates/automake.mpd: + Use INSTALL_THIS_TARGET to determine whether to use the + noinst_ prefix. - * template/automakedll.mpt: - Define INSTALL_THIS_TARGET for use by automake.mpd. + * template/automakedll.mpt: + Define INSTALL_THIS_TARGET for use by automake.mpd. Fri Aug 13 10:53:57 2004 J.T. Conklin <jtc@acorntoolworks.com> - * templates/automake.mpd: - Tweak conditionals so that generated files don't have spurious - blank lines. + * templates/automake.mpd: + Tweak conditionals so that generated files don't have spurious + blank lines. Fri Aug 13 10:25:31 2004 J.T. Conklin <jtc@acorntoolworks.com> - * modules/AutomakeProjectCreator.pm: - Changed sort_files to return 1. While this is not required by - automake, it makes the resulting Makefile.am's easier to read. - This is important now that we're still hand-editing the MPC - generated files. + * modules/AutomakeProjectCreator.pm: + Changed sort_files to return 1. While this is not required by + automake, it makes the resulting Makefile.am's easier to read. + This is important now that we're still hand-editing the MPC + generated files. - * templates/automake.mpd: - Add pidl_files to headers so they'll be installed. + * templates/automake.mpd: + Add pidl_files to headers so they'll be installed. Thu Aug 12 09:42:55 2004 Chad Elliott <elliott_c@ociweb.com> diff --git a/modules/AutomakeProjectCreator.pm b/modules/AutomakeProjectCreator.pm index 588aa54c..858b1082 100644 --- a/modules/AutomakeProjectCreator.pm +++ b/modules/AutomakeProjectCreator.pm @@ -2,7 +2,7 @@ package AutomakeProjectCreator; # ************************************************************ # Description : A Automake Project Creator -# Author : Chad Elliott +# Author : J.T. Conklin & Chad Elliott # Create Date : 2/26/2003 # ************************************************************ diff --git a/modules/AutomakeWorkspaceCreator.pm b/modules/AutomakeWorkspaceCreator.pm index d5507e93..945fa069 100644 --- a/modules/AutomakeWorkspaceCreator.pm +++ b/modules/AutomakeWorkspaceCreator.pm @@ -2,7 +2,7 @@ package AutomakeWorkspaceCreator; # ************************************************************ # Description : A Automake Workspace (Makefile) creator -# Author : Chad Elliott +# Author : J.T. Conklin & Steve Huston # Create Date : 5/13/2002 # ************************************************************ diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index 3285e4cf..9b011813 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -3507,6 +3507,9 @@ sub get_modified_project_file_name { my($ext) = shift; my($nmod) = $self->get_name_modifier(); + ## We don't apply the name modifier to the project file + ## name if we have already applied it to the project name + ## since the project file name comes from the project name. if (defined $nmod && !$self->get_apply_project()) { $nmod =~ s/\*/$name/g; $name = $nmod; @@ -3537,6 +3540,34 @@ sub dependency_combined_static_library { return defined $ENV{MPC_DEPENDENCY_COMBINED_STATIC_LIBRARY}; } + +sub translate_value { + my($self) = shift; + my($key) = shift; + my($val) = shift; + + if ($key eq 'after' && $val ne '') { + my($arr) = $self->create_array($val); + $val = ''; + + if ($self->require_dependencies()) { + foreach my $entry (@$arr) { + if ($self->get_apply_project()) { + my($nmod) = $self->get_name_modifier(); + if (defined $nmod) { + $nmod =~ s/\*/$entry/g; + $entry = $nmod; + } + } + $val .= '"' . ($self->dependency_is_filename() ? + $self->project_file_name($entry) : $entry) . '" '; + } + $val =~ s/\s+$//; + } + } + return $val; +} + # ************************************************************ # Virtual Methods To Be Overridden # ************************************************************ @@ -3577,20 +3608,15 @@ sub expand_variables_from_template_values { } -sub translate_value { - my($self) = shift; - my($key) = shift; - my($val) = shift; +sub require_dependencies { + #my($self) = shift; + return 1; +} - if ($key eq 'after' && $val ne '') { - my($arr) = $self->create_array($val); - $val = ''; - foreach my $entry (@$arr) { - $val .= '"' . $self->project_file_name($entry) . '" '; - } - $val =~ s/\s+$//; - } - return $val; + +sub dependency_is_filename { + #my($self) = shift; + return 1; } diff --git a/modules/VC6ProjectCreator.pm b/modules/VC6ProjectCreator.pm index ca6bbb10..0f7533b9 100644 --- a/modules/VC6ProjectCreator.pm +++ b/modules/VC6ProjectCreator.pm @@ -33,27 +33,19 @@ sub base_project_name { } -sub translate_value { +sub require_dependencies { my($self) = shift; - my($key) = shift; - my($val) = shift; - - if ($key eq 'after' && $val ne '') { - my($arr) = $self->create_array($val); - $val = ''; - - ## Only write dependencies for non-static projects - ## and static exe projects, unless the user wants the - ## dependency combined static library. - if ($self->dependency_combined_static_library() || - $self->get_static() == 0 || $self->exe_target()) { - foreach my $entry (@$arr) { - $val .= "\"$entry\" "; - } - $val =~ s/\s+$//; - } - } - return $val; + + ## Only write dependencies for non-static projects + ## and static exe projects, unless the user wants the + ## dependency combined static library. + return ($self->get_static() == 0 || $self->exe_target() || + $self->dependency_combined_static_library()); +} + +sub dependency_is_filename { + #my($self) = shift; + return 0; } diff --git a/modules/VC7ProjectCreator.pm b/modules/VC7ProjectCreator.pm index b1eb7d58..bc1a48e0 100644 --- a/modules/VC7ProjectCreator.pm +++ b/modules/VC7ProjectCreator.pm @@ -54,27 +54,20 @@ sub file_sorter { } -sub translate_value { +sub require_dependencies { my($self) = shift; - my($key) = shift; - my($val) = shift; - - if ($key eq 'after' && $val ne '') { - my($arr) = $self->create_array($val); - $val = ''; - - ## Only write dependencies for non-static projects - ## and static exe projects, unless the user wants the - ## dependency combined static library. - if ($self->dependency_combined_static_library() || - $self->get_static() == 0 || $self->exe_target()) { - foreach my $entry (@$arr) { - $val .= '"' . $entry . '" '; - } - $val =~ s/\s+$//; - } - } - return $val; + + ## Only write dependencies for non-static projects + ## and static exe projects, unless the user wants the + ## dependency combined static library. + return ($self->get_static() == 0 || $self->exe_target() || + $self->dependency_combined_static_library()); +} + + +sub dependency_is_filename { + #my($self) = shift; + return 0; } diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index 100e3b56..66750a0f 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -1319,27 +1319,34 @@ sub sort_by_groups { my(@groups) = @$grindex; my($ccount) = 0; my($cmax) = $#groups; - - ## If we go more than twice $#groups factorial, then there is - ## a circular dependency. - my($f) = $cmax - 1; - while($f > 1) { - $cmax *= $f--; - } - $cmax = ($cmax * 2) + 1; + my($prevgi) = -1; + my($prevgrs) = []; + my($movegrs) = []; for(my $gi = 0; $gi <= $#groups; ++$gi) { + ## If our moved group equals our previously moved group then + ## we count this as a possible circular dependency. + if (defined $$movegrs[0] && defined $$prevgrs[0] && + $$movegrs[0] == $$prevgrs[0] && $$movegrs[1] == $$prevgrs[1]) { + ++$ccount; + } + else { + $ccount = 0; + } + ## Detect circular dependencies if ($ccount > $cmax) { - my($cprojs) = ''; - for(my $j = $groups[$gi]->[0]; $j <= $groups[$gi]->[1]; ++$j) { - $cprojs .= ($j != $groups[$gi]->[0] ? ', ' : '') . $$list[$j]; + my(@dirs) = (); + foreach my $mvgr (@$movegrs) { + push(@dirs, $$list[$groups[$mvgr]->[0]]); + $dirs[$#dirs] =~ s/[\/\\].*//; } $self->warning('Circular dependency detected while processing the ' . ($self->{'current_input'} eq '' ? 'default' : $self->{'current_input'}) . ' workspace. ' . - "The following projects are involved: $cprojs"); + 'The following directories are involved: ' . + join(' and ', @dirs)); return; } @@ -1355,12 +1362,20 @@ sub sort_by_groups { } } + ## Keep track of the previous group movement + $prevgrs = $movegrs; + if ($prevgi < $gi) { + $movegrs = []; + } + $prevgi = $gi; + ## Search the rest of the groups for any of the group dependencies my($moved) = 0; for(my $gj = $gi + 1; $gj <= $#groups; ++$gj) { for(my $i = $groups[$gj]->[0]; $i <= $groups[$gj]->[1]; ++$i) { if (defined $gdeps{basename($$list[$i])}) { ## Move this group ($gj) in front of the current group ($gi) + $movegrs = [$gj, $gi]; my(@save) = (); for(my $j = $groups[$gi]->[1] + 1; $j <= $groups[$gj]->[1]; ++$j) { push(@save, $$list[$j]); @@ -1398,7 +1413,6 @@ sub sort_by_groups { last; } } - ++$ccount; } } |