summaryrefslogtreecommitdiff
path: root/modules/ProjectCreator.pm
diff options
context:
space:
mode:
authorChad Elliott <elliottc@objectcomputing.com>2019-05-17 09:45:55 -0500
committerChad Elliott <elliottc@objectcomputing.com>2019-05-17 09:45:55 -0500
commitd07b201048ef6556e64da7ff0c4d3e3e70f23359 (patch)
tree09aaca155c44795d301055707c278fe257fae5fe /modules/ProjectCreator.pm
parent8c0ffa80ca129b431329b9d4a1ce7979dad9dfdc (diff)
downloadMPC-d07b201048ef6556e64da7ff0c4d3e3e70f23359.tar.gz
Fri May 17 14:42:45 UTC 2019 Chad Elliott <elliott_c@ociweb.com>
* modules/Creator.pm: * modules/IARProjectCreator.pm: * modules/IARWorkspaceCreator.pm: If a project type requires relative paths, locate a relative path when replacing $() variables if at all possible. * modules/ProjectCreator.pm: * modules/TemplateParser.pm: * templates/iar.mpd: A new template function, 'extension', can be used to get the extension of a file. Additionally, non-template files can now be obtained through the custom input file interface.
Diffstat (limited to 'modules/ProjectCreator.pm')
-rw-r--r--modules/ProjectCreator.pm16
1 files changed, 16 insertions, 0 deletions
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 3a33609f..9bf06973 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -4617,6 +4617,22 @@ sub get_custom_value {
}
}
}
+ elsif ($cmd eq 'non_template_output_files') {
+ # Generate non-template output files based on $based
+ if (defined $self->{'custom_output_files'}) {
+ $value = [];
+ foreach my $file (@{$self->{'custom_output_files'}->{$based}}) {
+ my $template = 0;
+ foreach my $ext (@{$self->{'valid_components'}->{'template_files'}}) {
+ if ($file =~ /$ext$/) {
+ $template = 1;
+ last;
+ }
+ }
+ push(@$value, $file) if (!$template);
+ }
+ }
+ }
elsif ($cmd eq 'inputexts') {
my @array = @{$self->{'valid_components'}->{$based}};
foreach my $val (@array) {