2006-10-29 20:58:20 +01:00
|
|
|
% Installing Pandoc
|
|
|
|
|
|
|
|
# Installing GHC
|
|
|
|
|
2006-11-07 07:17:56 +01:00
|
|
|
To compile Pandoc, you'll need [GHC] version 6.4 or greater. If
|
|
|
|
you don't have GHC already, you can get it from the [GHC Download]
|
|
|
|
page.
|
2006-10-29 20:58:20 +01:00
|
|
|
|
|
|
|
[GHC]: http://www.haskell.org/ghc/
|
|
|
|
[GHC Download]: http://www.haskell.org/ghc/download.html
|
|
|
|
|
2006-11-19 22:24:33 +01:00
|
|
|
You'll also need standard build tools: [GNU `make`], `sed`, `bash`,
|
2006-11-07 07:17:56 +01:00
|
|
|
and `perl`. These are standard on unix systems (including MacOS
|
|
|
|
X). If you're using Windows, you can install [Cygwin].
|
2006-10-29 20:58:20 +01:00
|
|
|
|
|
|
|
[Cygwin]: http://www.cygwin.com/
|
2006-11-19 22:24:33 +01:00
|
|
|
[GNU `make`]: http://www.gnu.org/software/make/
|
2006-10-29 20:58:20 +01:00
|
|
|
|
|
|
|
# Installing Pandoc
|
|
|
|
|
|
|
|
1. Change to the directory containing the Pandoc distribution.
|
|
|
|
|
|
|
|
2. Compile:
|
|
|
|
|
|
|
|
make
|
|
|
|
|
2006-11-19 22:24:33 +01:00
|
|
|
If you get "Unknown modifier" errors, it is probably because `make`
|
|
|
|
on your system is not [GNU `make`]. Try using `gmake` instead.
|
|
|
|
|
2006-10-29 20:58:20 +01:00
|
|
|
3. See if it worked (optional, but recommended):
|
|
|
|
|
|
|
|
make test
|
|
|
|
|
|
|
|
4. Install:
|
|
|
|
|
2006-11-07 07:17:56 +01:00
|
|
|
sudo make install
|
2006-10-29 20:58:20 +01:00
|
|
|
|
|
|
|
Note: This installs `pandoc`, together with its wrappers and
|
2006-11-07 07:17:56 +01:00
|
|
|
documentation, into the `/usr/local` directory. If you don't
|
|
|
|
have root privileges or would prefer to install `pandoc` and
|
|
|
|
the associated wrappers into your `~/bin` directory, type
|
|
|
|
this instead:
|
2006-10-29 20:58:20 +01:00
|
|
|
|
|
|
|
PREFIX=~ make install-exec
|
|
|
|
|
2006-11-07 07:17:56 +01:00
|
|
|
5. Build and install the Haskell libraries and library
|
|
|
|
documentation (optional):
|
2006-10-29 20:58:20 +01:00
|
|
|
|
2006-11-07 07:17:56 +01:00
|
|
|
make build-all
|
|
|
|
sudo make install-all
|
2006-10-29 20:58:20 +01:00
|
|
|
|
|
|
|
# Removing Pandoc
|
|
|
|
|
|
|
|
Each of the installation steps described above can be reversed:
|
|
|
|
|
2006-11-07 07:17:56 +01:00
|
|
|
sudo make uninstall
|
2006-10-29 20:58:20 +01:00
|
|
|
|
|
|
|
PREFIX=~ make uninstall-exec
|
|
|
|
|
2006-11-07 07:17:56 +01:00
|
|
|
sudo make uninstall-all
|
2006-10-29 20:58:20 +01:00
|
|
|
|
2006-12-31 20:12:53 +01:00
|
|
|
# Other targets
|
|
|
|
|
|
|
|
The following 'make' targets should not be needed by the average user,
|
|
|
|
but are documented here for packagers and developers:
|
|
|
|
|
|
|
|
## Building and installing
|
|
|
|
|
|
|
|
* `configure`: Performs the needed preprocessing to create a proper
|
|
|
|
Cabal package for Pandoc:
|
|
|
|
- Builds `Pandoc.cabal` from `Pandoc.cabal.in`, using
|
|
|
|
the shell script `cabalize`.
|
|
|
|
- Builds `ASCIIMathML.hs`, `DefaultHeaders.hs`, and `S5.hs`
|
|
|
|
from templates in `src/templates` and data in `src/ASCIIMathML.js`,
|
|
|
|
`src/ui`, and `src/headers`.
|
|
|
|
- Stores values of relevant environment variables in `vars` for
|
|
|
|
persistence.
|
|
|
|
- Runs Cabal's "configure" command.
|
|
|
|
* `build-exec`: Builds `pandoc` executable (using Cabal's "build"
|
|
|
|
command) and creates the wrappers `html2markdown` and `markdown2pdf`
|
|
|
|
from templates in `src/wrappers`.
|
|
|
|
* `build-doc`: Builds program documentation (e.g. `README.html`).
|
|
|
|
* `build-lib-doc`: Builds Haddock documentation for Pandoc libraries.
|
|
|
|
* `install-doc`, `uninstall-doc`: Installs/uninstalls user documentation
|
|
|
|
and man pages.
|
|
|
|
* `install-lib-doc`, `uninstall-lib-doc`: Installs/uninstalls library
|
|
|
|
documentation and man pages.
|
|
|
|
* `install-exec`, `uninstall-exec`: Installs/uninstalls programs
|
|
|
|
(`pandoc` and wrappers).
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
|
|
|
|
* `test`: Runs Pandoc's test suite. (All tests should pass.)
|
|
|
|
* `test-markdown`: Runs the Markdown regression test suite, using
|
|
|
|
`pandoc --strict`. (One of the list tests will fail.)
|
|
|
|
|
|
|
|
## Cleaning
|
|
|
|
|
|
|
|
* `clean`: Restores directory to pre-build state, removing generated files.
|
|
|
|
* `distclean`: Like clean, but also cleans up files created by `make deb`.
|
|
|
|
|
|
|
|
## Packaging
|
|
|
|
|
|
|
|
* `osx-pkg-prep`: Prepares for building a MacOS X package.
|
|
|
|
* `osx-pkg`: Builds a MacOS X package (must be run as root, and on OS X).
|
|
|
|
You should make `osx-pkg-prep` first (not as root).
|
|
|
|
* `osx-dmg`: Creates a compressed disk image containing Mac OS X package
|
|
|
|
(must be run on OS X). You should make `osx-pkg` first.
|
|
|
|
* `win-pkg`: Creates a Windows binary package (presupposes `pandoc.exe`,
|
|
|
|
which must be created by building Pandoc on a Windows machine).
|
|
|
|
* `tarball`: Creates a source tarball for distribution.
|
|
|
|
* `deb`: Creates debian packages in `..` directory.
|
|
|
|
* `website`: Creates Pandoc's website in `web/pandoc` directory.
|
|
|
|
|