diff options
Diffstat (limited to 'ghc/utils')
-rw-r--r-- | ghc/utils/hscpp/hscpp.prl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ghc/utils/hscpp/hscpp.prl b/ghc/utils/hscpp/hscpp.prl index 8d753e5553..802e9edff0 100644 --- a/ghc/utils/hscpp/hscpp.prl +++ b/ghc/utils/hscpp/hscpp.prl @@ -36,10 +36,15 @@ open(INPIPE, "$Cpp @args - <$file |") while (<INPIPE>) { + print STDERR $_; + # line directives come in flavo[u]rs: # s/^#\s*line\s+\d+$/\{\-# LINE \-\}/; IGNORE THIS ONE FOR NOW - s/^#\s*line\s+(\d+)\s+(\".+\")$/\{\-# LINE \1 \"$file\" \-\}/; - s/^#\s*(\d+)\s+(\".*\").*/\{\-# LINE \1 \"$file\" \-\}/; + s/^#\s*line\s+(\d+)\s+(\".+\")$/\{\-# LINE \1 \2 \-\}/; + s/^#\s*(\d+)\s+(\".*\").*/\{\-# LINE \1 \2 \-\}/; + + s/^#\s*(\d+)\s+(\"\").*//; # these are a result of our using stdin in + # the $(CPP) command line above. print $_; } |