diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2009-08-31 16:45:37 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2009-08-31 16:45:37 +0000 |
commit | 8c0c212677f751cde248de061ca8394a47ecea1d (patch) | |
tree | 4befd28c95fc19ab03dbb271f4f9683423f181ac | |
parent | 011ff8d26886b555ef19b21a71d97f75b52600b3 (diff) | |
download | MPC-8c0c212677f751cde248de061ca8394a47ecea1d.tar.gz |
ChangeLogTag: Mon Aug 31 16:41:00 UTC 2009 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r-- | ChangeLog | 35 | ||||
-rw-r--r-- | PROBLEM-REPORT-FORM | 4 | ||||
-rw-r--r-- | modules/BCB2007ProjectCreator.pm | 2 | ||||
-rw-r--r-- | modules/BCB2007WorkspaceCreator.pm | 2 | ||||
-rw-r--r-- | modules/ConfigParser.pm | 5 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 51 | ||||
-rw-r--r-- | modules/TemplateParser.pm | 6 | ||||
-rw-r--r-- | modules/WB26ProjectCreator.pm | 2 | ||||
-rw-r--r-- | modules/WorkspaceCreator.pm | 21 |
9 files changed, 89 insertions, 39 deletions
@@ -1,3 +1,36 @@ +Mon Aug 31 16:41:00 UTC 2009 Chad Elliott <elliott_c@ociweb.com> + + * PROBLEM-REPORT-FORM: + + Updated URLs. + + * modules/BCB2007ProjectCreator.pm: + * modules/BCB2007WorkspaceCreator.pm: + * modules/ConfigParser.pm: + + Corrected comments. + + * modules/ProjectCreator.pm: + + Alphabetized the keywords (which makes it easier when updating + documentation). Updated comments and added a minor performance + enhancment. + + * modules/TemplateParser.pm: + + Fixed a bug where 'features' used in a template would get confused + with template scopes. + + * modules/WB26ProjectCreator.pm: + + If the user overrides the template, still provide a valid project + file name in the project_file_name() method. + + * modules/WorkspaceCreator.pm: + + Fixed a bug where duplicate mpc files added by aggregated + workspaces would not be correctly ignored. + Tue Aug 25 12:22:59 UTC 2009 Chad Elliott <elliott_c@ociweb.com> * config/qt4_core.mpb: @@ -188,7 +221,7 @@ Tue Aug 11 16:08:20 UTC 2009 Chad Elliott <elliott_c@ociweb.com> * docs/html/MakeProjectCreator.html: - Added a Id tag + Added an Id tag. * modules/ProjectCreator.pm: diff --git a/PROBLEM-REPORT-FORM b/PROBLEM-REPORT-FORM index b02d0a9f..34d2c75a 100644 --- a/PROBLEM-REPORT-FORM +++ b/PROBLEM-REPORT-FORM @@ -1,13 +1,13 @@ Documentation for MPC can be found at the following location. - http://downloads.ociweb.com/MPC/ + http://downloads.ociweb.com/MPC/docs/html/MakeProjectCreator.html Please consult the documentation to ensure that you are using MPC correctly. If you are still having a problem getting MPC to do what you want, please consult the FAQ before sending a support request. - http://www.ociweb.com/products/mpc/faq.html + http://www.ociweb.com/products/mpc/mpc-faq When requesting MPC support please provide the following items: diff --git a/modules/BCB2007ProjectCreator.pm b/modules/BCB2007ProjectCreator.pm index ead8b1c1..298a09a9 100644 --- a/modules/BCB2007ProjectCreator.pm +++ b/modules/BCB2007ProjectCreator.pm @@ -1,7 +1,7 @@ package BCB2007ProjectCreator; # ************************************************************ -# Description : The Borland Developer Studio 4 Project Creator +# Description : The Borland C++ Builder 2007 Project Creator # Author : Johnny Willemsen # Create Date : 14/12/2005 # ************************************************************ diff --git a/modules/BCB2007WorkspaceCreator.pm b/modules/BCB2007WorkspaceCreator.pm index 28abe34a..50a31cf7 100644 --- a/modules/BCB2007WorkspaceCreator.pm +++ b/modules/BCB2007WorkspaceCreator.pm @@ -1,7 +1,7 @@ package BCB2007WorkspaceCreator; # ************************************************************ -# Description : A BDS 4 Workspace Creator +# Description : A BCB2007 Workspace Creator # Author : Johnny Willemsen # Create Date : 14/12/2005 # ************************************************************ diff --git a/modules/ConfigParser.pm b/modules/ConfigParser.pm index 17b33320..ae90bb35 100644 --- a/modules/ConfigParser.pm +++ b/modules/ConfigParser.pm @@ -49,13 +49,14 @@ sub parse_line { $name =~ s/\s+$//; ## Pre-process the name and value - $name = $self->preprocess($name); my $value = $self->preprocess($clean); + $name = $self->preprocess($name); $name =~ s/\\/\//g; ## Store the name value pair if (!defined $self->{'valid'}) { - ## There are no valid names, so all names are valid. + ## There are no valid names, so all names are valid, except an + ## empty name. if ($name ne '') { $self->{'values'}->{$name} = $value; $self->{'clean'}->{$name} = $clean; diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm index c6b783b9..e1d5e011 100644 --- a/modules/ProjectCreator.pm +++ b/modules/ProjectCreator.pm @@ -42,36 +42,36 @@ my $static_libs_feature = 'static_libs_only'; ## 0 Preserve the order for additions (1) or invert it (0) ## 1 Add this value to template input value (if there is one) ## 2 Preserve <% %> settings for evaluation within the template -my %validNames = ('exename' => 1, - 'sharedname' => 1, - 'staticname' => 1, - 'libpaths' => 3, - 'recursive_libpaths' => 3, +my %validNames = ('after' => 1, + 'avoids' => 3, + 'custom_only' => 1, + 'dllout' => 1, + 'dynamicflags' => 3, + 'exename' => 1, 'exeout' => 1, 'includes' => 3, - 'recursive_includes' => 3, - 'after' => 1, - 'custom_only' => 1, + 'libout' => 1, + 'libpaths' => 3, 'libs' => 2, 'lit_libs' => 2, + 'macros' => 3, 'managed' => 1, - 'pure_libs' => 2, 'pch_header' => 1, 'pch_source' => 1, - 'prebuild' => 5, 'postbuild' => 5, 'postclean' => 5, - 'dllout' => 1, - 'libout' => 1, - 'dynamicflags' => 3, - 'staticflags' => 3, - 'version' => 1, + 'prebuild' => 5, + 'pure_libs' => 2, 'recurse' => 1, + 'recursive_includes' => 3, + 'recursive_libpaths' => 3, 'requires' => 3, - 'avoids' => 3, - 'tagname' => 1, + 'sharedname' => 1, + 'staticflags' => 3, + 'staticname' => 1, 'tagchecks' => 1, - 'macros' => 3, + 'tagname' => 1, + 'version' => 1, 'webapp' => 1, ); @@ -1194,10 +1194,13 @@ sub process_component_line { $line = $self->relative($line); $line =~ s/\\/\//g if ($self->{'convert_slashes'}); - ## Now look for specially listed files + ## Now look for specially listed files. + ## Regular expressions are very slow. Searching the line twice with + ## index() is 328 times faster than searching with just the regular + ## expression when it doesn't match (which is likely to be the case). if ((index($line, '>>') >= 0 || index($line, '<<') >= 0) && $line =~ /(.*)\s+(>>|<<)\s+(.*)/) { - $line = $1; + $line = $1; my $oop = $2; my $iop = ($oop eq '>>' ? '<<' : '>>'); my $out = ($oop eq '>>' ? $3 : undef); @@ -3110,14 +3113,18 @@ sub generate_default_components { sub remove_duplicated_files { my($self, $dest, $source) = @_; - my $names = $self->{$dest}; my @slist = $self->get_component_list($source, 1); - my %shash; + ## There's no point in going on if there's nothing in this component + ## list. + return undef if ($#slist == -1); + ## Convert the array into keys for a hash table + my %shash; @shash{@slist} = (); ## Find out which source files are listed + my $names = $self->{$dest}; foreach my $name (keys %$names) { foreach my $key (keys %{$$names{$name}}) { my $array = $$names{$name}->{$key}; diff --git a/modules/TemplateParser.pm b/modules/TemplateParser.pm index de057a6c..1639836a 100644 --- a/modules/TemplateParser.pm +++ b/modules/TemplateParser.pm @@ -496,7 +496,11 @@ sub process_foreach { $name = $n; $name =~ s/s$//; } - if (!$check_for_mixed && !$self->{'prjc'}->is_keyword($n)) { + ## We only want to check for the mixing of scalar and hash + ## variables if the variable name is not a keyword (or the + ## special 'features' template variable). + if (!$check_for_mixed && + !$self->{'prjc'}->is_keyword($n) && $n ne 'features') { $check_for_mixed = 1; } } diff --git a/modules/WB26ProjectCreator.pm b/modules/WB26ProjectCreator.pm index 8380a35b..2a59f050 100644 --- a/modules/WB26ProjectCreator.pm +++ b/modules/WB26ProjectCreator.pm @@ -40,7 +40,7 @@ sub project_file_name { ## Fill in the name and template if they weren't provided $name = $self->project_name() if (!defined $name); - $template = 'wb26' if (!defined $template); + $template = 'wb26' if (!defined $template || !defined $templates{$template}); if ($self->{'make_coexistence'}) { return $self->get_modified_project_file_name($name, diff --git a/modules/WorkspaceCreator.pm b/modules/WorkspaceCreator.pm index f1423081..f167b88f 100644 --- a/modules/WorkspaceCreator.pm +++ b/modules/WorkspaceCreator.pm @@ -625,8 +625,15 @@ sub handle_scoped_unknown { if ($self->path_is_relative($line)) { $line = $self->{'scoped_basedir'} . ($line ne '.' ? "/$line" : ''); } + + ## We must build up the list of project files and use them as the + ## keys in the duplicate hash check. We need to call + ## search_for_files() because the user may have just listed + ## directories in the workspace and we need to deal with mpc files. + my @files; + $self->search_for_files($self->{'project_files'}, \@files); my %dup; - @dup{@{$self->{'project_files'}}} = (); + @dup{@files} = (); $dupchk = \%dup; ## If the aggregated workspace contains a scope (other than exclude) @@ -725,15 +732,13 @@ sub search_for_files { unshift(@$array, $file); } } - else { - if ($file =~ /\.mpc$/) { - $file =~ s/^\.\///; + elsif ($file =~ /\.mpc$/) { + $file =~ s/^\.\///; - # Strip out ^ symbols - $file =~ s/\^//g if ($onVMS); + # Strip out ^ symbols + $file =~ s/\^//g if ($onVMS); - unshift(@$array, $file); - } + unshift(@$array, $file); } } |