mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 03:32:51 -06:00
Make cabal sdist fail with an informative error message`
This commit is contained in:
8
Setup.hs
8
Setup.hs
@@ -28,7 +28,7 @@ main = defaultMainWithHooks simpleUserHooks{ preBuild = gfPreBuild
|
|||||||
, postInst = gfPostInst
|
, postInst = gfPostInst
|
||||||
, preCopy = const . checkRGLArgs
|
, preCopy = const . checkRGLArgs
|
||||||
, postCopy = gfPostCopy
|
, postCopy = gfPostCopy
|
||||||
-- , sDistHook = sdistRGL
|
, sDistHook = sdistError
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
gfPreBuild args = gfPre args . buildDistPref
|
gfPreBuild args = gfPre args . buildDistPref
|
||||||
@@ -182,6 +182,12 @@ sdistRGL pkg mb_lbi hooks flags = do
|
|||||||
else return paths
|
else return paths
|
||||||
else getRGLFiles path paths
|
else getRGLFiles path paths
|
||||||
-}
|
-}
|
||||||
|
|
||||||
|
-- | Cabal doesn't know how to correctly create the source distribution, so
|
||||||
|
-- we print an error message with the correct instructions when someone tries
|
||||||
|
-- `cabal sdist`.
|
||||||
|
sdistError _ _ _ _ = fail "Error: Use `make sdist` to create the source distribution file"
|
||||||
|
|
||||||
rgl_src_dir = "lib" </> "src"
|
rgl_src_dir = "lib" </> "src"
|
||||||
rgl_dst_dir lbi = buildDir lbi </> "rgl"
|
rgl_dst_dir lbi = buildDir lbi </> "rgl"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user