2 Install - instructions for installing the pages into the system
5 sudo make [-j] install [prefix=ARG] [DESTDIR=ARG] [...]
8 (a) Use a package manager
9 If you want to install the manual pages into your system,
10 consider installing them through your package manager from an
11 official release, instead of installing them from this
12 repository. This repository contains the newest manual pages,
13 but using an official release and the system package manager
14 offers important benefits. On a Debian system it would be:
16 $ sudo apt-get install -V manpages-dev manpages
18 If you prefer to install the manual pages from this repository,
19 maybe because your system ships a too old version, consider
20 updating the package offered by your system. See the <RELEASE>
21 file, and also talk to the maintainer of the package in your
24 (b) Install manually from source
25 If you are contributing to the project, you may want to install
26 the manual pages from this repository to test them, instead of
27 using an official release. Or maybe your distribution installs
28 packages from source code without any package manager.
30 In most cases, you just want to install all of the manual pages,
31 and nothing else. To install them in the default system
32 directory (per GNU guidelines), use:
36 It takes a few seconds, so it's fine to do it in parallel with:
38 $ sudo make -j install
40 A few features can be used to tweak the install:
43 There are many variables available with which you can tweak
44 the build system. Most of them are directory variables and
45 command variables, based on the GNU Coding Standards. Others
46 are specially designed for this project. To see all of the
47 available variables, use:
51 The most common ones that you may use are:
57 You can uninstall the pages with the following command (but
58 see the "Caveats" section below):
63 There are targets for more granular control, such as
64 'install-man3'. See the help to know all of them:
76 - make(1) - GNU Make is required.
88 - For uninstalling / cleaning:
92 - For linting/building/checking man(7) source:
99 - troff(1) >= 1.23.0 - GNU troff is required.
101 - For linting/building C source:
102 - cc(1) - GCC or Clang
112 And one that isn't packaged, but can be extracted from the
113 Linux kernel source tree in <scripts/checkpatch.pl>:
117 - For building HTML pages:
122 - groff(1) | mandoc(1)
125 You can lint and check both the manual pages, and the example C
126 programs contained in them. See 'make help' for a list of
127 targets that can be used.
130 GNUmakefile, share/mk/install-man.mk, share/mk/install.mk
131 Main makefiles for installing (however, others may also be used
137 share/mk/install-html.mk
138 Makefile to install HTML manual pages.
141 Handle verbose settings.
149 /usr/local/share/man/man*/*
150 Default location for installed pages.
153 We follow closely the GNU Coding Standards:
154 <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
155 <https://www.gnu.org/prep/standards/html_node/Command-Variables.html>.
157 And the Filesystem Hierarchy Standard:
158 <https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html>
160 But deviate from them in some cases, the most notable case being
161 the use of directories for manual subsections, such as
166 You can uninstall the pages. However, take into account that it
167 will only uninstall pages that exist in the repository. This
168 means that if you installed the manual pages from source from an
169 older version of the repository with 'make install', and some
170 page was [re]moved later, it won't be uninstalled. You should
171 probably install with a prefix of prefix=/opt/local/man-pages to
172 be able to nuke the directory later with
173 'rm -r /opt/local/man-pages'. However, you'll need to modify
174 your $MANPATH to be able to use those manual pages as if they
175 were in a system path.
177 Version and last-modified date
178 If you're an end user or a distributor, make sure you do this
179 (install) from a tarball, and not from the git repository. The
180 manual pages in the repository have placeholders for the version
181 and last modified date, which are filled when creating the
182 tarball. You can create your own tarball, for which you need to
183 read the RELEASE file.