diff options
author | simonmar <unknown> | 1999-07-27 13:55:57 +0000 |
---|---|---|
committer | simonmar <unknown> | 1999-07-27 13:55:57 +0000 |
commit | fd4cdcec3728a18994bdda3dd551bdbda1f8ae43 (patch) | |
tree | 68c5de8012a571a3c7c66bb0f98413ba0dad24c6 /ghc/utils | |
parent | 5bca0638e5f11da2545f0401f7ffc4abf394c973 (diff) | |
download | haskell-fd4cdcec3728a18994bdda3dd551bdbda1f8ae43.tar.gz |
[project @ 1999-07-27 13:55:57 by simonmar]
Fix filenames in {-# LINE #-} directives when using both unlit and
hscpp (I think).
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 $_; } |