If you did not specify
--prefer-make, Makefile.in will
be a wrapper around the functionality of the Python setup.py
script. For a basic program, no great amount of customization of this
file will be necessary. The file contains many comments, which
introduce its various sections.
By default, the file supports installing to a Virtualenv, depending on whether the user has specified to do so when running configure. You will likely not have to change the “install” recipe. If you have other files to install, it is recommended to create new targets to install them, and to add those targets as prerequisites to the “install” target. For example, if you have extra data files to install, you might create a “install-data” target and corresponding recipe, and then add “install-data” as a prerequisite to “install”:
install: installdirs install-data
If you do install more files, be sure that they are properly removed
when the user runs
make uninstall by modifying the recipe for
the “uninstall” target. Note that, at this time, Python's
distutils does not have its own “uninstall” target, so this
must be done manually.
If you intend to produce source distributions via the Makefile,
which is more flexible than doing so via setup.py, it is
important to modify the
DIST_FILES variable located near the
top of Makefile.in. Any file or directory you list there will
be included in your source distribution.
Finally, you may write recipes to build your package's documentation, which may not be covered by your setup.py script. How you accomplish this is highly dependent upon how you have organized your documentation sources. One example of how you might do it is included in the Makefile.in, commented-out at the end.