Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6ecb8d38b38e134760cf6fd88b078b224b2d8424

>---------------------------------------------------------------

commit 6ecb8d38b38e134760cf6fd88b078b224b2d8424
Author: Ian Lynagh <[email protected]>
Date:   Wed Jun 22 19:10:03 2011 +0100

    Move more commands into the settings file

>---------------------------------------------------------------

 compiler/ghc.mk            |    2 --
 compiler/main/SysTools.lhs |   24 +++++++-----------------
 configure.ac               |   12 ++++++++++++
 mk/config.mk.in            |    5 -----
 settings.in                |    5 ++++-
 sync-all                   |    1 +
 6 files changed, 24 insertions(+), 25 deletions(-)

diff --git a/compiler/ghc.mk b/compiler/ghc.mk
index 8ed34c3..cf75447 100644
--- a/compiler/ghc.mk
+++ b/compiler/ghc.mk
@@ -94,8 +94,6 @@ compiler/stage%/build/Config.hs : mk/config.mk mk/project.mk 
| $$(dir $$@)/.
        @echo 'cLeadingUnderscore    = "$(LeadingUnderscore)"'              >> 
$@
        @echo 'cRAWCPP_FLAGS         :: String'                             >> 
$@
        @echo 'cRAWCPP_FLAGS         = "$(RAWCPP_FLAGS)"'                   >> 
$@
-       @echo 'cMKDLL                :: String'                             >> 
$@
-       @echo 'cMKDLL                = "$(BLD_DLL)"'                        >> 
$@
        @echo 'cLdIsGNULd            :: String'                             >> 
$@
        @echo 'cLdIsGNULd            = "$(LdIsGNULd)"'                      >> 
$@
        @echo 'cLdHasBuildId         :: String'                             >> 
$@
diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
index edc580c..7768b4f 100644
--- a/compiler/main/SysTools.lhs
+++ b/compiler/main/SysTools.lhs
@@ -162,8 +162,6 @@ initSysTools mbMinusB
         ; let settingsFile = top_dir </> "settings"
               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
 
         ; settingsStr <- readFile settingsFile
         ; mySettings <- case maybeReadFuzzy settingsStr of
@@ -191,9 +189,7 @@ initSysTools mbMinusB
         ; gcc_prog <- getSetting "C compiler command"
         ; gcc_args_str <- getSetting "C compiler flags"
         ; let gcc_args = map Option (words gcc_args_str)
-        ; perl_path <- if isWindowsHost
-                       then return $ installed_perl_bin "perl"
-                       else getSetting "perl command"
+        ; perl_path <- getSetting "perl command"
 
         ; let pkgconfig_path = installed "package.conf.d"
               ghc_usage_msg_path  = installed "ghc-usage.txt"
@@ -206,16 +202,13 @@ initSysTools mbMinusB
                 -- split is a Perl script
               split_script  = installed cGHC_SPLIT_PGM
 
-              windres_path  = installed_mingw_bin "windres"
+        ; windres_path <- getSetting "windres command"
 
         ; tmpdir <- getTemporaryDirectory
 
-        ; let
-              -- 'touch' is a GHC util for Windows
-              touch_path
-                | isWindowsHost = installed cGHC_TOUCHY_PGM
-                | otherwise     = "touch"
-              -- On Win32 we don't want to rely on #!/bin/perl, so we prepend
+        ; touch_path <- getSetting "touch command"
+
+        ; let -- On Win32 we don't want to rely on #!/bin/perl, so we prepend
               -- a call to Perl to get the invocation of split.
               -- On Unix, scripts are invoked using the '#!' method.  Binary
               -- installations of GHC on Unix place the correct line on the
@@ -224,11 +217,8 @@ initSysTools mbMinusB
               (split_prog,  split_args)
                 | isWindowsHost = (perl_path,    [Option split_script])
                 | otherwise     = (split_script, [])
-              (mkdll_prog, mkdll_args)
-                | not isWindowsHost
-                    = panic "Can't build DLLs on a non-Win32 system"
-                | otherwise =
-                    (installed_mingw_bin cMKDLL, [])
+        ; mkdll_prog <- getSetting "dllwrap command"
+        ; let mkdll_args = []
 
         -- cpp is derived from gcc on all platforms
         -- HACK, see setPgmP below. We keep 'words' here to remember to fix
diff --git a/configure.ac b/configure.ac
index 680456d..9d3bb3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -576,12 +576,24 @@ if test "$windows" = YES
 then
     SettingsCCompilerCommand='$topdir/../mingw/bin/gcc.exe'
     SettingsCCompilerFlags=''
+    SettingsPerlCommand='$topdir/../perl/perl.exe'
+    SettingsDllWrapCommand='$topdir/../mingw/bin/dllwrap.exe'
+    SettingsWindresCommand='$topdir/../mingw/bin/windres.exe'
+    SettingsTouchCommand='$topdir/touch.exe'
 else
     SettingsCCompilerCommand="$WhatGccIsCalled"
     SettingsCCompilerFlags="$CONF_CC_OPTS_STAGE2"
+    SettingsPerlCommand="$PerlCmd"
+    SettingsDllWrapCommand="/bin/false"
+    SettingsWindresCommand="/bin/false"
+    SettingsTouchCommand='touch'
 fi
 AC_SUBST(SettingsCCompilerCommand)
 AC_SUBST(SettingsCCompilerFlags)
+AC_SUBST(SettingsPerlCommand)
+AC_SUBST(SettingsDllWrapCommand)
+AC_SUBST(SettingsWindresCommand)
+AC_SUBST(SettingsTouchCommand)
 
 dnl ** figure out how to do context diffs
 FP_PROG_CONTEXT_DIFF
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 18e60e7..87f80f7 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -417,9 +417,6 @@ SRC_HC_OPTS += -H32m -O
 # These flags make flex 8-bit
 SRC_FLEX_OPTS  += -8
 
-# Default fptools options for dllwrap.
-SRC_BLD_DLL_OPTS += --target=i386-mingw32
-
 # Flags for CPP when running GreenCard on .pgc files
 GC_CPP_OPTS += -P -E -x c -traditional -D__GLASGOW_HASKELL__
 
@@ -742,8 +739,6 @@ XSLTPROC_LABEL_OPTS  = --stringparam toc.section.depth 3 \
 #-----------------------------------------------------------------------------
 #              FPtools support software
 
-BLD_DLL                        = dllwrap
-
 #
 # ghc-pkg
 #
diff --git a/settings.in b/settings.in
index a82bd35..6ddeb18 100644
--- a/settings.in
+++ b/settings.in
@@ -4,5 +4,8 @@
  ("ar command", "@ArCmd@"),
  ("ar flags", "@ArArgs@"),
  ("ar supports at file", "@ArSupportsAtFile@"),
- ("perl command", "@PerlCmd@")]
+ ("touch command", "@SettingsTouchCommand@"),
+ ("dllwrap command", "@SettingsDllWrapCommand@"),
+ ("windres command", "@SettingsWindresCommand@"),
+ ("perl command", "@SettingsPerlCommand@")]
 
diff --git a/sync-all b/sync-all
index b5c024c..02a6a57 100755
--- a/sync-all
+++ b/sync-all
@@ -368,6 +368,7 @@ sub scmall {
         }
         elsif ($command =~ /^remote$/) {
             my @scm_args;
+            $ignore_failure = 1;
             if ($subcommand eq 'add') {
                 @scm_args = ("remote", "add", $branch_name, $path);
             } elsif ($subcommand eq 'rm') {



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to