Removed 'library' Cabal flag.

Reason: starting with Cabal 1.8, installing pandoc with '-library
+executable' did not work, since the build-depends in the Library
stanza were ignored. The problem could be solved by repeating the
build-depends in the Executable stanza, but this seems non-ideal
(and might lead to errors later on).  The '-library' option isn't
so useful anyway, since to compile pandoc in the first place, you
need a large number of Haskell libraries installed, and in this
case, why balk at another? It was chiefly intended for packagers,
but packagers will need to use a chroot environment anyway, and
they can then simply copy the executable and not the library.

Thanks to Jim Pryor for calling the problem to my attention
in connection with an arch linux package.
This commit is contained in:
John MacFarlane 2010-04-10 11:16:48 -07:00
parent e365c5950b
commit 7d8c8c7880
2 changed files with 7 additions and 14 deletions

12
INSTALL
View file

@ -68,19 +68,19 @@ you will need [zip-archive] and (if you want syntax highlighting)
preceded by a `-` (to force the flag to `false`), and separated preceded by a `-` (to force the flag to `false`), and separated
by spaces. Pandoc's flags include: by spaces. Pandoc's flags include:
- `library`: build the library (default yes)
- `executable`: build the pandoc executable (default yes) - `executable`: build the pandoc executable (default yes)
- `wrappers`: build the wrappers `markdown2pdf` and `hsmarkdown` - `wrappers`: build the wrapper `markdown2pdf` (default yes)
(default yes)
- `highlighting`: compile with syntax highlighting support (increases - `highlighting`: compile with syntax highlighting support (increases
the size of the executable) (default no) the size of the executable) (default no)
- `citeproc`: compile with bibliographic support using `citeproc-hs`
(default no)
So, for example, So, for example,
--flags="-library highlighting" --flags="-executable -wrappers highlighting"
tells Cabal to build the executable but not the library, and to tells Cabal to build the library but not the executables,
compile with syntax highlighting support. and to compile with syntax highlighting support.
3. Build: 3. Build:

View file

@ -131,9 +131,6 @@ Flag executable
Flag wrappers Flag wrappers
Description: Build the wrappers (markdown2pdf). Description: Build the wrappers (markdown2pdf).
Default: True Default: True
Flag library
Description: Build the pandoc library.
Default: True
Flag citeproc Flag citeproc
Description: Compile in support for citeproc-hs bibliographic formatting. Description: Compile in support for citeproc-hs bibliographic formatting.
Default: False Default: False
@ -192,11 +189,7 @@ Library
else else
Ghc-Options: -O2 -Wall Ghc-Options: -O2 -Wall
Ghc-Prof-Options: -auto-all -caf-all Ghc-Prof-Options: -auto-all -caf-all
Buildable: True
if flag(library)
Buildable: True
else
Buildable: False
Executable pandoc Executable pandoc
Hs-Source-Dirs: src Hs-Source-Dirs: src