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

Annotation of mandoc/INSTALL, Revision 1.21

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

CVSweb