Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
d7bbef5b
Commit
d7bbef5b
authored
Nov 10, 2013
by
Mikhail Glushenkov
Browse files
Unlit 'Setup.lhs' before copying to 'dist/setup/setup.hs'.
Fixes #1573.
parent
6b06b6ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/SetupWrapper.hs
View file @
d7bbef5b
...
...
@@ -43,6 +43,8 @@ import Distribution.Compiler ( buildCompilerId )
import
Distribution.Simple.Compiler
(
CompilerFlavor
(
GHC
),
Compiler
(
compilerId
)
,
PackageDB
(
..
),
PackageDBStack
)
import
Distribution.Simple.PreProcess
(
runSimplePreProcessor
,
ppUnlit
)
import
Distribution.Simple.Program
(
ProgramConfiguration
,
emptyProgramConfiguration
,
getProgramSearchPath
,
getDbProgramOutput
,
runDbProgram
,
ghcProgram
)
...
...
@@ -295,7 +297,9 @@ externalSetupMethod verbosity options pkg bt mkargs = do
"Using 'build-type: Custom' but there is no Setup.hs or Setup.lhs script."
let
src
=
(
if
useHs
then
customSetupHs
else
customSetupLhs
)
srcNewer
<-
src
`
moreRecentFile
`
setupHs
when
srcNewer
$
copyFileVerbose
verbosity
src
setupHs
when
srcNewer
$
if
useHs
then
copyFileVerbose
verbosity
src
setupHs
else
runSimplePreProcessor
ppUnlit
src
setupHs
verbosity
where
customSetupHs
=
workingDir
</>
"Setup.hs"
customSetupLhs
=
workingDir
</>
"Setup.lhs"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment