Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
91c81cc9
Commit
91c81cc9
authored
Apr 30, 2009
by
Ian Lynagh
Browse files
Fix mkdependC: Make it tell cpp to use our temporary filename
parent
2906aee6
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils/mkdependC/mkdependC.prl
View file @
91c81cc9
...
...
@@ -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);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment