[project @ 1999-01-19 08:33:14 by sof]
authorsof <unknown>
Tue, 19 Jan 1999 08:33:14 +0000 (08:33 +0000)
committersof <unknown>
Tue, 19 Jan 1999 08:33:14 +0000 (08:33 +0000)
constructNewHiFile: regular expressions which substituted new
module filename for old in hifile_target, didn't quite work.

ghc/driver/ghc-iface.lprl

index 02c0793..491b2af 100644 (file)
@@ -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";
         }
     }