Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a -fdochack flag to yi.cabal for building documentation.

  • Loading branch information...
commit 3ec342942707e42e1ce465196267784473d9be50 1 parent 8b81ca3
@reinerp reinerp authored
Showing with 32 additions and 6 deletions.
  1. +15 −0 README.md
  2. +17 −6 yi/yi.cabal
View
15 README.md
@@ -56,6 +56,20 @@ To get the git version,
(There may be more repositories in the future, as yi is split more.)
+## Generating documentation
+
+Due to [a cabal bug][cabal656], documentation won't be generated when running 'cabal install yi'. Use the following workaround:
+
+ $ cabal install -fdochack yi
+
+This command will install the yi library with documentation, but not the yi executable. To install the executable, simply run
+
+ $ cabal install yi
+
+after the documentation has been generated.
+
+Note that this workaround works for the versions of yi available on git, but not for the version 0.6.3.0 on Hackage.
+
## Reporting Bugs
We have a [Google Code][googlecode] that hosts our issues list. Please report issues at the [issues list][issueslist] hosted there.
@@ -126,3 +140,4 @@ Of course, feel free to adjust those rules to your needs. If you go for the prof
[yi-devel]: http://groups.google.com/group/yi-devel
[dyre]: http://hackage.haskell.org/package/dyre
[userconfigs]: https://github.com/yi-editor/yi/tree/master/yi-contrib/src/Yi/Config/Users
+[cabal656]: http://hackage.haskell.org/trac/hackage/ticket/656
View
23 yi/yi.cabal
@@ -63,6 +63,13 @@ flag hacking
flag testing
Description: bake-in the self-checks
+flag dochack
+ Default: False
+ Description:
+ Hack to get Haddock documentation, by disabling executables.
+ * this is a workaround for a cabal bug; see Issue #347
+ * do a 'cabal install yi -fdochack' followed by 'cabal install yi' to get yi and the documentation
+
library
hs-source-dirs: src/library
default-language: Haskell2010
@@ -330,7 +337,7 @@ executable parserTest
hs-source-dirs: src/parsertest
default-language: Haskell2010
- if !flag(hacking)
+ if !flag(hacking) || flag(dochack)
buildable: False
main-is: ParserTest/ParserTest.hs
@@ -340,21 +347,25 @@ executable parserTest
array,
containers,
directory,
- filepath>=1.1 && <1.3,
- yi
+ filepath>=1.1 && <1.3
+ if !flag(dochack)
+ build-depends: yi
executable yi
hs-source-dirs: src/executable
default-language: Haskell2010
+ if flag(dochack)
+ buildable: False
+
if flag(hacking)
main-is: HackerMain.hs
else
main-is: Main.hs
build-depends:
- base >=4 && <5,
- yi
-
+ base >=4 && <5
+ if !flag(dochack)
+ build-depends: yi
build-tools: alex
ghc-options: -threaded
Please sign in to comment.
Something went wrong with that request. Please try again.