Fix the inplace compiler finding package.conf on Windows
authorIan Lynagh <igloo@earth.li>
Wed, 16 Jul 2008 21:50:00 +0000 (21:50 +0000)
committerIan Lynagh <igloo@earth.li>
Wed, 16 Jul 2008 21:50:00 +0000 (21:50 +0000)
compiler/main/SysTools.lhs

index 9d53b81..1538b95 100644 (file)
@@ -163,9 +163,12 @@ initSysTools mbMinusB dflags0
         ; let installed, installed_bin :: FilePath -> FilePath
               installed_bin pgm  = top_dir </> pgm
               installed     file = top_dir </> file
+              inplaceUpDirs
+               | isWindowsHost = 2
+               | otherwise     = 4
               inplace dir   pgm  = let real_top_dir = foldr (</>) ""
                                                     $ reverse
-                                                    $ drop 4
+                                                    $ drop inplaceUpDirs
                                                     $ reverse
                                                     $ splitDirectories top_dir
                                    in real_top_dir </> dir </> pgm