5To compile Pandoc, you'll need [GHC] version 6.6 or greater. If
6you don't have GHC already, you can get it from the [GHC Download]
9[GHC]: http://www.haskell.org/ghc/
10[GHC Download]: http://www.haskell.org/ghc/download.html
12You'll also need standard build tools: [GNU `make`], `sed`, `bash`,
13and `perl`. These are standard on unix systems (including MacOS
14X). If you're using Windows, you can install [Cygwin].
16[Cygwin]: http://www.cygwin.com/
17[GNU `make`]: http://www.gnu.org/software/make/
211. Change to the directory containing the Pandoc distribution.
27 If you get "Unknown modifier" errors, it is probably because `make`
28 on your system is not [GNU `make`]. Try using `gmake` instead.
303. See if it worked (optional, but recommended):
34 If you want to try `pandoc` before installing it (the next step),
35 run it with a `./` prefix, as follows:
39 If you want to try the shell scripts (`hsmarkdown`, `html2markdown`,
40 and `markdown2pdf`) before installing `pandoc`, you will need to set
41 your path to include the build directory, so that the scripts will
42 find the version of `pandoc` you have just built. So, for example:
44 PATH=.:$PATH html2markdown http://haskell.org
50 Note: This installs `pandoc`, together with its wrappers and
51 documentation, into the `/usr/local` directory. If you'd rather
52 install `pandoc` somewhere else--say, in `/opt/local`--you can
53 set the `PREFIX` environment variable:
55 PREFIX=/opt/local sudo make install
57 If you don't have root privileges or would prefer to install
58 `pandoc` and the associated wrappers into your `~/bin` directory,
61 PREFIX=~ make install-exec
635. Build and install the Haskell libraries and library
64 documentation (optional--for Haskell programmers only):
71Each of the installation steps described above can be reversed:
75 PREFIX=~ make uninstall-exec
77 sudo make uninstall-all
81The following 'make' targets should not be needed by the average user,
82but are documented here for packagers and developers:
84## Building and installing
86* `configure`: Performs the needed preprocessing to create a proper
87 Cabal package for Pandoc:
88 - Builds `ASCIIMathML.hs`, `DefaultHeaders.hs`, and `S5.hs`
89 from templates in `src/templates` and data in `src/ASCIIMathML.js`,
90 `src/ui`, and `src/headers`.
91 - Stores values of relevant environment variables in `vars` for
93 - Runs Cabal's "configure" command.
94* `build-exec`: Builds `pandoc` executable (using Cabal's "build"
95 command) and creates the wrappers `html2markdown` and `markdown2pdf`
96 from templates in `src/wrappers`.
97* `build-doc`: Builds program documentation (e.g. `README.html`).
98* `build-lib-doc`: Builds Haddock documentation for Pandoc libraries.
99* `install-doc`, `uninstall-doc`: Installs/uninstalls user documentation
101* `install-lib-doc`, `uninstall-lib-doc`: Installs/uninstalls library
102 documentation and man pages.
103* `install-exec`, `uninstall-exec`: Installs/uninstalls programs
104 (`pandoc` and wrappers).
108* `test`: Runs Pandoc's test suite. (All tests should pass.)
109* `test-markdown`: Runs the Markdown regression test suite, using
110 `pandoc --strict`. (One of the list tests will fail.)
114* `clean`: Restores directory to pre-build state, removing generated files.
115* `distclean`: Like clean, but also cleans up files created by `make deb`.
119* `osx-pkg-prep`: Prepares for building a MacOS X package.
120* `osx-pkg`: Builds a MacOS X package (must be run as root, and on OS X).
121 You should make `osx-pkg-prep` first (not as root).
122* `osx-dmg`: Creates a compressed disk image containing Mac OS X package
123 (must be run on OS X). You should make `osx-pkg` first.
124* `win-pkg`: Creates a Windows binary package (presupposes `pandoc.exe`,
125 which must be created by building Pandoc on a Windows machine).
126* `tarball`: Creates a source tarball for distribution.
127* `deb`: Creates debian packages in `..` directory.
128* `website`: Creates Pandoc's website in `web/pandoc` directory.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list