[BACK]Return to INSTALL CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

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