summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAdam Mitz <mitza@ociweb.com>2017-02-13 16:04:56 -0600
committerAdam Mitz <mitza@ociweb.com>2017-02-13 16:04:56 -0600
commit847b3a2922ddddfe497cbd5a6001db76402e5f20 (patch)
treeeddfa89026124e6eaac60ee7ae9fb77f0de70dca /modules
parent2f13d31e28f5f43e8b5f41bed0f988b6e7cd8d3b (diff)
downloadMPC-847b3a2922ddddfe497cbd5a6001db76402e5f20.tar.gz
Mon Feb 13 21:58:22 UTC 2017 Adam Mitz <mitza@ociweb.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/ProjectCreator.pm12
1 files changed, 10 insertions, 2 deletions
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 7cbb6c91..3a33609f 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -4420,7 +4420,7 @@ sub get_custom_assign_or_override {
}
return undef if !defined $value;
if (defined $customDefined{$var} && ($customDefined{$var} & 0x14)) {
- return $self->convert_command_parameters($tag, $value, @params);
+ return $self->convert_command_parameters($tag, $value, $input, undef, @params);
}
return $value;
}
@@ -5740,6 +5740,7 @@ sub combine_custom_types {
my $self = shift;
my %input; # (input_file_name => [custom1_files, custom2_files], ...)
my $fo = $self->{'flag_overrides'};
+ my %gendir; # (input_file_name => {directory => count}, ...)
# Build the %input data structure as an index of how each input file is used.
foreach my $tag (keys %{$self->{'generated_exts'}}) {
@@ -5756,6 +5757,9 @@ sub combine_custom_types {
if ($self->{'generated_exts'}->{$tag}->{'command'} ||
(defined $of && $fo->{$tag}->{$of}->{'command'})) {
push(@{$input{$in}}, $tag);
+ if (defined $fo->{$tag}->{$of}->{'gendir'}) {
+ $gendir{$in}->{$fo->{$tag}->{$of}->{'gendir'}}++;
+ }
}
}
}
@@ -5764,7 +5768,6 @@ sub combine_custom_types {
# 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}})
@@ -5789,6 +5792,11 @@ sub combine_custom_types {
$self->{'matching_assignments'}->{$combo_tag} = \@keys;
}
+ my @gendir_keys = keys %{$gendir{$in}};
+ if ($#gendir_keys == 0) {
+ $fo->{$combo_tag}->{$in}->{'gendir'} = $gendir_keys[0];
+ }
+
# Add to new type -- groups aren't relevant here, so just use the default
push(@{$self->{$combo_tag}->{'default'}->{'default_group'}}, $in);