Skip to content

Commit 8c0c212

Browse files
committed
ChangeLogTag: Mon Aug 31 16:41:00 UTC 2009 Chad Elliott <[email protected]>
1 parent 011ff8d commit 8c0c212

File tree

9 files changed

+89
-39
lines changed

9 files changed

+89
-39
lines changed

ChangeLog

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
Mon Aug 31 16:41:00 UTC 2009 Chad Elliott <[email protected]>
2+
3+
* PROBLEM-REPORT-FORM:
4+
5+
Updated URLs.
6+
7+
* modules/BCB2007ProjectCreator.pm:
8+
* modules/BCB2007WorkspaceCreator.pm:
9+
* modules/ConfigParser.pm:
10+
11+
Corrected comments.
12+
13+
* modules/ProjectCreator.pm:
14+
15+
Alphabetized the keywords (which makes it easier when updating
16+
documentation). Updated comments and added a minor performance
17+
enhancment.
18+
19+
* modules/TemplateParser.pm:
20+
21+
Fixed a bug where 'features' used in a template would get confused
22+
with template scopes.
23+
24+
* modules/WB26ProjectCreator.pm:
25+
26+
If the user overrides the template, still provide a valid project
27+
file name in the project_file_name() method.
28+
29+
* modules/WorkspaceCreator.pm:
30+
31+
Fixed a bug where duplicate mpc files added by aggregated
32+
workspaces would not be correctly ignored.
33+
134
Tue Aug 25 12:22:59 UTC 2009 Chad Elliott <[email protected]>
235

336
* config/qt4_core.mpb:
@@ -188,7 +221,7 @@ Tue Aug 11 16:08:20 UTC 2009 Chad Elliott <[email protected]>
188221

189222
* docs/html/MakeProjectCreator.html:
190223

191-
Added a Id tag
224+
Added an Id tag.
192225

193226
* modules/ProjectCreator.pm:
194227

PROBLEM-REPORT-FORM

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Documentation for MPC can be found at the following location.
22

3-
http://downloads.ociweb.com/MPC/
3+
http://downloads.ociweb.com/MPC/docs/html/MakeProjectCreator.html
44

55
Please consult the documentation to ensure that you are using MPC correctly.
66

77
If you are still having a problem getting MPC to do what you want, please
88
consult the FAQ before sending a support request.
99

10-
http://www.ociweb.com/products/mpc/faq.html
10+
http://www.ociweb.com/products/mpc/mpc-faq
1111

1212
When requesting MPC support please provide the following items:
1313

modules/BCB2007ProjectCreator.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package BCB2007ProjectCreator;
22

33
# ************************************************************
4-
# Description : The Borland Developer Studio 4 Project Creator
4+
# Description : The Borland C++ Builder 2007 Project Creator
55
# Author : Johnny Willemsen
66
# Create Date : 14/12/2005
77
# ************************************************************

modules/BCB2007WorkspaceCreator.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package BCB2007WorkspaceCreator;
22

33
# ************************************************************
4-
# Description : A BDS 4 Workspace Creator
4+
# Description : A BCB2007 Workspace Creator
55
# Author : Johnny Willemsen
66
# Create Date : 14/12/2005
77
# ************************************************************

