diff options
| author | Ian Lynagh <igloo@earth.li> | 2009-04-30 13:06:38 +0000 |
|---|---|---|
| committer | Ian Lynagh <igloo@earth.li> | 2009-04-30 13:06:38 +0000 |
| commit | 91c81cc99ab1421b435be089b679be590230bf74 (patch) | |
| tree | 7f13fc9fef4238b98d43baad10a0e7407e6ca7ef | |
| parent | 2906aee671f5de07e7ad7acde21860442d127ef7 (diff) | |
| download | haskell-91c81cc99ab1421b435be089b679be590230bf74.tar.gz | |
Fix mkdependC: Make it tell cpp to use our temporary filename
| -rw-r--r-- | utils/mkdependC/mkdependC.prl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/mkdependC/mkdependC.prl b/utils/mkdependC/mkdependC.prl index 6f06b1cc70..e1f8f39fc0 100644 --- a/utils/mkdependC/mkdependC.prl +++ b/utils/mkdependC/mkdependC.prl @@ -181,17 +181,17 @@ sub slurp_file { # follows an example in the `open' item in perl man page $fname = &tidy_dir_names($fname); - ($fh, $tempfile) = tempfile(); + ($fh, $tempfile) = tempfile(DIR => '.', SUFFIX => '.d'); close $fh; # ${CPP} better be 'gcc -E', or the -x option will fail... # ..and the -MM & -MMD. - $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname $ignore_output"); + $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname -o $tempfile $ignore_output"); if ($result != 0) { # On the cheesy side..we do want to know what went wrong, so # re-run the command. - $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname "); + $result = system("${CPP} -MM -MMD $Include_dirs @Defines -x c $fname -o $tempfile"); if ($result != 0) { unlink($tempfile); exit($result); |
