Commit b344850c authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files

Comments.

parent 3e460386
...@@ -120,10 +120,15 @@ data SetupScriptOptions = SetupScriptOptions { ...@@ -120,10 +120,15 @@ data SetupScriptOptions = SetupScriptOptions {
useWorkingDir :: Maybe FilePath, useWorkingDir :: Maybe FilePath,
forceExternalSetupMethod :: Bool, forceExternalSetupMethod :: Bool,
-- Used only by 'cabal clean' on Windows.
--
-- Note: win32 clean hack
-------------------------
-- On Windows, running './dist/setup/setup clean' doesn't work because the -- On Windows, running './dist/setup/setup clean' doesn't work because the
-- setup script will try to delete itself. So we have to move the setup exe -- setup script will try to delete itself (which causes it to fail horribly,
-- out of the way first and then delete it manually. This applies only to -- unlike on Linux). So we have to move the setup exe out of the way first
-- the external setup method. -- and then delete it manually. This applies only to the external setup
-- method.
useWin32CleanHack :: Bool, useWin32CleanHack :: Bool,
-- Used only when calling setupWrapper from parallel code to serialise -- Used only when calling setupWrapper from parallel code to serialise
...@@ -396,7 +401,7 @@ externalSetupMethod verbosity options pkg bt mkargs = do ...@@ -396,7 +401,7 @@ externalSetupMethod verbosity options pkg bt mkargs = do
(useProgramConfig options') verbosity (useProgramConfig options') verbosity
return (comp, conf) return (comp, conf)
-- Whenever we need to call configureCompiler, we also need to access the -- Whenever we need to call configureCompiler, we also need to access the
-- package index, so let's cache it here. -- package index, so let's cache it in SetupScriptOptions.
index <- maybeGetInstalledPackages options' comp conf index <- maybeGetInstalledPackages options' comp conf
return (comp, conf, options' { useCompiler = Just comp, return (comp, conf, options' { useCompiler = Just comp,
usePackageIndex = Just index, usePackageIndex = Just index,
...@@ -509,6 +514,7 @@ externalSetupMethod verbosity options pkg bt mkargs = do ...@@ -509,6 +514,7 @@ externalSetupMethod verbosity options pkg bt mkargs = do
-- working directory. -- working directory.
path' <- tryCanonicalizePath path path' <- tryCanonicalizePath path
-- See 'Note: win32 clean hack' above.
#if mingw32_HOST_OS #if mingw32_HOST_OS
setupProgFile' <- tryCanonicalizePath setupProgFile setupProgFile' <- tryCanonicalizePath setupProgFile
let win32CleanHackNeeded = (useWin32CleanHack options') let win32CleanHackNeeded = (useWin32CleanHack options')
......
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