On 8 January 2016 at 14:33, Gavin Smith <gavinsmith0...@gmail.com> wrote: > Failing that, it would be better for conditional SHORTNAME to work, > instead of adding a new option.
For example: --- automake-orig 2016-01-08 14:54:04.000000000 +0000 +++ /home/g/local/bin/automake 2016-01-08 15:06:06.000000000 +0000 @@ -1749,11 +1749,18 @@ my $var = var ($derived . '_SHORTNAME'); if ($var) { - # FIXME: should use the same Condition as - # the _SOURCES variable. But this is really - # silly overkill -- nobody should have - # conditional shortnames. - $dname = $var->variable_value; + # Use the same Condition as the _SOURCES variable. + my $sources_var = var ($derived . '_SOURCES'); + if ($sources_var) { + my @conds = $sources_var->conditions->conds; + if (@conds) { + my $cond = $conds[0]; + my $def = $var->def($cond); + if ($def) { + $dname = $def->value; + } + } + } } $object = $dname . '-' . $object;