mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
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.
This commit is contained in:
4
Setup.hs
4
Setup.hs
@@ -374,12 +374,14 @@ default_gf pkg lbi = buildDir lbi </> exeName' </> exeNameReal
|
|||||||
-- | Create autogen module with detailed version info by querying darcs
|
-- | Create autogen module with detailed version info by querying darcs
|
||||||
extractDarcsVersion distFlag =
|
extractDarcsVersion distFlag =
|
||||||
do info <- E.try askDarcs
|
do info <- E.try askDarcs
|
||||||
|
createDirectoryIfMissing True autogenPath
|
||||||
updateFile versionModulePath $ unlines $
|
updateFile versionModulePath $ unlines $
|
||||||
["module "++modname++" where",
|
["module "++modname++" where",
|
||||||
"darcs_info = "++show (either (const (Left ())) Right info)]
|
"darcs_info = "++show (either (const (Left ())) Right info)]
|
||||||
where
|
where
|
||||||
dist = fromFlagOrDefault "dist" distFlag
|
dist = fromFlagOrDefault "dist" distFlag
|
||||||
versionModulePath = dist</>"build"</>"autogen"</>"DarcsVersion_gf.hs"
|
autogenPath = dist</>"build"</>"autogen"
|
||||||
|
versionModulePath = autogenPath</>"DarcsVersion_gf.hs"
|
||||||
modname = "DarcsVersion_gf"
|
modname = "DarcsVersion_gf"
|
||||||
|
|
||||||
askDarcs =
|
askDarcs =
|
||||||
|
|||||||
Reference in New Issue
Block a user