summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza-oci@users.noreply.github.com>2010-11-01 18:36:39 +0000
committerAdam Mitz <mitza-oci@users.noreply.github.com>2010-11-01 18:36:39 +0000
commitf8c43aa8f0b1e703582e47f0d76f1128d336543a (patch)
tree609fe4bdfc38cc124934a7d6bedfc227f753bd61
parenta95af766bb526c5a8a4c19d8dcef737ac0faf3f9 (diff)
downloadMPC-f8c43aa8f0b1e703582e47f0d76f1128d336543a.tar.gz
ChangeLogTag: Mon Nov 1 18:21:59 UTC 2010 Adam Mitz <mitza@ociweb.com>
-rw-r--r--ChangeLog51
-rw-r--r--docs/README1
-rw-r--r--docs/html/MakeProjectCreator.html118
-rw-r--r--modules/CDT6ProjectCreator.pm13
-rw-r--r--modules/CDT6WorkspaceCreator.pm6
-rw-r--r--modules/CDT7ProjectCreator.pm41
-rw-r--r--modules/CDT7WorkspaceCreator.pm28
-rw-r--r--modules/DirectoryManager.pm6
-rw-r--r--modules/ProjectCreator.pm318
-rw-r--r--modules/StringProcessor.pm8
-rw-r--r--modules/VC10ProjectCreator.pm5
-rw-r--r--templates/cdt6cproject.mpd399
-rw-r--r--templates/cdt6project.mpd3
-rw-r--r--templates/vc10.mpd4
14 files changed, 839 insertions, 162 deletions
diff --git a/ChangeLog b/ChangeLog
index 51828eb4..361adf5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+Mon Nov 1 18:21:59 UTC 2010 Adam Mitz <mitza@ociweb.com>
+
+ * modules/StringProcessor.pm:
+
+ Added a "merge" function for appending non-duplicates onto a list.
+
+ * modules/DirectoryManager.pm:
+ * modules/ProjectCreator.pm:
+
+ Use the StringProcessor::merge() function where applicable.
+ Fixed a bug where the custom type explicit dependencies (<<) were not
+ tracked separately for each type.
+ Added <%pathsep%> as a pseudo-variable (; or :).
+ Added the capability called "combined custom", which (when enabled
+ by the specific project creator) treats input files used by more than
+ one custom type as if they were just in one type, and that type has
+ multiple commands and the combined set of inputs and outputs. See
+ the HTML documentation for details.
+
+ * modules/CDT6ProjectCreator.pm:
+ * modules/VC10ProjectCreator.pm:
+
+ Enabled combined custom.
+
+ * modules/CDT6WorkspaceCreator.pm:
+ * modules/CDT7ProjectCreator.pm:
+ * modules/CDT7WorkspaceCreator.pm:
+
+ Added the cdt7 type, which builds on cdt6 and therefore doesn't
+ need its own templates. Eclipse's CDT version 7 comes with the
+ "Helios" (3.6) version of Eclipse.
+
+ * docs/README:
+ * docs/html/MakeProjectCreator.html:
+
+ Documented <%pathsep%> and combined-custom.
+
+ * templates/cdt6cproject.mpd:
+
+ Cleaned up a lot of formatting and simplifed some of the MPC template
+ language constructs, added uses of cdt7-specific variables.
+ Added support for combined custom.
+
+ * templates/cdt6project.mpd:
+
+ Support cdt7.
+
+ * templates/vc10.mpd:
+
+ Added support for combined custom.
+
Thu Oct 28 11:44:02 UTC 2010 Chad Elliott <elliott_c@ociweb.com>
* docs/USAGE:
diff --git a/docs/README b/docs/README
index c4cfdae5..cddd9bd3 100644
--- a/docs/README
+++ b/docs/README
@@ -217,6 +217,7 @@ postbuild If this is defined in the project, the value will be
<%rmdir%> - Platform non-specific recursive directory
delete command.
<%nul%> - Platform non-specific null device.
+ <%pathsep%>- Platform non-specific path separator (; or :).
<%gt%> - Project non-specific greater than sign.
<%lt%> - Project non-specific less than sign.
<%and%> - Project non-specific and sign.
diff --git a/docs/html/MakeProjectCreator.html b/docs/html/MakeProjectCreator.html
index 68e7fed6..84664068 100644
--- a/docs/html/MakeProjectCreator.html
+++ b/docs/html/MakeProjectCreator.html
@@ -4513,6 +4513,18 @@
<tr>
<td rowspan="1" colspan="1">
<p class="TblCode"><em class=
+ "TableCode">&lt;%pathsep%&gt;</em></p>
+ </td>
+
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body">A platform non-specific path
+ separator (; or :).</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td rowspan="1" colspan="1">
+ <p class="TblCode"><em class=
"TableCode">&lt;%or%&gt;</em></p>
</td>
@@ -6424,6 +6436,112 @@
<p class="Code">&nbsp;</p>
</li>
+
+ <li class="Body">Certain project types don't support the same
+ input file used by multiple custom types (current examples of
+ this are vc10, cdt6, and cdt7). To accomodate these types, MPC
+ has a capability called "combined custom". With this capability
+ enabled in the specific ProjectCreator, MPC will "fold together"
+ the multiple custom steps so that the target tool (Visual Studio
+ or Eclipse CDT) sees it as a single custom step that happens to
+ run two or more commands. When "combined custom" is enabled,
+ the template needs to be written for it by checking if
+ <em class="Code">custom_type-&gt;input_file-&gt;commands</em> is
+ non-empty. If it isn't empty, the values in it can be iterated
+ over with a <em class="Code">&lt;%foreach%&gt;</em>. During that
+ iteration, the following values can be obtained by the template.
+ Each one would appear in the template preceeded by
+ <em class="Code">custom_type-&gt;input_file-&gt;</em></li>
+
+ <li style="list-style: none">
+ <h6 class="NumberedTableTitle">Custom Type Fields for Combined
+ Custom</h6>
+ <table border="1"
+ summary="Custom Type Fields for Combined Custom">
+ <tr>
+ <th rowspan="1" colspan="1">
+ <p class="Tbl-Heading">Value</p>
+ </th>
+
+ <th rowspan="1" colspan="1">
+ <p class="Tbl-Heading">Description</p>
+ </th>
+ </tr>
+
+ <tr>
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body"><em class=
+ "TableCode">command</em></p>
+ </td>
+
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body">The effective command, taking into
+ account the <em class="TableCode">flag_overrides</em>.
+ </p>
+ </td>
+ </tr>
+
+ <tr>
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body"><em class=
+ "TableCode">command-&gt;outopt</em></p>
+ </td>
+
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body">The <em class=
+ "TableCode">output_option</em> for this particular
+ command, taking into account the
+ <em class="TableCode">flag_overrides</em>.
+ </p>
+ </td>
+ </tr>
+
+ <tr>
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body"><em class=
+ "TableCode">command-&gt;outfile</em></p>
+ </td>
+
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body">The first output file for this
+ particular command (for use with
+ <em class="TableCode">outopt</em>).
+ </p>
+ </td>
+ </tr>
+
+ <tr>
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body"><em class=
+ "TableCode">command-&gt;flags</em></p>
+ </td>
+
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body">The <em class=
+ "TableCode">commandflags</em> for this particular
+ command, taking into account the
+ <em class="TableCode">flag_overrides</em>.
+ </p>
+ </td>
+ </tr>
+
+ <tr>
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body"><em class=
+ "TableCode">command-&gt;gdir</em></p>
+ </td>
+
+ <td rowspan="1" colspan="1">
+ <p class="Tbl-Body">The <em class=
+ "TableCode">gendir</em> for this particular
+ command.
+ </p>
+ </td>
+ </tr>
+
+ </table>
+ </li>
+
</ul>
</div>
diff --git a/modules/CDT6ProjectCreator.pm b/modules/CDT6ProjectCreator.pm
index c73c294f..a2832e0f 100644
--- a/modules/CDT6ProjectCreator.pm
+++ b/modules/CDT6ProjectCreator.pm
@@ -74,6 +74,11 @@ sub fill_value {
return $self->get_project_info()->[5];
}
+ return $self->get_configurable($name);
+}
+
+sub get_configurable {
+ #my($self, $name) = @_;
return undef;
}
@@ -120,4 +125,12 @@ sub use_win_compatibility_commands {
? $ENV{'MPC_CDT_HOST_WIN32'} : ($^O eq 'MSWin32' || $^O eq 'cygwin');
}
+sub pre_write_output_file {
+ my $self = shift;
+ if ($self->{'assign'}->{'custom_only'}) {
+ return 1;
+ }
+ return $self->combine_custom_types();
+}
+
1;
diff --git a/modules/CDT6WorkspaceCreator.pm b/modules/CDT6WorkspaceCreator.pm
index b1d5339f..46650513 100644
--- a/modules/CDT6WorkspaceCreator.pm
+++ b/modules/CDT6WorkspaceCreator.pm
@@ -45,7 +45,7 @@ sub pre_workspace {
## Optionally print the workspace comment
$self->print_workspace_comment($fh,
'#----------------------------------------------------------------------------', $crlf,
- '# Eclipse CDT 6 generator', $crlf,
+ '# Eclipse CDT ', $self->get_cdt_version(), ' generator', $crlf,
'#', $crlf,
'# This file was generated by MPC. Any changes made directly to', $crlf,
'# this file will be lost the next time it is generated.', $crlf,
@@ -60,6 +60,10 @@ sub pre_workspace {
'#----------------------------------------------------------------------------', $crlf);
}
+sub get_cdt_version {
+ return '6';
+}
+
sub write_comps {
my($self, $fh, $creator) = @_;
my $info = $self->get_project_info();
diff --git a/modules/CDT7ProjectCreator.pm b/modules/CDT7ProjectCreator.pm
new file mode 100644
index 00000000..21adf776
--- /dev/null
+++ b/modules/CDT7ProjectCreator.pm
@@ -0,0 +1,41 @@
+package CDT7ProjectCreator;
+
+# ************************************************************
+# Description : A CDT7 Project Creator (Eclipse 3.6)
+# Author : Adam Mitz, Object Computing, Inc.
+# Create Date : 10/04/2010
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use CDT6ProjectCreator;
+
+use vars qw(@ISA);
+@ISA = qw(CDT6ProjectCreator);
+
+# ************************************************************
+# Data Section
+# ************************************************************
+
+my %config = ('scanner_config_builder_triggers' => 'full,incremental,',
+ 'additional_storage_modules' =>
+ 'org.eclipse.cdt.core.language.mapping ' .
+ 'org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings',
+ 'additional_error_parsers' =>
+ 'org.eclipse.cdt.core.GmakeErrorParser ' .
+ 'org.eclipse.cdt.core.CWDLocator'
+ );
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub get_configurable {
+ my($self, $name) = @_;
+ return $config{$name};
+}
+
+1;
diff --git a/modules/CDT7WorkspaceCreator.pm b/modules/CDT7WorkspaceCreator.pm
new file mode 100644
index 00000000..75183fc6
--- /dev/null
+++ b/modules/CDT7WorkspaceCreator.pm
@@ -0,0 +1,28 @@
+package CDT7WorkspaceCreator;
+
+# ************************************************************
+# Description : A CDT7 Workspace Creator (Eclipse 3.6)
+# Author : Adam Mitz, Object Computing, Inc.
+# Create Date : 10/04/2010
+# ************************************************************
+
+# ************************************************************
+# Pragmas
+# ************************************************************
+
+use strict;
+use CDT7ProjectCreator;
+use CDT6WorkspaceCreator;
+
+use vars qw(@ISA);
+@ISA = qw(CDT6WorkspaceCreator);
+
+# ************************************************************
+# Subroutine Section
+# ************************************************************
+
+sub get_cdt_version {
+ return '7';
+}
+
+1;
diff --git a/modules/DirectoryManager.pm b/modules/DirectoryManager.pm
index 2e2ed64c..93c95458 100644
--- a/modules/DirectoryManager.pm
+++ b/modules/DirectoryManager.pm
@@ -146,9 +146,9 @@ sub mpc_glob {
my @files;
my($pre, $mid, $post) = ($1, $2, $3);
for(my $i = 0; $i < length($mid); $i++) {
- foreach my $new ($self->mpc_glob($pre . substr($mid, $i, 1) . $post)) {
- push(@files, $new) if (!StringProcessor::fgrep($new, \@files));
- }
+ StringProcessor::merge(\@files,
+ [$self->mpc_glob($pre . substr($mid, $i, 1)
+ . $post)]);
}
return @files;
}
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 6307c0fe..113f829d 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -604,9 +604,7 @@ sub begin_project {
my $baseprojs = $self->get_baseprojs();
if (defined $parents) {
- foreach my $base (@$baseprojs) {
- push(@$parents, $base) if (!StringProcessor::fgrep($base, $parents));
- }
+ StringProcessor::merge($parents, $baseprojs);
}
else {
$parents = $baseprojs;
@@ -1290,9 +1288,9 @@ sub process_component_line {
$self->{'custom_special_output'}->{$tag}->{$key} = $self->create_array($out);
}
if (defined $dep) {
- $self->{'custom_special_depend'}->{$key} = $self->create_array($dep);
+ $self->{'custom_special_depend'}->{$tag}->{$key} = $self->create_array($dep);
if ($self->{'convert_slashes'}) {
- foreach my $depfile (@{$self->{'custom_special_depend'}->{$key}}) {
+ foreach my $depfile (@{$self->{'custom_special_depend'}->{$tag}->{$key}}) {
$depfile =~ s/\//\\/g;
}
}
@@ -4010,6 +4008,7 @@ sub get_command_subs {
$valid{'bat'} = '.bat';
$valid{'cmd'} = '.cmd';
$valid{'exe'} = '.exe';
+ $valid{'pathsep'} = ';';
}
else {
$valid{'cat'} = 'cat';
@@ -4025,6 +4024,7 @@ sub get_command_subs {
$valid{'bat'} = '';
$valid{'cmd'} = '';
$valid{'exe'} = '';
+ $valid{'pathsep'} = ':';
}
## Add the project specific compatibility commands
@@ -4216,6 +4216,90 @@ sub convert_command_parameters {
}
+sub get_custom_special_output {
+ my $self = shift;
+ my $tag = shift;
+ my $input = shift;
+ if (defined $self->{'custom_special_output'}->{$tag} &&
+ defined $self->{'custom_special_output'}->{$tag}->{$input} &&
+ (!defined $self->{'flag_overrides'}->{$tag} ||
+ !defined $self->{'flag_overrides'}->{$tag}->{$input} ||
+ !defined $self->{'flag_overrides'}->{$tag}->{$input}->{'gendir'}
+ || $self->{'flag_overrides'}->{$tag}->{$input}->{'gendir'} eq '.')) {
+ return $self->{'custom_special_output'}->{$tag}->{$input};
+ }
+ return [];
+}
+
+
+sub get_first_custom_output {
+ my $self = shift;
+ my $input = shift;
+ my $tag = shift;
+ my %vcomps;
+ foreach my $vc (keys %{$self->{'valid_components'}}) {
+ my @comps = $self->get_component_list($vc);
+ $vcomps{$vc} = \@comps;
+ }
+ $vcomps{$generic_key} = [];
+ my $ainput = $input;
+ my $cinput = $input;
+
+ ## Remove the extension
+ $cinput =~ s/\.[^\.]+$//;
+
+ ## If we are converting slashes,
+ ## change them back for this parameter
+ $ainput =~ s/\\/\//g if ($self->{'convert_slashes'});
+
+ foreach my $vc (keys %{$self->{'valid_components'}}) {
+ my @cout = $self->check_custom_output($tag, $cinput, $ainput, $vc,
+ $vcomps{$vc});
+ return $cout[0] if @cout;
+ }
+ my @cout = $self->check_custom_output($tag, $cinput, $ainput, $generic_key,
+ $vcomps{$generic_key});
+ return $cout[0] if @cout;
+ my $aref = $self->get_custom_special_output($tag, $ainput);
+ return $$aref[0] if @$aref;
+ return '';
+}
+
+
+sub get_custom_assign_or_override {
+ my $self = shift;
+ my $var = shift; # which variable? (command, commandflags, etc.)
+ my $tag = shift; # custom_files
+ my $input = shift; # input file name which may override
+ my @params = @_;
+
+ my $key = undef;
+ if (defined $self->{'flag_overrides'}->{$tag}) {
+ my $ustyle = $input;
+ $ustyle =~ s/\\/\//g if ($self->{'convert_slashes'});
+ my $dir = $self->mpc_dirname($ustyle);
+ if (defined $self->{'flag_overrides'}->{$tag}->{$ustyle}) {
+ $key = $ustyle;
+ }
+ elsif (defined $self->{'flag_overrides'}->{$tag}->{$dir}) {
+ $key = $dir;
+ }
+ }
+ my $value = undef;
+ if (defined $key) {
+ $value = $self->{'flag_overrides'}->{$tag}->{$key}->{$var};
+ }
+ if (!defined $value) {
+ $value = $self->get_assignment($var, $self->{'generated_exts'}->{$tag});
+ }
+ return undef if !defined $value;
+ if (defined $customDefined{$var} && ($customDefined{$var} & 0x14)) {
+ return $self->convert_command_parameters($tag, $value, @params);
+ }
+ return $value;
+}
+
+
sub get_custom_value {
my $self = shift;
my $cmd = shift;
@@ -4252,6 +4336,8 @@ sub get_custom_value {
$value = \@array;
$self->{'custom_output_files'} = {};
+ $self->{'custom_dependency_files'} = {};
+ $self->{'custom_multi_cmd'} = {};
my %vcomps;
foreach my $vc (keys %{$self->{'valid_components'}}) {
my @comps = $self->get_component_list($vc);
@@ -4271,6 +4357,24 @@ sub get_custom_value {
## change them back for this parameter
$ainput =~ s/\\/\//g if ($self->{'convert_slashes'});
+ if (defined $self->{'combined_custom'}->{$based}) {
+ $self->{'custom_multi_cmd'}->{$input} =
+ $self->{'combined_custom'}->{$based};
+
+ my $cdf = $self->{'custom_dependency_files'};
+ my $csd = $self->{'custom_special_depend'};
+ foreach my $tag (@{$self->{'combined_custom'}->{$based}}) {
+ if (defined $csd->{$tag} && defined $csd->{$tag}->{$ainput}) {
+ $cdf->{$input} = [] if (!defined $cdf->{$input});
+ StringProcessor::merge($cdf->{$input}, $csd->{$tag}->{$ainput});
+ }
+ }
+ }
+ else {
+ $self->{'custom_dependency_files'}->{$input} =
+ $self->{'custom_special_depend'}->{$based}->{$ainput};
+ }
+
## Add all of the output files. We can not add $generic_key to the
## list here (as it used to be). It may have been handled by
## generated_filenames.
@@ -4278,29 +4382,48 @@ sub get_custom_value {
## The output of multiple components could be input for the
## current component type ($based). We need to avoid adding
## duplicates here.
- foreach my $file ($self->check_custom_output(
- $based, $cinput, $ainput, $vc, $vcomps{$vc})) {
- push(@outputs, $file) if (!StringProcessor::fgrep($file, \@outputs));
+ if (defined $self->{'combined_custom'}->{$based}) {
+ foreach my $tag (@{$self->{'combined_custom'}->{$based}}) {
+ my @cout = $self->check_custom_output($tag, $cinput, $ainput, $vc,
+ $vcomps{$vc});
+ StringProcessor::merge(\@outputs, \@cout);
+ }
+ }
+ else {
+ my @cout = $self->check_custom_output($based, $cinput, $ainput, $vc,
+ $vcomps{$vc});
+ StringProcessor::merge(\@outputs, \@cout);
+ }
+ }
+ if (defined $self->{'combined_custom'}->{$based}) {
+ foreach my $tag (@{$self->{'combined_custom'}->{$based}}) {
+ my @cout = $self->check_custom_output($tag, $cinput, $ainput,
+ $generic_key,
+ $vcomps{$generic_key});
+ StringProcessor::merge(\@outputs, \@cout);
}
}
- foreach my $file ($self->check_custom_output($based, $cinput,
- $ainput, $generic_key,
- $vcomps{$generic_key})) {
- push(@outputs, $file) if (!StringProcessor::fgrep($file, \@outputs));
+ else {
+ my @cout = $self->check_custom_output($based, $cinput, $ainput,
+ $generic_key,
+ $vcomps{$generic_key});
+ StringProcessor::merge(\@outputs, \@cout);
}
## Add specially listed files avoiding duplicates. We don't want
## to add these files if gendir is set to something besides .
- if (defined $self->{'custom_special_output'}->{$based} &&
- defined $self->{'custom_special_output'}->{$based}->{$ainput} &&
- (!defined $self->{'flag_overrides'}->{$based} ||
- !defined $self->{'flag_overrides'}->{$based}->{$ainput} ||
- !defined $self->{'flag_overrides'}->{$based}->{$ainput}->{'gendir'} ||
- $self->{'flag_overrides'}->{$based}->{$ainput}->{'gendir'} eq '.')) {
- foreach my $file (@{$self->{'custom_special_output'}->{$based}->{$ainput}}) {
- push(@outputs, $file) if (!StringProcessor::fgrep($file, \@outputs));
+ if (defined $self->{'combined_custom'}->{$based}) {
+ foreach my $tag (@{$self->{'combined_custom'}->{$based}}) {
+ StringProcessor::merge(\@outputs,
+ $self->get_custom_special_output($tag,
+ $ainput));
}
}
+ else {
+ StringProcessor::merge(\@outputs,
+ $self->get_custom_special_output($based,
+ $ainput));
+ }
if ($self->{'convert_slashes'}) {
foreach my $output (@outputs) {
@@ -4376,9 +4499,44 @@ sub get_custom_value {
$value = \@array;
}
elsif ($cmd eq 'dependencies') {
- ## If we are converting slashes, change them back for this parameter
- $based =~ s/\\/\//g if ($self->{'convert_slashes'});
- $value = $self->{'custom_special_depend'}->{$based};
+ $value = $self->{'custom_dependency_files'}->{$based};
+ }
+ elsif ($cmd eq 'commands') { # only used with 'combined_custom'
+ $value = [];
+ my %details = ('flags' => 'commandflags',
+ 'outopt' => 'output_option',
+ 'gdir' => 'gendir');
+ for my $tag (@{$self->{'custom_multi_cmd'}->{$based}}) {
+ my $command = $self->get_custom_assign_or_override('command', $tag,
+ $based, @params);
+ push(@$value, $command);
+ my $det = $self->{'custom_multi_details'}->{$command} = {};
+ for my $k (keys %details) {
+ $det->{$k} = $self->get_custom_assign_or_override($details{$k}, $tag,
+ $based, @params);
+ }
+ if ($det->{'outopt'} && $self->{'custom_output_files'}->{$based}) {
+ # only 1 output file is supported with output_option
+ $det->{'outfile'} = $self->get_first_custom_output($based, $tag);
+ $det->{'outfile'} =~ s/\//\\/g if $self->{'convert_slashes'};
+ if (defined $det->{'gdir'}) {
+ my $basename = $det->{'outfile'};
+ if ($self->{'convert_slashes'}) {
+ $basename =~ s/.*[\/\\]//;
+ }
+ else {
+ $basename =~ s/.*\///;
+ }
+ $det->{'outfile'} =
+ $det->{'gdir'} . $self->{'command_subs'}->{'slash'} . $basename;
+ }
+ }
+ }
+ }
+ elsif ($cmd eq 'flags' || $cmd eq 'outopt' || $cmd eq 'outfile' ||
+ $cmd eq 'gdir') {
+ # only used with 'combined_custom'
+ $value = $self->{'custom_multi_details'}->{$based}->{$cmd} || '';
}
elsif (defined $customDefined{$cmd}) {
$value = $self->get_assignment($cmd,
@@ -4893,6 +5051,7 @@ sub reset_generating_types {
'exclude_components' => $language{$lang}->[1],
'matching_assignments' => $language{$lang}->[2],
'generated_exts' => {},
+ 'combined_custom' => {},
'valid_names' => \%validNames,
);
@@ -5389,6 +5548,119 @@ sub valid_project_name {
return $_[1] !~ /[\/\\=\?:&"<>|#%]/;
}
+
+sub append_flag_override {
+ ## Append $value to the flag_overrides for <$tag, $input, $key>
+ my $self = shift;
+ my $tag = shift;
+ my $key = shift;
+ my $input = shift;
+ my $value = shift;
+ return if !defined $value || $value eq '';
+ my %join = ('postcommand' => ' ' . $self->{'command_subs'}->{'and'} . ' ');
+ my $sep = ($join{$key}) ? $join{$key} : ' ';
+ my $fo = $self->{'flag_overrides'}->{$tag};
+ $fo->{$input}->{$key} .= ($fo->{$input}->{$key} ? $sep : '') . $value;
+}
+
+
+# Some project types can't represent the same input file being used by
+# more than one custom type. This function will look for such cases and
+# combine them into a single invocation of a synthetic custom type that
+# inherits properties from both of them.
+# Project types needing this transformation should call this function from
+# their overridden pre_write_output_file() method.
+sub combine_custom_types {
+ my $self = shift;
+ my %input; # (input_file_name => [custom1_files, custom2_files], ...)
+ my $fo = $self->{'flag_overrides'};
+
+ # Build the %input data structure as an index of how each input file is used.
+ foreach my $tag (keys %{$self->{'generated_exts'}}) {
+ foreach my $complist (values %{$self->{$tag}}) {
+ foreach my $group (keys %$complist) {
+ foreach my $in (@{$complist->{$group}}) {
+ # only add to %input if some command would be run for this type
+ my $ustyle = $in;
+ $ustyle =~ s/\\/\//g if $self->{'convert_slashes'};
+ my $dir = $self->mpc_dirname($ustyle);
+ my $of = (!defined $fo->{$tag} ? undef :
+ (defined $fo->{$tag}->{$ustyle} ? $ustyle :
+ (defined $fo->{$tag}->{$dir} ? $dir : undef)));
+ if ($self->{'generated_exts'}->{$tag}->{'command'} ||
+ (defined $of && $fo->{$tag}->{$of}->{'command'})) {
+ push(@{$input{$in}}, $tag);
+ }
+ }
+ }
+ }
+ }
+
+ # For each input file used in multiple custom types, move it into the new
+ # synthetic type.
+
+ foreach my $in (keys %input) {
+ next if scalar @{$input{$in}} < 2;
+ my $combo_tag = join('_and_', map {/(.+)_files$/; $1} @{$input{$in}})
+ . '_files';
+ if (!$self->{'combined_custom'}->{$combo_tag}) {
+ $self->{'combined_custom'}->{$combo_tag} = $input{$in};
+ $self->process_assignment_add('custom_types', $combo_tag);
+ my $ge = $self->{'generated_exts'}->{$combo_tag} = {};
+
+ my $combo_vc = $self->{'valid_components'}->{$combo_tag} = [];
+ foreach my $tag (@{$input{$in}}) {
+ StringProcessor::merge($combo_vc, $self->{'valid_components'}->{$tag});
+ if ($self->{'generated_exts'}->{$tag}->{'libpath'}) {
+ $ge->{'libpath'} .= ($ge->{'libpath'} ?
+ $self->{'command_subs'}->{'pathsep'} : '') .
+ $self->{'generated_exts'}->{$tag}->{'libpath'};
+ }
+ }
+ $fo->{$combo_tag} = {};
+ my @keys = keys %custom;
+ push(@keys, @default_matching_assignments);
+ $self->{'matching_assignments'}->{$combo_tag} = \@keys;
+ }
+
+ # Add to new type -- groups aren't relevant here, so just use the default
+ push(@{$self->{$combo_tag}->{'default'}->{'default_group'}}, $in);
+
+ # Remove from existing types
+ my $override_recurse = 0;
+ foreach my $tag (@{$input{$in}}) {
+ foreach my $complist (values %{$self->{$tag}}) {
+ foreach my $group (keys %$complist) {
+ foreach my $idx (0 .. $#{$complist->{$group}}) {
+ if ($complist->{$group}->[$idx] eq $in) {
+ splice(@{$complist->{$group}}, $idx, 1);
+ }
+ }
+ }
+ }
+ if (defined $fo->{$tag} && defined $fo->{$tag}->{$in} &&
+ defined $fo->{$tag}->{$in} && $fo->{$tag}->{$in}->{'recurse'}) {
+ ++$override_recurse;
+ }
+ foreach my $k ('dependent', 'dependent_libs', 'postcommand') {
+ $self->append_flag_override($combo_tag, $k, $in,
+ (defined $fo && defined $fo->{$k})
+ ? $fo->{$k}
+ : $self->{'generated_exts'}->{$tag}->{$k});
+ }
+ }
+
+ # If all existing uses agree to recurse, the new type should recurse too
+ if ($override_recurse == scalar @{$input{$in}}) {
+ $fo->{$combo_tag}->{$in}->{'recurse'} = 1;
+ }
+
+ }
+
+ return 1;
+}
+
+
# ************************************************************
# Accessors used by support scripts
# ************************************************************
diff --git a/modules/StringProcessor.pm b/modules/StringProcessor.pm
index fc08e97f..018b1099 100644
--- a/modules/StringProcessor.pm
+++ b/modules/StringProcessor.pm
@@ -130,4 +130,12 @@ sub fgrep {
return undef;
}
+sub merge {
+ # Push each element of @$list on to @$into, unless it's already in @$into.
+ my($into, $list) = @_;
+ foreach my $in (@$list) {
+ push(@$into, $in) if (!fgrep($in, $into));
+ }
+}
+
1;
diff --git a/modules/VC10ProjectCreator.pm b/modules/VC10ProjectCreator.pm
index c5fe6797..4d0ee512 100644
--- a/modules/VC10ProjectCreator.pm
+++ b/modules/VC10ProjectCreator.pm
@@ -85,10 +85,7 @@ sub project_file_name {
sub pre_write_output_file {
my($self, $webapp) = @_;
- my $status = 1;
- my $error;
-
- return $status, $error;
+ return $self->combine_custom_types();
}
1;
diff --git a/templates/cdt6cproject.mpd b/templates/cdt6cproject.mpd
index 9bac23ab..67adcb80 100644
--- a/templates/cdt6cproject.mpd
+++ b/templates/cdt6cproject.mpd
@@ -9,36 +9,33 @@
<%if(!nocross || vars_equal(platform, host_platform))%>
<cconfiguration id="mpc.generated.config.<%platform%>.<%configuration%>">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="mpc.generated.config.<%platform%>.<%configuration%>" moduleId="org.eclipse.cdt.core.settings" name="<%platform%>-<%configuration%>">
-<externalSettings/><%comment(looks like for libraries there are externalsettings)%>
-<extensions>
+ <externalSettings/><%comment(looks like for libraries there are externalsettings)%>
+ <extensions>
<%foreach(binary_parsers)%>
-<extension id="<%binary_parser%>" point="org.eclipse.cdt.core.BinaryParser"/>
+ <extension id="<%binary_parser%>" point="org.eclipse.cdt.core.BinaryParser"/>
<%endfor%>
-<%foreach(error_parsers)%>
-<extension id="<%error_parser%>" point="org.eclipse.cdt.core.ErrorParser"/>
+<%foreach(error_parsers additional_error_parsers)%>
+ <extension id="<%error_parser%>" point="org.eclipse.cdt.core.ErrorParser"/>
<%endfor%>
-</extensions>
-</storageModule>
-
-<storageModule moduleId="cdtBuildSystem" version="4.0.0">
+ </extensions>
+ </storageModule>
+ <storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration
- <%if(exename && exe_ext_nodot)%>artifactExtension="<%exe_ext_nodot%>"<%endif%>
- <%if(type_is_dynamic && dll_ext_nodot)%>artifactExtension="<%dll_ext_nodot%>"<%endif%>
- <%if(type_is_static && lib_ext_nodot)%>artifactExtension="<%lib_ext_nodot%>"<%endif%>
- artifactName="<%if(exename)%><%exename%><%else%><%if(type_is_dynamic)%><%sharedname%><%else%><%if(type_is_static)%><%staticname%><%endif%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%endif%>"
- description=""
- id="mpc.generated.config.<%platform%>.<%configuration%>"
- name="<%platform%>-<%configuration%>"
- <%if(custom_only)%>
- parent="org.eclipse.cdt.build.core.emptycfg" buildProperties=""
- <%else%>
- buildArtefactType="<%build_artefact_type%>"
- buildProperties="org.eclipse.cdt.build.core.buildArtefactType=<%build_artefact_type%>,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.<%configuration%>"
- cleanCommand="<%delete("rm -rf")%>"
- parent="<%configuration_parent_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"
- prebuildStep="<%eval(prebuild)%>"
- <%endif%><%comment(!custom_only)%>
- postbuildStep="<%shell%> ..<%slash%><%create_aux_file(postbuild_, platform, _, configuration, script_ext)%><%script_hdr%>
+ artifactExtension="<%if(exename && exe_ext_nodot)%><%exe_ext_nodot%><%else%><%if(type_is_dynamic && dll_ext_nodot)%><%dll_ext_nodot%><%else%><%if(type_is_static && lib_ext_nodot)%><%lib_ext_nodot%><%endif%><%endif%><%endif%>"
+ artifactName="<%if(exename)%><%exename%><%else%><%if(type_is_dynamic)%><%sharedname%><%else%><%if(type_is_static)%><%staticname%><%endif%><%endif%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%endif%>"
+ description=""
+ id="mpc.generated.config.<%platform%>.<%configuration%>"
+ name="<%platform%>-<%configuration%>"
+<%if(custom_only)%>
+ parent="org.eclipse.cdt.build.core.emptycfg" buildProperties=""
+<%else%>
+ buildArtefactType="<%build_artefact_type%>"
+ buildProperties="org.eclipse.cdt.build.core.buildArtefactType=<%build_artefact_type%>,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.<%configuration%>"
+ cleanCommand="<%delete("rm -rf")%>"
+ parent="<%configuration_parent_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"
+ prebuildStep="<%eval(prebuild)%>"
+<%endif%>
+ postbuildStep="<%shell%> ..<%slash%><%create_aux_file(postbuild_, platform, _, configuration, script_ext)%><%script_hdr%>
<%if(!custom_only)%>
<%if(type_is_dynamic)%>
<%setenv%> DESTDIR=<%if(dllout)%><%if(!starts_with(dllout, [/\\\$]))%>..<%slash%>..<%slash%><%endif%><%convert_slashes(translate_vars(dllout))%><%else%><%if(libout)%><%if(!starts_with(libout, [/\\\$]))%>..<%slash%>..<%slash%><%endif%><%convert_slashes(translate_vars(libout))%><%else%>..<%slash%>..<%endif%><%endif%><%slash%><%platform%>-<%configuration%>
@@ -56,119 +53,254 @@
<%if(postbuild)%><%eval(postbuild)%><%endif%>
<%end_aux_file%>"
>
-<folderInfo id="mpc.generated.config.<%platform%>.<%configuration%>" <%comment(same id as configuration element id)%> name="/" resourcePath="">
-<toolChain
- id="mpc.generated.toolchain.<%platform%>.<%configuration%>"
- name="<%platform%> Default"
-<%comment(nonInternalBuildId not in native generation on win32)%>
- nonInternalBuilderId="<%toolchain_internal_builder_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"
- superClass="<%toolchain_superclass_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"
->
-<targetPlatform
- id="mpc.generated.target.platform.<%platform%>.<%project_type%>.<%configuration%>"
- name="<%configuration%> Platform"
- superClass="<%targetplatform_superclass%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"/>
-<builder
- id="org.eclipse.cdt.internal.builder.<%project_name%>"
- autoBuildTarget="all"<%comment(these targets don't appear in native generation on win32)%>
- cleanBuildTarget="clean"
- incrementalBuildTarget="all"
- keepEnvironmentInBuildfile="false"
- <%if(custom_only)%>
- superClass="org.eclipse.cdt.build.core.settings.default.builder"
- name="Gnu Make Builder.<%platform%>.<%configuration%>"
- buildPath="${workspace_loc:/<%project_name%>}/.."
- arguments="-f <%project_name%>.mk"
- <%else%>
- buildPath="${workspace_loc:/<%project_name%>/<%configuration%>}"<%comment(buildpath may need to include platform as well in the case of cross-compiles)%>
- managedBuildOn="true" name="CDT Internal Builder"
- superClass="org.eclipse.cdt.build.core.internal.builder"
- <%endif%>
-/>
+ <folderInfo id="mpc.generated.config.<%platform%>.<%configuration%>"<%comment(same id as configuration element id)%> name="/" resourcePath="">
+ <toolChain
+ id="mpc.generated.toolchain.<%platform%>.<%configuration%>"
+ name="<%platform%> Default"
+ nonInternalBuilderId="<%toolchain_internal_builder_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"<%comment(nonInternalBuildId not in native generation on win32)%>
+ superClass="<%toolchain_superclass_root%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
+ <targetPlatform
+ id="mpc.generated.target.platform.<%platform%>.<%project_type%>.<%configuration%>"
+ name="<%configuration%> Platform"
+ superClass="<%targetplatform_superclass%>.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>"/>
+ <builder
+ id="org.eclipse.cdt.internal.builder.<%project_name%>"
+ autoBuildTarget="all"<%comment(these targets don't appear in native generation on win32)%>
+ cleanBuildTarget="clean"
+ incrementalBuildTarget="all"
+ keepEnvironmentInBuildfile="false"
<%if(custom_only)%>
-<tool id="org.eclipse.cdt.build.core.settings.holder.libs.<%platform%>.<%configuration%>" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs" />
+ superClass="org.eclipse.cdt.build.core.settings.default.builder"
+ name="Gnu Make Builder.<%platform%>.<%configuration%>"
+ buildPath="${workspace_loc:/<%project_name%>}/.."
+ arguments="-f <%project_name%>.mk"
<%else%>
-<tool <%if(ccld)%>command="<%ccld%>"<%else%><%if(cc)%>command="<%cc%>"<%endif%><%endif%> id="<%c_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>.1311461244" name="<%tool_name_prefix%> C Linker" superClass="<%c_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>">
+ buildPath="${workspace_loc:/<%project_name%>/<%configuration%>}"<%comment(buildpath may need to include platform as well in the case of cross-compiles)%>
+ managedBuildOn="true" name="CDT Internal Builder"
+ superClass="org.eclipse.cdt.build.core.internal.builder"
+<%endif%>
+ />
+<%if(custom_only)%>
+<tool
+ id="org.eclipse.cdt.build.core.settings.holder.libs.<%platform%>.<%configuration%>"
+ name="holder for library settings"
+ superClass="org.eclipse.cdt.build.core.settings.holder.libs"
+/>
+<%else%>
+<tool
+<%if(ccld)%>
+ command="<%ccld%>"
+<%else%>
+<%if(cc)%>
+ command="<%cc%>"
+<%endif%>
+<%endif%>
+ id="<%c_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>.1311461244"
+ name="<%tool_name_prefix%> C Linker"
+ superClass="<%c_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>">
<%if(type_is_dynamic)%>
-<option defaultValue="true" id="<%c_linker_dynamiclib_superclass%>.1" name="Shared/Dynamic" superClass="<%c_linker_dynamiclib_superclass%>" valueType="boolean"/>
+ <option
+ defaultValue="true"
+ id="<%c_linker_dynamiclib_superclass%>.1"
+ name="Shared/Dynamic"
+ superClass="<%c_linker_dynamiclib_superclass%>" valueType="boolean"
+ />
<%endif%>
</tool>
-<tool <%if(cxxld)%>command="<%cxxld%>"<%else%><%if(cxx)%>command="<%cxx%>"<%endif%><%endif%> id="<%cpp_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>.335515345" name="<%tool_name_prefix%> C++ Linker" superClass="<%cpp_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>">
-<option id="mpc.generated.link.libpaths.1" superClass="<%linker_option_superclass%>.paths" valueType="libPaths">
+<tool
+<%if(cxxld)%>
+ command="<%cxxld%>"
+<%else%>
+<%if(cxx)%>
+ command="<%cxx%>"
+<%endif%>
+<%endif%>
+ id="<%cpp_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>.335515345"
+ name="<%tool_name_prefix%> C++ Linker"
+ superClass="<%cpp_linker_tool_superclass_root%>.<%project_type%>.<%configuration%>">
+ <option
+ id="mpc.generated.link.libpaths.1"
+ superClass="<%linker_option_superclass%>.paths"
+ valueType="libPaths">
<%foreach(libpaths)%>
-<listOptionValue builtIn="false" value="<%if(!starts_with(libpath, [/\\\$]))%>../../<%endif%><%translate_vars(libpath, 1)%>"/>
-<listOptionValue builtIn="false" value="<%if(!starts_with(libpath, [/\\\$]))%>../../<%endif%><%translate_vars(libpath, 1)%>/<%platform%>-<%configuration%>"/>
+ <listOptionValue builtIn="false" value="<%if(!starts_with(libpath, [/\\\$]))%>../../<%endif%><%translate_vars(libpath, 1)%>"/>
+ <listOptionValue builtIn="false" value="<%if(!starts_with(libpath, [/\\\$]))%>../../<%endif%><%translate_vars(libpath, 1)%>/<%platform%>-<%configuration%>"/>
<%endfor%>
-</option>
-<option id="mpc.generated.link.option.libs.1" name="Libraries (-l)" superClass="<%linker_option_superclass%>.libs" valueType="libs">
+ </option>
+ <option
+ id="mpc.generated.link.option.libs.1"
+ name="Libraries (-l)"
+ superClass="<%linker_option_superclass%>.libs"
+ valueType="libs">
<%foreach(libs lit_libs pure_libs platform_libs)%>
-<listOptionValue builtIn="false" value="<%lib%>"/>
+ <listOptionValue builtIn="false" value="<%lib%>"/>
<%endfor%>
-</option>
-<option id="mpc.generated.linkflags.1" superClass="<%linker_option_superclass%>.flags" value="<%if(use_threads)%> <%threadflags%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%if(build64bit && linkflags64)%> <%linkflags64%><%endif%>" valueType="string"/>
+ </option>
+ <option
+ id="mpc.generated.linkflags.1"
+ superClass="<%linker_option_superclass%>.flags"
+ value="<%if(use_threads)%> <%threadflags%><%endif%><%if(linkflags)%> <%linkflags%><%endif%><%if(build64bit && linkflags64)%> <%linkflags64%><%endif%>"
+ valueType="string"
+ />
<%if(type_is_dynamic)%>
-<option defaultValue="true" id="<%cpp_linker_dynamiclib_superclass%>.1" name="Shared/Dynamic" superClass="<%cpp_linker_dynamiclib_superclass%>" valueType="boolean"/>
+ <option
+ defaultValue="true"
+ id="<%cpp_linker_dynamiclib_superclass%>.1"
+ name="Shared/Dynamic"
+ superClass="<%cpp_linker_dynamiclib_superclass%>"
+ valueType="boolean"
+ />
<%endif%>
-<inputType id="cdt.managedbuild.tool.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>cpp.linker.input.415890365" superClass="<%cpp_linker_tool_input_superclass%>">
-<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
-<additionalInput kind="additionalinput" paths="$(LIBS)"/>
-</inputType>
+ <inputType
+ id="cdt.managedbuild.tool.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>cpp.linker.input.415890365"
+ superClass="<%cpp_linker_tool_input_superclass%>">
+ <additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
+ <additionalInput kind="additionalinput" paths="$(LIBS)"/>
+ </inputType>
<%if(!exename)%>
-<outputType id="mpc.generated.cpp.linker.output.so.1" outputPrefix="<%lib_prefix%>" superClass="<%outputtype_superclass%>"/>
+ <outputType id="mpc.generated.cpp.linker.output.so.1" outputPrefix="<%lib_prefix%>" superClass="<%outputtype_superclass%>"/>
<%endif%>
</tool>
-<tool <%if(as)%>command="<%as%>"<%endif%> id="cdt.managedbuild.tool.gnu.assembler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.897965604" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
-<inputType id="cdt.managedbuild.tool.gnu.assembler.input.706221217" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
+<tool
+<%if(as)%>
+ command="<%as%>"
+<%endif%>
+ id="cdt.managedbuild.tool.gnu.assembler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.897965604"
+ name="GCC Assembler"
+ superClass="cdt.managedbuild.tool.gnu.assembler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
+ <inputType
+ id="cdt.managedbuild.tool.gnu.assembler.input.706221217"
+ superClass="cdt.managedbuild.tool.gnu.assembler.input"
+ />
</tool>
-<tool <%if(ar)%>command="<%ar%>"<%endif%> id="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base.134329701" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base"/>
-<tool <%if(cxx)%>command="<%cxx%>"<%endif%> id="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1373363011" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
-<option id="mpc.generated.cc.include.paths.1" superClass="<%cpp_compiler_option_superclass%>.include.paths" valueType="includePath">
+<tool
+<%if(ar)%>
+ command="<%ar%>"
+<%endif%>
+ id="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base.134329701"
+ name="GCC Archiver"
+ superClass="cdt.managedbuild.tool.gnu.archiver.<%if(platform_specializer)%><%platform_specializer%>.<%endif%>base"
+/>
+<tool
+<%if(cxx)%>
+ command="<%cxx%>"
+<%endif%>
+ id="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1373363011"
+ name="GCC C++ Compiler"
+ superClass="cdt.managedbuild.tool.gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
+ <option
+ id="mpc.generated.cc.include.paths.1"
+ superClass="<%cpp_compiler_option_superclass%>.include.paths"
+ valueType="includePath">
<%foreach(includes)%>
-<listOptionValue builtIn="false" value="<%if(!starts_with(include, [/\\\$]))%>../../<%endif%><%translate_vars(include, 1)%>"/>
+ <listOptionValue builtIn="false" value="<%if(!starts_with(include, [/\\\$]))%>../../<%endif%><%translate_vars(include, 1)%>"/>
<%endfor%>
-</option>
-<option id="gnu.cpp.compiler.option.other.other.375481234" superClass="gnu.cpp.compiler.option.other.other" value="-c <%comment(here's where we can put in all the extra compiler flags)%><%cxxflags%><%if(use_threads)%> <%threadflags%><%endif%><%if(dll_ext && pic)%> <%pic%><%endif%>" valueType="string"/>
-<option id="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level.886842330" name="Optimization Level" superClass="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level" value="gnu.cpp.compiler.optimization.level.<%optimization_level%>" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level.63360527" name="Debug Level" superClass="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level" value="gnu.cpp.compiler.debugging.level.<%debugging_level%>" valueType="enumerated"/>
-<option id="gnu.cpp.compiler.option.preprocessor.def.1310953196" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+ </option>
+ <option
+ id="gnu.cpp.compiler.option.other.other.375481234"
+ superClass="gnu.cpp.compiler.option.other.other"
+ value="-c <%comment(here's where we can put in all the extra compiler flags)%><%cxxflags%><%if(use_threads)%> <%threadflags%><%endif%><%if(dll_ext && pic)%> <%pic%><%endif%>"
+ valueType="string"
+ />
+ <option
+ id="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level.886842330"
+ name="Optimization Level"
+ superClass="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level"
+ value="gnu.cpp.compiler.optimization.level.<%optimization_level%>"
+ valueType="enumerated"
+ />
+ <option
+ id="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level.63360527"
+ name="Debug Level"
+ superClass="gnu.cpp.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level"
+ value="gnu.cpp.compiler.debugging.level.<%debugging_level%>"
+ valueType="enumerated"
+ />
+ <option
+ id="gnu.cpp.compiler.option.preprocessor.def.1310953196"
+ superClass="gnu.cpp.compiler.option.preprocessor.def"
+ valueType="definedSymbols">
<%foreach(defines common_defines cpu_defines platform_defines macros)%>
-<listOptionValue builtIn="false" value="<%define%>"/>
+ <listOptionValue builtIn="false" value="<%define%>"/>
<%endfor%>
-<%if(type_is_dynamic)%><%foreach(dynamicflags)%>
-<listOptionValue builtIn="false" value="<%dynamicflag%>"/>
-<%endfor%><%endif%>
-<%if(need_static_flags)%><%foreach(staticflags)%>
-<listOptionValue builtIn="false" value="<%staticflag%>"/>
-<%endfor%><%endif%>
-</option>
+<%if(type_is_dynamic)%>
+<%foreach(dynamicflags)%>
+ <listOptionValue builtIn="false" value="<%dynamicflag%>"/>
+<%endfor%>
+<%endif%>
+<%if(need_static_flags)%>
+<%foreach(staticflags)%>
+ <listOptionValue builtIn="false" value="<%staticflag%>"/>
+<%endfor%>
+<%endif%>
+ </option>
<!--
<option id="gnu.cpp.compiler.option.preprocessor.undef.1618336754" superClass="gnu.cpp.compiler.option.preprocessor.undef" valueType="undefDefinedSymbols">
<listOptionValue builtIn="false" value="blah"/>
</option>
-->
-<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1095450641" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
+ <inputType
+ id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1095450641"
+ superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"
+ />
</tool>
-<tool <%if(cc)%>command="<%cc%>"<%endif%> id="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1634417374" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
-<option id="mpc.generated.c.compiler.option.include.paths.1" superClass="<%c_compiler_option_superclass%>.include.paths" valueType="includePath">
+<tool
+<%if(cc)%>
+ command="<%cc%>"
+<%endif%>
+ id="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.1634417374"
+ name="GCC C Compiler"
+ superClass="cdt.managedbuild.tool.gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>">
+ <option
+ id="mpc.generated.c.compiler.option.include.paths.1"
+ superClass="<%c_compiler_option_superclass%>.include.paths"
+ valueType="includePath">
<%foreach(includes)%>
-<listOptionValue builtIn="false" value="<%if(!starts_with(include, [/\\\$]))%>../../<%endif%><%translate_vars(include, 1)%>"/>
+ <listOptionValue builtIn="false" value="<%if(!starts_with(include, [/\\\$]))%>../../<%endif%><%translate_vars(include, 1)%>"/>
<%endfor%>
-</option>
-<option id="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level.1822406061" name="Optimization Level" superClass="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level" value="gnu.c.optimization.level.<%optimization_level%>" valueType="enumerated"/>
-<option id="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level.1766929" name="Debug Level" superClass="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level" value="gnu.c.debugging.level.<%debugging_level%>" valueType="enumerated"/>
-<option id="gnu.c.compiler.miscoptions.<%platform%>.<%configuration%>" superClass="gnu.c.compiler.option.misc.other" value="-c -fmessage-length=0 <%ccflags%>" valueType="string"/>
-<option id="gnu.c.compiler.option.preprocessor.def.<%platform%>.<%configuration%>" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
+ </option>
+ <option
+ id="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level.1822406061"
+ name="Optimization Level"
+ superClass="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.optimization.level"
+ value="gnu.c.optimization.level.<%optimization_level%>"
+ valueType="enumerated"
+ />
+ <option
+ id="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level.1766929"
+ name="Debug Level"
+ superClass="gnu.c.compiler.<%if(platform_specializer)%><%platform_specializer%>.<%endif%><%project_type%>.<%configuration%>.option.debugging.level"
+ value="gnu.c.debugging.level.<%debugging_level%>"
+ valueType="enumerated"
+ />
+ <option
+ id="gnu.c.compiler.miscoptions.<%platform%>.<%configuration%>"
+ superClass="gnu.c.compiler.option.misc.other"
+ value="-c -fmessage-length=0 <%ccflags%>"
+ valueType="string"
+ />
+ <option
+ id="gnu.c.compiler.option.preprocessor.def.<%platform%>.<%configuration%>"
+ superClass="gnu.c.compiler.option.preprocessor.def.symbols"
+ valueType="definedSymbols">
<%foreach(defines common_defines cpu_defines platform_defines macros)%>
-<listOptionValue builtIn="false" value="<%define%>"/>
+ <listOptionValue builtIn="false" value="<%define%>"/>
<%endfor%>
-<%if(type_is_dynamic)%><%foreach(dynamicflags)%>
-<listOptionValue builtIn="false" value="<%dynamicflag%>"/>
-<%endfor%><%endif%>
-<%if(need_static_flags)%><%foreach(staticflags)%>
-<listOptionValue builtIn="false" value="<%staticflag%>"/>
-<%endfor%><%endif%>
-</option>
-<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1596535093" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
+<%if(type_is_dynamic)%>
+<%foreach(dynamicflags)%>
+ <listOptionValue builtIn="false" value="<%dynamicflag%>"/>
+<%endfor%>
+<%endif%>
+<%if(need_static_flags)%>
+<%foreach(staticflags)%>
+ <listOptionValue builtIn="false" value="<%staticflag%>"/>
+<%endfor%>
+<%endif%>
+ </option>
+ <inputType
+ id="cdt.managedbuild.tool.gnu.c.compiler.input.1596535093"
+ superClass="cdt.managedbuild.tool.gnu.c.compiler.input"
+ />
</tool>
<%endif%><%comment(custom_only)%>
</toolChain>
@@ -214,34 +346,42 @@ all: $(GENERATED)
<%foreach(custom_types)%>
<%foreach(custom_type->input_files)%>
<%if(custom_type->input_file->output_files)%>
-<fileInfo id="mpc.generated.custfile.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
- name="<%custom_type->input_file%>"
- rcbsApplicability="override"
- resourcePath="<%custom_type->input_file%>"
- toolsToInvoke="org.eclipse.cdt.managedbuilder.ui.rcbs.467489715">
- <tool announcement="Invoking custom build step for type <%custom_type%> on <%custom_type->input_file%>"
- command="<%shell%> ..<%slash%><%create_aux_file(platform, _, configuration, _, custom_type, _, normalize(custom_type->input_file), script_ext)%><%script_hdr%>
+<fileInfo
+ id="mpc.generated.custfile.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
+ name="<%custom_type->input_file%>"
+ rcbsApplicability="override"
+ resourcePath="<%custom_type->input_file%>"
+ toolsToInvoke="org.eclipse.cdt.managedbuilder.ui.rcbs.467489715">
+ <tool
+ announcement="Invoking custom build step for type <%custom_type%> on <%custom_type->input_file%>"
+ command="<%shell%> ..<%slash%><%create_aux_file(platform, _, configuration, _, custom_type, _, normalize(custom_type->input_file), script_ext)%><%script_hdr%>
<%comment(LIBPATH)%><%if(custom_type->libpath)%><%setenv%> <%libenv%>=<%envvar_pre%><%libenv%><%envvar_post%><%pathsep%><%translate_vars(custom_type->libpath)%>
<%endif%>cd ..<%slash%>..
<%comment(GENDIR)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(mkdir_pre)%><%mkdir_pre%> <%flag_overrides(custom_type->input_file, gendir)%> <%endif%><%mkdir%> <%flag_overrides(custom_type->input_file, gendir)%>
-<%endif%><%comment(COMMAND)%><%if(flag_overrides(custom_type->input_file, command))%><%translate_vars(flag_overrides(custom_type->input_file, command))%><%else%><%translate_vars(custom_type->command)%><%endif%> <%comment(COMMANDFLAGS)%><%if(flag_overrides(custom_type->input_file, commandflags))%><%translate_vars(flag_overrides(custom_type->input_file, commandflags))%><%else%><%if(custom_type->commandflags)%><%translate_vars(custom_type->commandflags)%><%endif%><%endif%> <%if(custom_type->output_option)%><%comment(with OUTPUT_OPTION)%>"<%custom_type->input_file%>" <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%><%comment(without OUTPUT_OPTION)%>"<%custom_type->input_file%>"<%endif%><%comment(POSTCOMMAND)%><%if(flag_overrides(custom_type->input_file, postcommand))%> && <%flag_overrides(custom_type->input_file, postcommand)%><%else%><%if(custom_type->postcommand)%> && <%custom_type->postcommand%><%endif%><%endif%><%comment(PCH_POSTRULE)%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> && echo <%quote_echo%>#include "<%pch_header%>"<%quote_echo%> > <%script_tmpfile%> && <%cat%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> <%script_tmpfile%> && <%mv%> <%script_tmpfile%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>"<%endfor%><%endif%><%endif%><%comment(LINK_SRCDIR_TO_OUTDIR)%><%if(custom_type->input_file->source_output_files)%> && cd cdt_<%project_name%><%slash%><%platform%>-<%configuration%><%endif%><%foreach(custom_type->input_file->output_files)%> && <%ln%> ..<%slash%>..<%slash%><%dirname(custom_type->input_file->output_file)%><%slash%><%basename(custom_type->input_file->output_file)%> .<%endfor%>
+<%endif%><%if(custom_type->input_file->commands)%><%comment(GENDIR-MULTI-CUSTOM)%><%foreach(custom_type->input_file->commands)%><%if(custom_type->input_file->command->gdir)%><%if(mkdir_pre)%><%mkdir_pre%> <%custom_type->input_file->command->gdir%> <%endif%><%mkdir%> <%custom_type->input_file->command->gdir%>
+<%endif%><%endfor%><%endif%><%if(custom_type->input_file->commands)%><%comment(MULTI-CUSTOM)%><%foreach(custom_type->input_file->commands)%><%translate_vars(custom_type->input_file->command)%> <%translate_vars(custom_type->input_file->command->flags)%> "<%custom_type->input_file%>"<%if(custom_type->input_file->command->outopt)%> <%custom_type->input_file->command->outopt%> "<%custom_type->input_file->command->outfile%>"<%endif%><%fornotlast(" && ")%><%endfor%><%else%><%comment(COMMAND)%><%if(flag_overrides(custom_type->input_file, command))%><%translate_vars(flag_overrides(custom_type->input_file, command))%><%else%><%translate_vars(custom_type->command)%><%endif%> <%comment(COMMANDFLAGS)%><%if(flag_overrides(custom_type->input_file, commandflags))%><%translate_vars(flag_overrides(custom_type->input_file, commandflags))%><%else%><%if(custom_type->commandflags)%><%translate_vars(custom_type->commandflags)%><%endif%><%endif%> <%if(custom_type->output_option)%><%comment(with OUTPUT_OPTION)%>"<%custom_type->input_file%>" <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>"<%endfor%><%else%><%comment(without OUTPUT_OPTION)%>"<%custom_type->input_file%>"<%endif%><%endif%><%comment(POSTCOMMAND)%><%if(flag_overrides(custom_type->input_file, postcommand))%> && <%flag_overrides(custom_type->input_file, postcommand)%><%else%><%if(custom_type->postcommand)%> && <%custom_type->postcommand%><%endif%><%endif%><%comment(PCH_POSTRULE)%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> && echo <%quote_echo%>#include "<%pch_header%>"<%quote_echo%> > <%script_tmpfile%> && <%cat%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>" >> <%script_tmpfile%> && <%mv%> <%script_tmpfile%> "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%><%slash%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>"<%endfor%><%endif%><%endif%><%comment(LINK_SRCDIR_TO_OUTDIR)%><%if(custom_type->input_file->output_files)%> && cd cdt_<%project_name%><%slash%><%platform%>-<%configuration%><%endif%><%foreach(custom_type->input_file->output_files)%> && <%ln%> ..<%slash%>..<%slash%><%if(dirname(custom_type->input_file->output_file))%><%dirname(custom_type->input_file->output_file)%><%slash%><%endif%><%basename(custom_type->input_file->output_file)%> .<%endfor%>
<%end_aux_file%>"
- customBuildStep="true"
- id="mpc.generated.rcbs.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
- name="Resource Custom Build Step">
- <inputType id="mpc.generated.rcbsinput.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
- name="Resource Custom Build Step Input Type">
- <additionalInput kind="additionalinputdependency"
+ customBuildStep="true"
+ id="mpc.generated.rcbs.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
+ name="Resource Custom Build Step for <%custom_type%> <%normalize(custom_type->input_file)%> (<%configuration%>)">
+ <inputType
+ id="mpc.generated.rcbsinput.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
+ name="Resource Custom Build Step Input Type">
+ <additionalInput
+ kind="additionalinputdependency"
<%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%>
- paths="<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%translate_vars(dep, 1)%><%if(!has_extension(dep))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%translate_vars(custom_type->dependent, 1)%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(custom_type->input_file->dependencie, 1)%><%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(dirname(dep_lib), 1)%>/<%lib_prefix%><%translate_vars(basename(dep_lib), 1)%><%lib_modifier%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(dirname(custom_type->dependent_lib), 1)%>/<%lib_prefix%><%translate_vars(basename(custom_type->dependent_lib), 1)%><%lib_modifier%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%>"/>
+ paths="<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%translate_vars(dep, 1)%><%if(!has_extension(dep))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%translate_vars(custom_type->dependent, 1)%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(custom_type->input_file->dependencie, 1)%><%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(dirname(dep_lib), 1)%>/<%lib_prefix%><%translate_vars(basename(dep_lib), 1)%><%lib_modifier%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%translate_vars(dirname(custom_type->dependent_lib), 1)%>/<%lib_prefix%><%translate_vars(basename(custom_type->dependent_lib), 1)%><%lib_modifier%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%>"
<%endif%>
+ />
</inputType>
<outputType
id="mpc.generated.rcbsoutput.<%platform%>.<%configuration%>.<%custom_type%>.<%normalize(custom_type->input_file)%>"
name="Resource Custom Build Step Output Type"
- outputNames="<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%>"/>
+ outputNames="<%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%>"
+ />
</tool>
-</fileInfo><%endif%><%comment(generates any output)%><%endfor%><%comment(input file)%><%endfor%><%comment(custom type)%>
+</fileInfo>
+<%endif%><%comment(generates any output)%><%endfor%><%comment(input file)%><%endfor%><%comment(custom type)%>
<sourceEntries>
<%comment(we may need to change the source_output_files to just output_files below to align it with what's used above)%>
<entry excluding="<%foreach(template_files)%><%template_file%>|<%endfor%><%foreach(custom_types)%><%foreach(custom_type->input_files)%><%foreach(custom_type->input_file->source_output_files)%><%custom_type->input_file->source_output_file%>|<%endfor%><%endfor%><%endfor%>" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
@@ -249,6 +389,9 @@ all: $(GENERATED)
<%endif%><%comment(!custom_only)%>
</configuration>
</storageModule>
+<%foreach(additional_storage_modules)%>
+<storageModule moduleId="<%additional_storage_module%>"/>
+<%endfor%>
<storageModule moduleId="scannerConfiguration">
<!-- It's not clear what this section does, so it's not clear if it's necessary. In fact, experience suggests that CDT seems to fill in the blanks properly for the platform if it's empty. -->
</storageModule>
@@ -258,7 +401,6 @@ all: $(GENERATED)
<%endfor%><%comment(configurations)%>
<%endfor%><%comment(host_platform)%>
<%endfor%><%comment(platforms)%>
-
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<%foreach(platforms)%>
@@ -269,4 +411,3 @@ all: $(GENERATED)
<%endfor%>
</storageModule>
</cproject>
-
diff --git a/templates/cdt6project.mpd b/templates/cdt6project.mpd
index f99d8b3d..d8b4ecd3 100644
--- a/templates/cdt6project.mpd
+++ b/templates/cdt6project.mpd
@@ -72,6 +72,9 @@
</buildCommand>
<buildCommand>
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+<%if(scanner_config_builder_triggers)%>
+ <triggers><%scanner_config_builder_triggers%></triggers>
+<%endif%>
<arguments>
</arguments>
</buildCommand>
diff --git a/templates/vc10.mpd b/templates/vc10.mpd
index 11ce2bd9..bb66947c 100644
--- a/templates/vc10.mpd
+++ b/templates/vc10.mpd
@@ -794,8 +794,8 @@
<CustomBuild Include="<%custom_type->input_file%>">
<%foreach(platforms)%>
<%foreach(configurations)%>
- <Command Condition="'$(Configuration)|$(Platform)'=='<%configuration%>|<%platform%>'"><%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%>&#x0D;&#x0A;<%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%>&#x0D;&#x0A;<%endif%><%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%> <%if(custom_type->output_option)%>&quot;<%custom_type->input_file%>&quot; <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> &quot;<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>&quot;<%endfor%><%else%>&quot;<%custom_type->input_file%>&quot;<%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%> &amp;&amp; <%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%> &amp;&amp; <%custom_type->postcommand%><%endfor%><%endif%><%endif%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> &amp;&amp; echo #include &quot;<%pch_header%>&quot; &gt; temporary.src &amp;&amp; type &quot;<%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%>&quot; &gt;&gt; temporary.src &amp;&amp; move /y temporary.src &quot;<%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%>&quot;<%endfor%><%endif%><%endif%></Command>
- <Message Condition="'$(Configuration)|$(Platform)'=='<%configuration%>|<%platform%>'">Invoking <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> on <%custom_type->input_file%></Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='<%configuration%>|<%platform%>'"><%if(custom_type->libpath)%>PATH=%PATH%;<%custom_type->libpath%>&#x0D;&#x0A;<%endif%><%if(flag_overrides(custom_type->input_file, gendir))%>if not exist <%flag_overrides(custom_type->input_file, gendir)%> mkdir <%flag_overrides(custom_type->input_file, gendir)%>&#x0D;&#x0A;<%endif%><%foreach(custom_type->input_file->commands)%><%if(custom_type->input_file->command->gdir)%>if not exist <%custom_type->input_file->command->gdir%> mkdir <%custom_type->input_file->command->gdir%>&#x0D;&#x0A;<%endif%><%endfor%><%if(custom_type->input_file->commands)%><%foreach(custom_type->input_file->commands)%><%custom_type->input_file->command%> <%custom_type->input_file->command->flags%> &quot;<%custom_type->input_file%>&quot;<%if(custom_type->input_file->command->outopt)%> <%custom_type->input_file->command->outopt%> &quot;<%custom_type->input_file->command->outfile%>&quot;<%endif%><%fornotlast(" &amp;&amp; ")%><%endfor%><%else%><%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%> <%if(custom_type->output_option)%>&quot;<%custom_type->input_file%>&quot; <%custom_type->output_option%><%foreach(custom_type->input_file->output_files)%> &quot;<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>&quot;<%endfor%><%else%>&quot;<%custom_type->input_file%>&quot;<%endif%><%endif%><%if(flag_overrides(custom_type->input_file, postcommand))%><%foreach(custom_type->input_file)%> &amp;&amp; <%flag_overrides(custom_type->input_file, postcommand)%><%endfor%><%else%><%if(custom_type->postcommand)%><%foreach(custom_type->input_file)%> &amp;&amp; <%custom_type->postcommand%><%endfor%><%endif%><%endif%><%if(pch_header)%><%if(custom_type->pch_postrule)%><%foreach(custom_type->input_file->source_output_files)%> &amp;&amp; echo #include &quot;<%pch_header%>&quot; &gt; temporary.src &amp;&amp; type &quot;<%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%>&quot; &gt;&gt; temporary.src &amp;&amp; move /y temporary.src &quot;<%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%>&quot;<%endfor%><%endif%><%endif%></Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='<%configuration%>|<%platform%>'">Invoking <%if(custom_type->input_file->commands)%><%foreach(custom_type->input_file->commands)%><%custom_type->input_file->command%><%fornotlast(" and ")%><%endfor%><%else%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%><%endif%> on <%custom_type->input_file%></Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='<%configuration%>|<%platform%>'"><%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(";")%><%endfor%></Outputs>
<%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies || (!need_staticflags && (flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)))%>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='<%configuration%>|<%platform%>'"><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%dep%><%if(!has_extension(dep))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%custom_type->dependent%><%if(!has_extension(custom_type->dependent))%><%exe_ext%><%endif%><%fornotlast(";")%><%endfor%><%endif%><%endif%><%foreach(custom_type->input_file->dependencies)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent)%>;<%else%><%fornotfirst(";")%><%endif%><%custom_type->input_file->dependencie%><%endfor%><%if(!need_staticflags)%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(dep_lib)%>\<%libname_prefix%><%basename(dep_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || custom_type->input_file->dependencies)%>;<%else%><%fornotfirst(";")%><%endif%><%dirname(custom_type->dependent_lib)%>\<%libname_prefix%><%basename(custom_type->dependent_lib)%><%if(use_lib_modifier)%><%lib_modifier%><%endif%><%dll_ext%><%endfor%><%endif%><%endif%><%endif%></AdditionalInputs>