+2001-02-25 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&transform): Also call &transform_cond on your
+ arguments.
+ (&handle_dist): Adjust.
+ (&handle_factored_dependencies): Uniq dependencies.
+
2001-02-25 Akim Demaille <akim@epita.fr>
* automake.in (&handle_gettext): Simplify redundant `if'.
$xform
. &transform ('DIST-TARGETS' => join (" ", @dist_targets),
'TOP_DISTDIR' => $top_distdir)
- . &transform_cond ('DIST-TARGETS' =>
- scalar @dist_targets,
- 'DISTDIR' =>
+ . &transform_cond ('DISTDIR' =>
! &variable_defined ('distdir')));
}
|| $actions{$_}
|| $required_targets{$_});
&pretty_print_rule ("$_:", "\t",
- sort @{$dependencies{$_}});
+ uniq (sort @{$dependencies{$_}}));
$output_rules .= $actions{$_};
$output_rules .= "\n";
}
# &transform (%PAIRS)
# -------------------
# Create a replacement expression suitable for file_contents
-# to replace each key of %PAIRS by its value.
+# to replace each key of %PAIRS by its value. Also uses &transform_cond
+# on %PAIRS.
sub transform (%)
{
my (%pairs) = @_;
my $result = '';
- foreach my $token (sort keys %pairs)
+ while (my ($token, $val) = each %pairs)
{
- $result .= "s/\Q\@$token\@\E/\Q$pairs{$token}\E/g;";
+ $result .= "s/\Q\@$token\@\E/\Q$val\E/g;";
}
+
+ $result .= &transform_cond (%pairs);
return $result;
}
my (%pairs) = @_;
my $result = '';
- foreach my $token (sort keys %pairs)
+ while (my ($token, $val) = each %pairs)
{
- if ($pairs{$token})
+ if ($val)
{
$result .= "s/\Q?$token?\E//g;s/^.*\Q?!$token?\E.*\$//g;";
}
'EXEC' => $X =~ /exec/)
. $ltxform
. $cygxform);
-
- push (@installdirs, '$(DESTDIR)$(' . $X . 'dir)');
}
}