git.iko.soy/typeable/pandoc
on e02fb21 help sign in
130 lines 4.5 kB history raw
1% Installing pandoc
3The following instructions are for installing pandoc from source. Binary
4packages are also available for Windows, MacOS X, Linux (Debian and
5derivatives), and FreeBSD. See the [pandoc home page] for more details.
7[pandoc home page]: http://sophos.berkeley.edu/macfarlane/pandoc/
9# Installing GHC
11To compile Pandoc, you'll need [GHC] version 6.6 or greater. If
12you don't have GHC already, you can get it from the [GHC Download]
13page. If you're running MacOS X, you can also install GHC using
14[MacPorts] or [Fink].
16[GHC]: http://www.haskell.org/ghc/
17[GHC Download]: http://www.haskell.org/ghc/download.html
18[MacPorts]: http://macports.org
19[Fink]: http://finkproject.org
21You'll also need standard build tools: [GNU `make`], `sed`, `bash`,
22and `perl`. These are standard on unix systems (including MacOS
23X). If you're using Windows, you can install [Cygwin].
25[Cygwin]: http://www.cygwin.com/
26[GNU `make`]: http://www.gnu.org/software/make/
28# Installing Pandoc
301. Change to the directory containing the Pandoc distribution.
322. Compile:
34 make
36 If you get "Unknown modifier" errors, it is probably because `make`
37 on your system is not [GNU `make`]. Try using `gmake` instead.
393. See if it worked (optional, but recommended):
41 make test
434. Install:
45 sudo make install
47 Note: This installs `pandoc`, together with its wrappers and
48 documentation, into the `/usr/local` directory. If you'd rather
49 install `pandoc` somewhere else--say, in `/opt/local`--you can
50 set the `PREFIX` environment variable:
52 PREFIX=/opt/local sudo make install
54 If you don't have root privileges or would prefer to install
55 `pandoc` and the associated wrappers into your `~/bin` directory,
56 type this instead:
58 PREFIX=~ make install-exec
605. Build and install the Haskell libraries and library
61 documentation (optional--for Haskell programmers only):
63 make build-all
64 sudo make install-all
66 Note that building the library documentation requires [haddock].
68[haddock]: http://www.haskell.org/haddock/
70# Removing Pandoc
72Each of the installation steps described above can be reversed:
74 sudo make uninstall
76 PREFIX=~ make uninstall-exec
78 sudo make uninstall-all
80# Other targets
82The following 'make' targets should not be needed by the average user,
83but are documented here for packagers and developers:
85## Building and installing
87* `configure`: Performs the needed preprocessing to create a proper
88 Cabal package for Pandoc:
89 - Builds `ASCIIMathML.hs`, `DefaultHeaders.hs`, and `S5.hs`
90 from templates in `src/templates` and data in `src/ASCIIMathML.js`,
91 `src/ui`, and `src/headers`.
92 - Stores values of relevant environment variables in `vars` for
93 persistence.
94 - Runs Cabal's "configure" command.
95* `build-exec`: Builds `pandoc` executable (using Cabal's "build"
96 command) and creates the wrappers `html2markdown` and `markdown2pdf`
97 from templates in `src/wrappers`.
98* `build-doc`: Builds program documentation (e.g. `README.html`).
99* `build-lib-doc`: Builds Haddock documentation for Pandoc libraries.
100* `install-doc`, `uninstall-doc`: Installs/uninstalls user documentation
101 and man pages.
102* `install-lib-doc`, `uninstall-lib-doc`: Installs/uninstalls library
103 documentation and man pages.
104* `install-exec`, `uninstall-exec`: Installs/uninstalls programs
105 (`pandoc` and wrappers).
107## Testing
109* `test`: Runs Pandoc's test suite. (All tests should pass.)
110* `test-markdown`: Runs the Markdown regression test suite, using
111 `pandoc --strict`. (Three of the tests will fail.)
113## Cleaning
115* `clean`: Restores directory to pre-build state, removing generated files.
116* `distclean`: Like clean, but also cleans up files created by `make deb`.
118## Packaging
120* `tarball`: Creates a source tarball for distribution.
121* `deb`: Creates debian packages in `..` directory.
122* `osx-pkg-prep`: Prepares for building a MacOS X package.
123* `osx-pkg`: Builds a MacOS X package (must be run as root, and on OS X).
124 You should make `osx-pkg-prep` first (not as root).
125* `osx-dmg`: Creates a compressed disk image containing Mac OS X package
126 (must be run on OS X). You should make `osx-pkg` first.
127* `win-pkg`: Creates a Windows binary package (presupposes `pandoc.exe`,
128 which must be created by building Pandoc on a Windows machine).
129* `website`: Creates Pandoc's website in `web/pandoc` directory.