From: sof Date: Tue, 19 Jan 1999 08:33:14 +0000 (+0000) Subject: [project @ 1999-01-19 08:33:14 by sof] X-Git-Tag: Approx_2487_patches~60 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=af5d6df34fba104965560df53eaa32f0c5b5359b;p=ghc-hetmet.git [project @ 1999-01-19 08:33:14 by sof] constructNewHiFile: regular expressions which substituted new module filename for old in hifile_target, didn't quite work. --- diff --git a/ghc/driver/ghc-iface.lprl b/ghc/driver/ghc-iface.lprl index 02c0793..491b2af 100644 --- a/ghc/driver/ghc-iface.lprl +++ b/ghc/driver/ghc-iface.lprl @@ -124,9 +124,9 @@ sub constructNewHiFile { &readHiFile('new',$hsc_hi) unless $HiHasBeenRead{'new'} == 1; if ($Specific_hi_file eq '') { # -ohi is used even if module name != stem of filename. - ($hiname = $hifile_target) =~ s/([^\/]*\/)*(.*)\.$HiSuffix/$2/; + ($hiname = $hifile_target) = $1 if $hifile_target =~ /\/?([^\/\.]+)\.$HiSuffix/; if ($ModuleName{'new'} ne $hiname) { - ($hidir = $hifile_target) =~ s/([^\/]*\/)*.*\.$HiSuffix/$1/; + ($hidir = $hifile_target) =~ s/(.*)$hiname\.$HiSuffix/$1/; $hifile_target = $hidir . $ModuleName{'new'} . ".$HiSuffix"; } }