Use the ghc-perl tarball on Windows, instead of the msys one
authorIan Lynagh <igloo@earth.li>
Fri, 20 Nov 2009 15:39:53 +0000 (15:39 +0000)
committerIan Lynagh <igloo@earth.li>
Fri, 20 Nov 2009 15:39:53 +0000 (15:39 +0000)
compiler/main/SysTools.lhs
configure.ac

index c8960dc..5a0c45b 100644 (file)
@@ -159,6 +159,7 @@ initSysTools mbMinusB dflags0
         ; let installed :: FilePath -> FilePath
               installed file = top_dir </> file
               installed_mingw_bin file = top_dir </> ".." </> "mingw" </> "bin" </> file
+              installed_perl_bin file = top_dir </> ".." </> "perl" </> file
 
         ; let pkgconfig_path = installed "package.conf.d"
               ghc_usage_msg_path  = installed "ghc-usage.txt"
@@ -184,7 +185,7 @@ initSysTools mbMinusB dflags0
                 | isWindowsHost = installed_mingw_bin "gcc"
                 | otherwise     = cGCC
               perl_path
-                | isWindowsHost = installed_mingw_bin cGHC_PERL
+                | isWindowsHost = installed_perl_bin cGHC_PERL
                 | otherwise     = cGHC_PERL
               -- 'touch' is a GHC util for Windows
               touch_path
index aa333f6..29afd29 100644 (file)
@@ -405,14 +405,25 @@ then
             tar -zxf ../../ghc-tarballs/mingw/gcc-core*.tar.gz &&
             tar -jxf ../../ghc-tarballs/mingw/libcrypt*.tar.bz2 &&
             tar -zxf ../../ghc-tarballs/mingw/mingw-runtime*.tar.gz &&
-            tar -zxf ../../ghc-tarballs/mingw/msysCORE*.tar.gz &&
-            tar -jxf ../../ghc-tarballs/mingw/perl*.tar.bz2 &&
             tar -zxf ../../ghc-tarballs/mingw/w32api*.tar.gz &&
             mv bin/gcc.exe bin/realgcc.exe
         )
         inplace/mingw/bin/realgcc.exe driver/gcc/gcc.c driver/utils/getLocation.c -Idriver/utils -o inplace/mingw/bin/gcc.exe
         AC_MSG_NOTICE([In-tree mingw tree created])
     fi
+    if ! test -d inplace/perl ||
+         test inplace/perl -ot ghc-tarballs/perl/ghc-perl*.tar.gz
+    then
+        AC_MSG_NOTICE([Making in-tree perl tree])
+        rm -rf inplace/perl
+        mkdir inplace
+        mkdir inplace/perl
+        (
+            cd inplace/perl &&
+            tar -zxf ../../ghc-tarballs/perl/ghc-perl*.tar.gz
+        )
+        AC_MSG_NOTICE([In-tree perl tree created])
+    fi
 fi
 
 dnl ** Which gcc to use?