install
If possible, write the install target rule so that it does not modify anything in the directory where the program was built, provided make all has just been done. This is convenient for building the program under one user name and installing it under another.
The commands should create all the directories in which files are to be installed, if they dont already exist. This includes the directories specified as the values of the variables, prefix and exec_prefix, as well as all sub-directo-ries that are needed. One way to do this is by means of an installdirs target as described below.
Use - before any command for installing a man page, so that make will ignore any errors. This is in case there are systems that dont have the Unix man page documentation system installed.
The way to install info files is to copy them into \$(infodir) with \$(INSTALL_DATA) (see Variables for specifying commands), and then run the install-info program if it is present. install-info is a script that edits the Info dir file to add or update the menu entry for the given info file; it will be part of the Texinfo package. The following is a sample rule to install an Info file:
uninstall
This rule should not modify the directories where compilation is done, only the directories where files are installed.
distclean
mostlyclean
maintainer-clean
The reason we say almost everything is that make maintainer-clean should not delete configure even if configure can be remade using a rule in the Makefile. More generally, make maintainer-clean should not delete anything that needs to exist in order to run configure and then begin to build the program. This is the only exception; maintainer-clean should delete everything else that can be rebuilt.
The maintainer-clean is intended to be used by a maintainer of the package, not by ordinary users. You may need special tools to reconstruct some of the files that make maintainer-clean deletes. Since these files are normally included in the distribution, we dont take care to make them easy to reconstruct. If you find you need to unpack the full distribution again, dont blame us.
To help make users aware of this, maintainer-clean should start with the following two commands.
TAGS
info
foo.info: foo.texi chap1.texi
chap2.texi $(MAKEINFO)
$(srcdir)/foo.texi
You must define the variable, MAKEINFO, in the Makefile. It should run the makeinfo program which is part of the Texinfo distribution.
dvi
foo.dvi: foo.texi chap1.texi
chap2.texi $(TEXI2DVI)
$(srcdir)/foo.texi
You must define the variable, TEXI2DVI, in the Makefile. It should run the program, texi2dvi, which is part of the Texinfo distribution. Alternatively, write just the dependencies, and allow GNU make to provide the command.
dist
The easiest way to do this is to create a subdirectory appropriately named, use ln or cp to install the proper files in it, and then tar that subdirectory. The dist target should explicitly depend on all non-source files that are in the distribution, to make sure they are up to date in the distribution. See section Making Releases in GNU Coding Standards.
check
installcheck
installdirs