Annotation of mandoc/INSTALL, Revision 1.10
1.10 ! schwarze 1: $Id: INSTALL,v 1.9 2014/12/11 07:44:46 schwarze Exp $
1.1 schwarze 2:
1.2 schwarze 3: About mdocml, the portable mandoc distribution
4: ----------------------------------------------
1.1 schwarze 5: The mandoc manpage compiler toolset is a suite of tools compiling
6: mdoc(7), the roff(7) macro language of choice for BSD manual pages,
7: and man(7), the predominant historical language for UNIX manuals.
1.10 ! schwarze 8: It includes a man(1) manual viewer and additional tools.
1.2 schwarze 9: For general information, see <http://mdocml.bsd.lv/>.
10:
11: In case you have questions or want to provide feedback, read
12: <http://mdocml.bsd.lv/contact.html>. Consider subscribing to the
13: discuss@ mailing list mentioned on that page. If you intend to
14: help with the development of mandoc, consider subscribing to the
15: tech@ mailing list, too.
16:
17: Enjoy using the mandoc toolset!
18:
1.10 ! schwarze 19: Ingo Schwarze, Karlsruhe, March 2015
1.2 schwarze 20:
1.1 schwarze 21:
1.2 schwarze 22: Installation
23: ------------
1.1 schwarze 24: Before manually installing mandoc on your system, please check
25: whether the newest version of mandoc is already installed by default
26: or available via a binary package or a ports system. A list of the
27: latest bundled and ported versions of mandoc for various operating
1.2 schwarze 28: systems is maintained at <http://mdocml.bsd.lv/ports.html>.
1.1 schwarze 29:
1.2 schwarze 30: Regarding how packages and ports are maintained for your operating
31: system, please consult your operating system documentation.
32: To install mandoc manually, the following steps are needed:
1.1 schwarze 33:
1.4 schwarze 34: 1. If you want to build the CGI program, man.cgi(8), too, run the
1.5 kristaps 35: command "echo BUILD_CGI=1 > configure.local". Then run "cp
36: cgi.h.examples cgi.h" and edit cgi.h as desired.
1.1 schwarze 37:
1.4 schwarze 38: 2. Run "./configure".
39: This script attempts autoconfiguration of mandoc for your system.
40: Read both its standard output and the file "Makefile.local" it
41: generates. If anything looks wrong or different from what you
42: wish, read the file "configure.local.example", create and edit
43: a file "configure.local", and re-run "./configure" until the
44: result seems right to you.
45:
46: 3. Run "make".
47: Any POSIX-compatible make, in particular both BSD make and GNU make,
48: should work. If the build fails, look at "configure.local.example"
49: and go back to step 2.
50:
51: 4. Run "make -n install" and check whether everything will be
1.7 schwarze 52: installed to the intended places. Otherwise, put some *DIR or *NM*
53: variables into "configure.local" and go back to step 2.
1.4 schwarze 54:
55: 5. Run "sudo make install". If you intend to build a binary
56: package using some kind of fake root mechanism, you may need a
57: command like "make DESTDIR=... install". Read the *-install targets
58: in the "Makefile" to understand how DESTDIR is used.
59:
1.10 ! schwarze 60: 6. If you want to use the integrated man(1) and your system uses
! 61: manpath(1), make sure it is configured correctly, in particular,
! 62: it returns all directory trees where manual pages are installed.
! 63: Otherwise, if your system uses man.conf(5), make sure it contains
! 64: a "_whatdb" line for each directory tree, and the order of these
! 65: lines meets your wishes.
! 66:
! 67: 7. If you compiled with database support, run the command "sudo
! 68: makewhatis" to build mandoc.db(5) databases in all the directory
! 69: trees configured in step 6. Whenever installing new manual pages,
! 70: re-run makewhatis(8) to update the databases, or apropos(1) will
! 71: not find the new pages.
! 72:
! 73: 8. To set up a man.cgi(8) server, read its manual page.
! 74:
! 75: Note that some man(7) pages may contain low-level roff(7) markup
! 76: that mandoc does not yet understand. On some BSD systems using
! 77: mandoc, third-party software is vetted on whether it may be formatted
! 78: with mandoc. If not, groff(1) is pulled in as a dependency and
! 79: used to install a pre-formatted "catpage" instead of directly as
! 80: manual page source.
1.4 schwarze 81:
82:
83: Understanding mandoc dependencies
84: ---------------------------------
1.10 ! schwarze 85: The mandoc(1), man(1), and demandoc(1) utilities have no external
! 86: dependencies, but makewhatis(8) and apropos(1) depend on the
! 87: following software:
1.4 schwarze 88:
89: 1. The SQLite database system, see <http://sqlite.org/>.
1.1 schwarze 90: The recommended version of SQLite is 3.8.4.3 or newer. The mandoc
91: toolset is known to work with version 3.7.5 or newer. Versions
92: older than 3.8.3 may not achieve full performance due to the
93: missing SQLITE_DETERMINISTIC optimization flag. Versions older
94: than 3.8.0 may not show full error information if opening a database
95: fails due to the missing sqlite3_errstr() API. Both are very minor
1.2 schwarze 96: problems, apropos(1) is fully usable with SQLite 3.7.5. Versions
97: older than 3.7.5 may or may not work, they have not been tested.
98:
1.7 schwarze 99: 2. The fts(3) directory traversion functions.
1.3 schwarze 100: If your system does not have them, the bundled compatibility version
101: will be used, so you need not worry in that case. But be careful: the
1.2 schwarze 102: glibc version of fts(3) is known to be broken on 32bit platforms,
103: see <https://sourceware.org/bugzilla/show_bug.cgi?id=15838>.
1.4 schwarze 104: If you run into that problem, set "HAVE_FTS=0" in configure.local.
1.2 schwarze 105:
1.7 schwarze 106: 3. Marc Espie's ohash(3) library.
1.2 schwarze 107: If your system does not have it, the bundled compatibility version
1.1 schwarze 108: will be used, so you probably need not worry about it.
109:
110:
1.2 schwarze 111: Checking autoconfiguration quality
112: ----------------------------------
1.1 schwarze 113: If you want to check whether automatic configuration works well
114: on your platform, consider the following:
115:
116: The mandoc package intentionally does not use GNU autoconf because
117: we consider that toolset a blatant example of overengineering that
118: is obsolete nowadays, since all modern operating systems are now
119: reasonably close to POSIX and do not need arcane shell magic any
120: longer. If your system does need such magic, consider upgrading
121: to reasonably modern POSIX-compliant tools rather than asking for
122: autoconf-style workarounds.
123:
124: As far as mandoc is using any features not mandated by ANSI X3.159-1989
125: ("ANSI C") or IEEE Std 1003.1-2008 ("POSIX") that some modern systems
126: do not have, we intend to provide autoconfiguration tests and
127: compat_*.c implementations. Please report any that turn out to be
128: missing. Note that while we do strive to produce portable code,
129: we do not slavishly restrict ourselves to POSIX-only interfaces.
130: For improved security and readability, we do use well-designed,
131: modern interfaces like reallocarray(3) even if they are still rather
132: uncommon, of course bundling compat_*.c implementations as needed.
133:
134: Where mandoc is using ANSI C or POSIX features that some systems
135: still lack and that compat_*.c implementations can be provided for
136: without too much hassle, we will consider adding them, too, so
137: please report whatever is missing on your platform.
138:
139: The following steps can be used to manually check the automatic
140: configuration on your platform:
141:
1.4 schwarze 142: 1. Run "make distclean".
1.1 schwarze 143:
1.4 schwarze 144: 2. Run "./configure"
1.1 schwarze 145:
146: 3. Read the file "config.log". It shows the compiler commands used
147: to test the libraries installed on your system and the standard
148: output and standard error output these commands produce. Watch out
149: for unexpected failures. Those are most likely to happen if headers
150: or libraries are installed in unusual places or interfaces defined
151: in unusual headers. You can also look at the file "config.h" and
1.4 schwarze 152: check that no "#define HAVE_*" differ from your expectations.
CVSweb