@@ -9,9 +9,17 @@ Quick install
9-------------
9-------------
111. Install the [Haskell platform]. This will give you [GHC] and
111. Install the [Haskell platform]. This will give you [GHC] and
12−the [cabal-install] build tool.
12+ the [cabal-install] build tool, as well as `alex` and `happy`.
13+ If you do not use the Haskell platform, you'll need to install
14+ `alex` and `happy` separately:
16+ cabal install alex happy
18+2. Update your package database:
14−2. Use `cabal` to install pandoc and its dependencies:
22+3. Use `cabal` to install pandoc and its dependencies:
16 cabal install pandoc
24 cabal install pandoc
@@ -23,15 +31,22 @@ the [cabal-install] build tool.
24 cabal install
32 cabal install
34+ Note: If you obtained the source from the git repository (rather
35+ than a release tarball), you'll need to do
37+ git submodule update --init
39+ to fetch the contents of `data/templates` before `cabal install`.
26−3. Make sure the `$CABALDIR/bin` directory is in your path. You should
41+4. Make sure the `$CABALDIR/bin` directory is in your path. You should
27−now be able to run `pandoc`:
42+ now be able to run `pandoc`:
29 pandoc --help
44 pandoc --help
31 [Not sure where `$CABALDIR` is?](http://www.haskell.org/haskellwiki/Cabal-Install#The_cabal-install_configuration_file)
46 [Not sure where `$CABALDIR` is?](http://www.haskell.org/haskellwiki/Cabal-Install#The_cabal-install_configuration_file)
33−4. Make sure the `$CABALDIR/share/man/man1` directory is in your `MANPATH`.
48+5. Make sure the `$CABALDIR/share/man/man1` directory is in your `MANPATH`.
34−You should now be able to access the `pandoc` man page:
49+ You should now be able to access the `pandoc` man page:
36 man pandoc
51 man pandoc
@@ -45,14 +60,19 @@ Custom install
45This is a step-by-step procedure that offers maximal control
60This is a step-by-step procedure that offers maximal control
46over the build and installation. Most users should use the
61over the build and installation. Most users should use the
47quick install, but this information may be of use to packagers.
62quick install, but this information may be of use to packagers.
48−For more details, see the [Cabal User's Guide].
63+For more details, see the [Cabal User's Guide]. These instructions
64+assume that the pandoc source directory is your working directory.
501. Install dependencies: in addition to the [Haskell platform],
661. Install dependencies: in addition to the [Haskell platform],
51−you will need [zip-archive], [blaze-html], and [highlighting-kate].
67+ you will need a number of additional libraries. You can install
71+ cabal install --only-dependencies
532. Configure:
732. Configure:
55− runghc Setup.hs configure --prefix=DIR --bindir=DIR --libdir=DIR \
75+ cabal configure --prefix=DIR --bindir=DIR --libdir=DIR \
56 --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \
76 --datadir=DIR --libsubdir=DIR --datasubdir=DIR --docdir=DIR \
57 --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \
77 --htmldir=DIR --program-prefix=PREFIX --program-suffix=SUFFIX \
58 --mandir=DIR --flags=FLAGSPEC
78 --mandir=DIR --flags=FLAGSPEC
@@ -64,26 +84,34 @@ you will need [zip-archive], [blaze-html], and [highlighting-kate].
64 preceded by a `-` (to force the flag to `false`), and separated
84 preceded by a `-` (to force the flag to `false`), and separated
65 by spaces. Pandoc's flags include:
85 by spaces. Pandoc's flags include:
67− - `blaze_html_0_5`: Use blaze-html >= 0.5 (default yes)
68− - `embed_data_files`: embed all data files into the binary (default no)
87+ - `embed_data_files`: embed all data files into the binary (default no).
88+ This is helpful if you want to create a relocatable binary.
89+ Note: if this option is selected, you need to install the
90+ `hsb2hs` preprocessor:
94+ - `http-conduit`: use the `http-conduit` library to fetch external
95+ resources (default yes -- without this, pandoc cannot make SSL
72− runghc Setup.hs build
100+ cabal build
744. Build API documentation:
1024. Build API documentation:
76− runghc Setup.hs haddock --html-location=URL --hyperlink-source
104+ cabal haddock --html-location=URL --hyperlink-source
785. Copy the files:
1065. Copy the files:
80− runghc Setup.hs copy --destdir=PATH
108+ cabal copy --destdir=PATH
82 The default destdir is `/`.
110 The default destdir is `/`.
846. Register pandoc as a GHC package:
1126. Register pandoc as a GHC package:
86− runghc Setup.hs register
114+ cabal register
88 Package managers may want to use the `--gen-script` option to
116 Package managers may want to use the `--gen-script` option to
89 generate a script that can be run to register the package at
117 generate a script that can be run to register the package at
@@ -109,7 +137,6 @@ you please.
109[blaze-html]: http://hackage.haskell.org/package/blaze-html
137[blaze-html]: http://hackage.haskell.org/package/blaze-html
110[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths
138[Cabal User's Guide]: http://www.haskell.org/cabal/release/latest/doc/users-guide/builders.html#setup-configure-paths
113Running tests
140Running tests
114-------------
141-------------
@@ -118,13 +145,6 @@ To build the tests:
119 cabal configure --enable-tests && cabal build
146 cabal configure --enable-tests && cabal build
121−Note: If you obtained the source via git, you should first do
123− git submodule update --init data/templates
125−to populate the templates subdirectory. (You can skip this step
126−if you obtained the source from a release tarball.)
128To run the tests:
148To run the tests:
130 cabal test
150 cabal test