summaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorgregoire.detrez <gregoire.detrez@gu.se>2012-06-09 12:49:01 +0000
committergregoire.detrez <gregoire.detrez@gu.se>2012-06-09 12:49:01 +0000
commit12b2a0d665245bf26c3cf165d9c209f29d3e357c (patch)
tree44151a37f6c3ecf73cf6a1f50341c378eb5bfebf /Setup.hs
parent302b9f1b135953702cc7d31169a7746bd1be53ef (diff)
Small Setup.hs bug fix
Setup.hs failed to generate DarcsVersion_gf if dist/build/autogen does not exists.g Added a line to create the directory if absent.
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Setup.hs b/Setup.hs
index c0eee9101..1e6ee0b92 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -374,12 +374,14 @@ default_gf pkg lbi = buildDir lbi </> exeName' </> exeNameReal
-- | Create autogen module with detailed version info by querying darcs
extractDarcsVersion distFlag =
do info <- E.try askDarcs
+ createDirectoryIfMissing True autogenPath
updateFile versionModulePath $ unlines $
["module "++modname++" where",
"darcs_info = "++show (either (const (Left ())) Right info)]
where
dist = fromFlagOrDefault "dist" distFlag
- versionModulePath = dist</>"build"</>"autogen"</>"DarcsVersion_gf.hs"
+ autogenPath = dist</>"build"</>"autogen"
+ versionModulePath = autogenPath</>"DarcsVersion_gf.hs"
modname = "DarcsVersion_gf"
askDarcs =