-
Notifications
You must be signed in to change notification settings - Fork 156
/
INSTALL
67 lines (52 loc) · 2.82 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
HOW TO BUILD AND INSTALL DISCOUNT
1) Unpacking the distribution
The DISCOUNT sources are distributed in tarballs. After extracting from
the tarball, you should end up with all the source and build files in the
directory
discount-(version)
2) Installing the distribution
DISCOUNT uses configure.sh to set itself up for compilation. To run
configure, just do ``./configure.sh'' and it will check your system for
build dependencies and build makefiles for you. If configure.sh finishes
without complaint, you can then do a ``make'' to compile everything and a
``make install'' to install the binaries.
Configure.sh has a few options that can be set:
--src=DIR where the source lives (.)
--prefix=DIR where to install the final product (/usr/local)
--execdir=DIR where to put executables (prefix/bin)
--sbindir=DIR where to put static executables (prefix/sbin)
--confdir=DIR where to put configuration information (/etc)
--libdir=DIR where to put libraries (prefix/lib)
--libexecdir=DIR where to put private executables
--mandir=DIR where to put manpages
--with-amalloc Use my paranoid malloc library to catch memory leaks
--shared Build shared libraries
--debian-glitch When mangling email addresses, do them deterministically
so the Debian regression tester won't complain
--pkg-config Build & install a pkg-config(1) .pc file for
the discount library.
--h1-title Have theme & mkd2html use the first h1 in a document
as the title if there's no pandoc header or title
specified on the command line.
--cxx-binding Wrap mkdio.h with (conditional) 'extern "C"' for c++
binding.
3) Testing
``make test'' runs discount against a collection of test cases.
4) Installing sample programs and manpages
The standard ``make install'' rule just installs the binaries. If you
want to install the sample programs, they are installed with
``make install.samples''; to install manpages, ``make install.man''.
A shortcut to install everything is ``make install.everything''
5) Assorted platform gotchas
1. On NetBSD (version 8 for certain) running configure.sh by
itself will result in logging output being mixed in with diagnostic
output on the screen instead of having it written to config.log.
If, instead, you do `ksh ./configure.sh`, it will be much less
garbled (the shell defaults all fds > stderr to close on exec,
so my redirecting stdout fails after the first subprocess.)
2. On 9Front (and maybe every other extant plan9 variant) the
system mkfile sets the `T' flag in CFLAGS; there are several
places where I typedef voids to opaque structure pointers and
this makes the build die when it attempts to link anything.
This was fixed by explicitly setting CFLAGS in Plan9/mkfile in
<https://github.com/Orc/discount/commit/311b33218f60ffd342264e97faee8cf7b7853044>.