Chapter 15: Makefile Conventions 159
When you have many documentation files to install, we recommend that you
avoid collisions and clutter by arranging for these targets to install in subdi-
rectories of the appropriate installation directory, such as htmldir. As one
example, if your package has multiple manuals, and you wish to install HTML
documentation with many files (such as the “split” mode output by makeinfo
--html), you’ll certainly want to use subdirectories, or two nodes with the same
name in different manuals will overwrite each other.
Please make these install-format targets invoke the commands for the format
target, for example, by making format a dependency.
‘uninstall’
Delete all the installed files—the copies that the ‘install’ and ‘install-*’
targets create.
This rule should not modify the directories where compilation is done, only the
directories where files are installed.
The uninstallation commands are divided into three categories, just like the in-
stallation commands. See Section 15.7 [Install Command Categories], page 162.
‘install-strip’
Like install, but strip the executable files while installing them. In simple
cases, this target can use the install target in a simple way:
install-strip:
$(MAKE) INSTALL_PROGRAM=’$(INSTALL_PROGRAM) -s’ \
install
But if the package installs scripts as well as real executables, the install-strip
target can’t just refer to the install target; it has to strip the executables but
not the scripts.
install-strip should not strip the executables in the build directory which are
being copied for installation. It should only strip the copies that are installed.
Normally we do not recommend stripping an executable unless you are sure the
program has no bugs. However, it can be reasonable to install a stripped exe-
cutable for actual execution while saving the unstripped executable elsewhere
in case there is a bug.
‘clean’ Delete all files in the current directory that are normally created by building
the program. Also delete files in other directories if they are created by this
makefile. However, don’t delete the files that record the configuration. Also
preserve files that could be made by building, but normally aren’t because the
distribution comes with them. There is no need to delete parent directories
that were created with ‘mkdir -p’, since they could have existed anyway.
Delete .dvi files here if they are not part of the distribution.
‘distclean’
Delete all files in the current directory (or created by this makefile) that are
created by configuring or building the program. If you have unpacked the source
and built the program without creating any other files, ‘make distclean’ should
leave only the files that were in the distribution. However, there is no need to
delete parent directories that were created with ‘mkdir -p’, since they could
have existed anyway.
Comentarios a estos manuales