summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2005-06-29 17:17:09 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2005-06-29 17:17:09 +0000
commit1d576eaf405520a4ced909e4e7f9505ba97ab94f (patch)
tree8c9b6403b000e8c0a52e2356b5e326d8538d2775
parent0b576ca064d46093250be5fa46d77f24b5a50803 (diff)
downloadMPC-1d576eaf405520a4ced909e4e7f9505ba97ab94f.tar.gz
ChangeLogTag: Wed Jun 29 12:15:46 2005 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog11
-rw-r--r--modules/ProjectCreator.pm16
-rw-r--r--templates/ghs.mpd13
3 files changed, 33 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f9ee34b..b68d31c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Wed Jun 29 12:15:46 2005 Chad Elliott <elliott_c@ociweb.com>
+
+ * modules/ProjectCreator.pm:
+
+ Fixed a bug where mapped keywords within the scope of a 'specific'
+ section would not be processed.
+
+ * templates/ghs.mpd:
+
+ Fixed the dependency and pch_postrule sections.
+
Wed Jun 29 06:55:10 2005 Chad Elliott <elliott_c@ociweb.com>
* README:
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index f43463f7..fbf3c6bb 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -332,7 +332,7 @@ sub process_assignment {
## Support keyword mapping here only at the project level scope. The
## scoped keyword mapping is done through the parse_scoped_assignment()
## method.
- if (!defined $assign) {
+ if (!defined $assign || $assign == $self->get_assignment_hash()) {
my($mapped) = $self->{'valid_names'}->{$name};
if (defined $mapped && UNIVERSAL::isa($mapped, 'ARRAY')) {
$self->parse_scoped_assignment($$mapped[0], 'assignment',
@@ -3381,7 +3381,19 @@ sub get_custom_value {
foreach my $file (@{$self->{'custom_output_files'}->{$based}}) {
foreach my $ext (@{$self->{'valid_components'}->{'source_files'}}) {
if ($file =~ /$ext$/) {
- push(@$value, $file);
+ ## We've found a file that matches one of the source file
+ ## extensions. Now we have to make sure that it doesn't
+ ## match a template file extension.
+ my($matched) = 0;
+ foreach my $text (@{$self->{'valid_components'}->{'template_files'}}) {
+ if ($file =~ /$text$/) {
+ $matched = 1;
+ last;
+ }
+ }
+ if (!$matched) {
+ push(@$value, $file);
+ }
last;
}
}
diff --git a/templates/ghs.mpd b/templates/ghs.mpd
index adbee53e..90214ddc 100644
--- a/templates/ghs.mpd
+++ b/templates/ghs.mpd
@@ -22,13 +22,16 @@ default:
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%if(custom_type->input_file->output_files)%>
- :depends=<%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
-<%foreach(custom_type->input_file->output_files)%>
+ :depends=<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%dep%><%if(!ends_with(dep, \.p.))%><%exe_ext%><%endif%> <%endfor%><%else%><%foreach(custom_type->dependent)%><%custom_type->dependent%><%if(!ends_with(custom_type->dependent, \.p.))%><%exe_ext%><%endif%> <%endfor%><%endif%><%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
<%if(flag_overrides(custom_type->input_file, gendir))%>
:preexec=<%mkdir("mkdir -p")%> <%flag_overrides(custom_type->input_file, gendir)%><%postmkdir%>
<%endif%>
- :preexec=<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%> <%if(custom_type->output_option)%><%custom_type->output_option%> <%custom_type->input_file->output_file%><%endif%>
+<%if(custom_type->output_option)%>
+<%foreach(custom_type->input_file->output_files)%>
+ :preexec=<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%><%if(custom_type->output_option)%> <%custom_type->output_option%> <%custom_type->input_file->output_file%><%endif%>
<%endfor%>
+<%else%>
+ :preexec=<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%custom_type->input_file%><%endif%>
<%if(flag_overrides(custom_type->input_file, postcommand))%>
<%foreach(custom_type->input_file)%>
:preexec=<%flag_overrides(custom_type->input_file, postcommand)%>
@@ -40,11 +43,11 @@ default:
<%endfor%>
<%endif%>
<%endif%>
-<%if(custom_type->pch_postrule)%>
+<%if(pch_header && custom_type->pch_postrule)%>
<%foreach(custom_type->input_file->source_output_files)%>
:preexec=echo #include "<%pch_header%>" > temporary.src
:preexec=<%cat("cat")%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src
- :preexec=<mv("mv -f")%> temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
+ :preexec=<%mv("mv -f")%> temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
<%endfor%>
<%endif%>
<%else%>