Commit 6ecb8d38 authored by Ian Lynagh's avatar Ian Lynagh

Move more commands into the settings file

parent 1003471c
......@@ -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' >> $@
......
......@@ -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
......
......@@ -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
......
......@@ -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
#
......
......@@ -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@")]
......@@ -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') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment