X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=utils%2Fghc-cabal%2FMain.hs;h=72a5010f805f6eac9fc5dd2b7cc7b46072c959fb;hb=6cec61d14a324285dbb8ce73d4c7215f1f8d6766;hp=60f02e7ab604e76cb84824dc68a50cf9e2ff5903;hpb=8e4e15d8e837b90190b6b8e7645822772cab2053;p=ghc-hetmet.git diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs index 60f02e7..72a5010 100644 --- a/utils/ghc-cabal/Main.hs +++ b/utils/ghc-cabal/Main.hs @@ -371,15 +371,15 @@ generate config_args distdir directory ++ languageToFlags (compiler lbi) (defaultLanguage bi) ++ extensionsToFlags (compiler lbi) (usedExtensions bi) ++ programOverrideArgs ghcProg)), - variablePrefix ++ "_CC_OPTS = " ++ unwords (ccOptions bi), - variablePrefix ++ "_CPP_OPTS = " ++ unwords (cppOptions bi), - variablePrefix ++ "_LD_OPTS = " ++ unwords (ldOptions bi), + variablePrefix ++ "_CC_OPTS = " ++ unwords (ccOptions bi), + variablePrefix ++ "_CPP_OPTS = " ++ unwords (cppOptions bi), + variablePrefix ++ "_LD_OPTS = " ++ unwords (ldOptions bi), variablePrefix ++ "_DEP_INCLUDE_DIRS_SINGLE_QUOTED = " ++ unwords wrappedIncludeDirs, - variablePrefix ++ "_DEP_CC_OPTS = " ++ unwords (forDeps Installed.ccOptions), - variablePrefix ++ "_DEP_LIB_DIRS_SINGLE_QUOTED = " ++ unwords wrappedLibraryDirs, - variablePrefix ++ "_DEP_EXTRA_LIBS = " ++ unwords (forDeps Installed.extraLibraries), - variablePrefix ++ "_DEP_LD_OPTS = " ++ unwords (forDeps Installed.ldOptions), - variablePrefix ++ "_BUILD_GHCI_LIB = " ++ boolToYesNo (withGHCiLib lbi), + variablePrefix ++ "_DEP_CC_OPTS = " ++ unwords (forDeps Installed.ccOptions), + variablePrefix ++ "_DEP_LIB_DIRS_SINGLE_QUOTED = " ++ unwords wrappedLibraryDirs, + variablePrefix ++ "_DEP_EXTRA_LIBS = " ++ unwords (forDeps Installed.extraLibraries), + variablePrefix ++ "_DEP_LD_OPTS = " ++ unwords (forDeps Installed.ldOptions), + variablePrefix ++ "_BUILD_GHCI_LIB = " ++ boolToYesNo (withGHCiLib lbi), "", -- Sometimes we need to modify the automatically-generated package-data.mk -- bindings in a special way for the GHC build system, so allow that here: @@ -393,13 +393,13 @@ generate config_args distdir directory escape = foldr (\c xs -> if c == '#' then '\\':'#':xs else c:xs) [] wrap = mapM wrap1 wrap1 s - | null s = die "Wrapping empty value" - | '\'' `elem` s = die "Single quote in value to be wrapped" + | null s = die ["Wrapping empty value"] + | '\'' `elem` s = die ["Single quote in value to be wrapped:", s] -- We want to be able to assume things like is the -- start of a value, so check there are no spaces in confusing -- positions - | head s == ' ' = die "Leading space in value to be wrapped" - | last s == ' ' = die "Trailing space in value to be wrapped" + | head s == ' ' = die ["Leading space in value to be wrapped:", s] + | last s == ' ' = die ["Trailing space in value to be wrapped:", s] | otherwise = return ("\'" ++ s ++ "\'") boolToYesNo True = "YES" boolToYesNo False = "NO"