modules/ConfigParser.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,14 @@ sub parse_line {
4949
$name =~ s/\s+$//;
5050

5151
## Pre-process the name and value
52-
$name = $self->preprocess($name);
5352
my $value = $self->preprocess($clean);
53+
$name = $self->preprocess($name);
5454
$name =~ s/\\/\//g;
5555

5656
## Store the name value pair
5757
if (!defined $self->{'valid'}) {
58-
## There are no valid names, so all names are valid.
58+
## There are no valid names, so all names are valid, except an
59+
## empty name.
5960
if ($name ne '') {
6061
$self->{'values'}->{$name} = $value;
6162
$self->{'clean'}->{$name} = $clean;

modules/ProjectCreator.pm

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,36 +42,36 @@ my $static_libs_feature = 'static_libs_only';
4242
## 0 Preserve the order for additions (1) or invert it (0)
4343
## 1 Add this value to template input value (if there is one)
4444
## 2 Preserve <% %> settings for evaluation within the template
45-
my %validNames = ('exename' => 1,
46-
'sharedname' => 1,
47-
'staticname' => 1,
48-
'libpaths' => 3,
49-
'recursive_libpaths' => 3,
45+
my %validNames = ('after' => 1,
46+
'avoids' => 3,
47+
'custom_only' => 1,
48+
'dllout' => 1,
49+
'dynamicflags' => 3,
50+
'exename' => 1,
5051
'exeout' => 1,
5152
'includes' => 3,
52-
'recursive_includes' => 3,
53-
'after' => 1,
54-
'custom_only' => 1,
53+
'libout' => 1,
54+
'libpaths' => 3,
5555
'libs' => 2,
5656
'lit_libs' => 2,
57+
'macros' => 3,
5758
'managed' => 1,
58-
'pure_libs' => 2,
5959
'pch_header' => 1,
6060
'pch_source' => 1,
61-
'prebuild' => 5,
6261
'postbuild' => 5,
6362
'postclean' => 5,
64-
'dllout' => 1,
65-
'libout' => 1,
66-
'dynamicflags' => 3,
67-
'staticflags' => 3,
68-
'version' => 1,
63+
'prebuild' => 5,
64+
'pure_libs' => 2,
6965
'recurse' => 1,
66+
'recursive_includes' => 3,
67+
'recursive_libpaths' => 3,
7068
'requires' => 3,
71-
'avoids' => 3,
72-
'tagname' => 1,
69+
'sharedname' => 1,
70+
'staticflags' => 3,
71+
'staticname' => 1,
7372
'tagchecks' => 1,
74-
'macros' => 3,
73+
'tagname' => 1,
74+
'version' => 1,
7575
'webapp' => 1,
7676
);
7777

@@ -1194,10 +1194,13 @@ sub process_component_line {
11941194
$line = $self->relative($line);
11951195
$line =~ s/\\/\//g if ($self->{'convert_slashes'});
11961196

1197-
## Now look for specially listed files
1197+
## Now look for specially listed files.
1198+
## Regular expressions are very slow. Searching the line twice with
1199+
## index() is 328 times faster than searching with just the regular
1200+
## expression when it doesn't match (which is likely to be the case).
11981201
if ((index($line, '>>') >= 0 || index($line, '<<') >= 0) &&
11991202
$line =~ /(.*)\s+(>>|<<)\s+(.*)/) {
1200-
$line = $1;
1203+
$line = $1;
12011204
my $oop = $2;
12021205
my $iop = ($oop eq '>>' ? '<<' : '>>');
12031206
my $out = ($oop eq '>>' ? $3 : undef);
@@ -3110,14 +3113,18 @@ sub generate_default_components {
31103113

31113114
sub remove_duplicated_files {
31123115
my($self, $dest, $source) = @_;
3113-
my $names = $self->{$dest};
31143116
my @slist = $self->get_component_list($source, 1);
3115-
my %shash;
31163117

3118+
## There's no point in going on if there's nothing in this component
3119+
## list.
3120+
return undef if ($#slist == -1);
3121+
31173122
## Convert the array into keys for a hash table
3123+
my %shash;
31183124
@shash{@slist} = ();
31193125

31203126
## Find out which source files are listed
3127+
my $names = $self->{$dest};
31213128
foreach my $name (keys %$names) {
31223129
foreach my $key (keys %{$$names{$name}}) {
31233130
my $array = $$names{$name}->{$key};

modules/TemplateParser.pm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,11 @@ sub process_foreach {
496496
$name = $n;
497497
$name =~ s/s$//;
498498
}
499-
if (!$check_for_mixed && !$self->{'prjc'}->is_keyword($n)) {
499+
## We only want to check for the mixing of scalar and hash
500+
## variables if the variable name is not a keyword (or the
501+
## special 'features' template variable).
502+
if (!$check_for_mixed &&
503+
!$self->{'prjc'}->is_keyword($n) && $n ne 'features') {
500504
$check_for_mixed = 1;
501505
}
502506
}

modules/WB26ProjectCreator.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ sub project_file_name {
4040

4141
## Fill in the name and template if they weren't provided
4242
$name = $self->project_name() if (!defined $name);
43-
$template = 'wb26' if (!defined $template);
43+
$template = 'wb26' if (!defined $template || !defined $templates{$template});
4444

4545
if ($self->{'make_coexistence'}) {
4646
return $self->get_modified_project_file_name($name,

modules/WorkspaceCreator.pm

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,15 @@ sub handle_scoped_unknown {
625625
if ($self->path_is_relative($line)) {
626626
$line = $self->{'scoped_basedir'} . ($line ne '.' ? "/$line" : '');
627627
}
628+
629+
## We must build up the list of project files and use them as the
630+
## keys in the duplicate hash check. We need to call
631+
## search_for_files() because the user may have just listed
632+
## directories in the workspace and we need to deal with mpc files.
633+
my @files;
634+
$self->search_for_files($self->{'project_files'}, \@files);
628635
my %dup;
629-
@dup{@{$self->{'project_files'}}} = ();
636+
@dup{@files} = ();
630637
$dupchk = \%dup;
631638

632639
## If the aggregated workspace contains a scope (other than exclude)
@@ -725,15 +732,13 @@ sub search_for_files {
725732
unshift(@$array, $file);
726733
}
727734
}
728-
else {
729-
if ($file =~ /\.mpc$/) {
730-
$file =~ s/^\.\///;
735+
elsif ($file =~ /\.mpc$/) {
736+
$file =~ s/^\.\///;
731737

732-
# Strip out ^ symbols
733-
$file =~ s/\^//g if ($onVMS);
738+
# Strip out ^ symbols
739+
$file =~ s/\^//g if ($onVMS);
734740

735-
unshift(@$array, $file);
736-
}
741+
unshift(@$array, $file);
737742
}
738743
}
739744

0 commit comments

Comments
 (0)