summaryrefslogtreecommitdiff
path: root/utils/ghc-cabal
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-03-05 14:48:25 +0000
committerIan Lynagh <igloo@earth.li>2011-03-05 14:48:25 +0000
commite28cbcd8bbb9a5730b370fad7d974c460132554a (patch)
treec8c2aa124a4094abcea04691e14c7550d826a4d8 /utils/ghc-cabal
parent61899158575bc64e692d6ab350c43c5d8ec1d8e2 (diff)
downloadhaskell-e28cbcd8bbb9a5730b370fad7d974c460132554a.tar.gz
Avoid some shell calls in the build system
The DEP_INCLUDE_DIRS and DEP_LIB_DIRS variables always contain single-quote dirs, so we can use e.g. $(subst $(space)',$(space)-L',$(space)$($1_$2_DEP_LIB_DIRS_SINGLE_QUOTED)) to add -L to the front of each dir. I've appended "_SINGLE_QUOTED" to the variable names so we don't accidentally add bare directories to them.
Diffstat (limited to 'utils/ghc-cabal')
-rw-r--r--utils/ghc-cabal/Main.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index d75696fa2c..02c41db137 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -371,9 +371,9 @@ generate config_args distdir directory
variablePrefix ++ "_CC_OPTS = " ++ unwords (ccOptions bi),
variablePrefix ++ "_CPP_OPTS = " ++ unwords (cppOptions bi),
variablePrefix ++ "_LD_OPTS = " ++ unwords (ldOptions bi),
- variablePrefix ++ "_DEP_INCLUDE_DIRS = " ++ unwords (wrap $ forDeps Installed.includeDirs),
+ variablePrefix ++ "_DEP_INCLUDE_DIRS_SINGLE_QUOTED = " ++ unwords (wrap $ forDeps Installed.includeDirs),
variablePrefix ++ "_DEP_CC_OPTS = " ++ unwords (forDeps Installed.ccOptions),
- variablePrefix ++ "_DEP_LIB_DIRS = " ++ unwords (wrap $ forDeps Installed.libraryDirs),
+ variablePrefix ++ "_DEP_LIB_DIRS_SINGLE_QUOTED = " ++ unwords (wrap $ forDeps Installed.libraryDirs),
variablePrefix ++ "_DEP_EXTRA_LIBS = " ++ unwords (forDeps Installed.extraLibraries),
variablePrefix ++ "_DEP_LD_OPTS = " ++ unwords (forDeps Installed.ldOptions),
variablePrefix ++ "_BUILD_GHCI_LIB = " ++ boolToYesNo (withGHCiLib lbi),