Fix missing autogen files when dist/setup-config already exists (Issue #621)

This commit is contained in:
Daniel Gröber
2015-09-23 12:01:37 +02:00
parent 6f0eb46db9
commit df455a3618
3 changed files with 75 additions and 50 deletions

View File

@@ -200,7 +200,16 @@ setupConfigPath dist = dist </> "setup-config"
-- localBuildInfoFile defaultDistPref
macrosHeaderPath :: FilePath
macrosHeaderPath = "build/autogen/cabal_macros.h"
macrosHeaderPath = autogenModulesDir </> "cabal_macros.h"
autogenModulePath :: String -> String
autogenModulePath pkg_name =
autogenModulesDir </> ("Paths_" ++ map fixchar pkg_name) <.> ".hs"
where fixchar '-' = '_'
fixchar c = c
autogenModulesDir :: FilePath
autogenModulesDir = "build" </> "autogen"
ghcSandboxPkgDbDir :: String -> String
ghcSandboxPkgDbDir buildPlatf = do