diff options
author | Adam Mitz <mitza@ociweb.com> | 2017-02-13 16:04:56 -0600 |
---|---|---|
committer | Adam Mitz <mitza@ociweb.com> | 2017-02-13 16:04:56 -0600 |
commit | 847b3a2922ddddfe497cbd5a6001db76402e5f20 (patch) | |
tree | eddfa89026124e6eaac60ee7ae9fb77f0de70dca | |
parent | 2f13d31e28f5f43e8b5f41bed0f988b6e7cd8d3b (diff) | |
download | MPC-847b3a2922ddddfe497cbd5a6001db76402e5f20.tar.gz |
Mon Feb 13 21:58:22 UTC 2017 Adam Mitz <mitza@ociweb.com>
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | modules/ProjectCreator.pm | 12 |
2 files changed, 19 insertions, 2 deletions
@@ -1,3 +1,12 @@ +Mon Feb 13 21:58:22 UTC 2017 Adam Mitz <mitza@ociweb.com> + + * modules/ProjectCreator.pm: + + Enhanced handling of 'gendir' for project types that use + "combined custom" (mostly vc >= 10). Need to track common + 'gendir' for output file and also get the input-file-specific + value of 'gendir' to replace the <%gendir%> token. + Tue Feb 7 15:36:45 UTC 2017 Chad Elliott <elliott_c@ociweb.com> * templates/uvis.mpd: 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); |