diff options
| author | gregoire.detrez <gregoire.detrez@gu.se> | 2014-10-15 08:51:39 +0000 |
|---|---|---|
| committer | gregoire.detrez <gregoire.detrez@gu.se> | 2014-10-15 08:51:39 +0000 |
| commit | 8381c7b0c05c7086325c7adcebc1cfe7fffd6ad4 (patch) | |
| tree | aa58a935592810638e02d8dd88f0e4c1c621a329 /Setup.hs | |
| parent | 503a29e00249dccb7c862586e6990d9145b27a9d (diff) | |
Make `cabal sdist` fail with an informative error message`
Diffstat (limited to 'Setup.hs')
| -rw-r--r-- | Setup.hs | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -28,7 +28,7 @@ main = defaultMainWithHooks simpleUserHooks{ preBuild = gfPreBuild , postInst = gfPostInst , preCopy = const . checkRGLArgs , postCopy = gfPostCopy --- , sDistHook = sdistRGL + , sDistHook = sdistError } where gfPreBuild args = gfPre args . buildDistPref @@ -182,6 +182,12 @@ sdistRGL pkg mb_lbi hooks flags = do else return 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_dst_dir lbi = buildDir lbi </> "rgl" |
