Module: gas-preprocessor Branch: master Commit: 28aa515f8cc1e5759a2a3d462d84ecba67ac1ca9
Author: Janne Grunau <[email protected]> Committer: Janne Grunau <[email protected]> Date: Wed May 7 12:40:49 2014 +0200 preprocess: keep the make dependency target name intact --- gas-preprocessor.pl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gas-preprocessor.pl b/gas-preprocessor.pl index d6d12c3..f4a55a9 100755 --- a/gas-preprocessor.pl +++ b/gas-preprocessor.pl @@ -126,7 +126,17 @@ if ((grep /^-c$/, @gcc_cmd) && !(grep /^-o/, @gcc_cmd)) { } } } -@preprocess_c_cmd = map { /\.(o|obj)$/ ? "-" : $_ } @preprocess_c_cmd; +# replace only the '-o' argument with '-', avoids rewriting the make dependency +# target specified with -MT to '-' +my $index = 1; +while ($index < $#preprocess_c_cmd) { + if ($preprocess_c_cmd[$index] eq "-o") { + $index++; + $preprocess_c_cmd[$index] = "-"; + } + $index++; +} + my $tempfile; if ($as_type ne "armasm") { @gcc_cmd = map { /\.[csS]$/ ? qw(-x assembler -) : $_ } @gcc_cmd; _______________________________________________ libav-commits mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-commits
