The GNU Makefile Standards specify a number of different clean rules. See See Standard Targets for Users.
Generally the files that can be cleaned are determined automatically by
Automake. Of course, Automake also recognizes some variables that can
be defined to specify additional files to clean. These variables are
As the GNU Standards aren't always explicit as to which files should be removed by which target, we've adopted a heuristic which we believe was first formulated by François Pinard:
makebuilt it, and it is commonly something that one would want to rebuild (for instance, a
mostlycleanshould delete it.
makebuilt it, then
cleanshould delete it.
configurebuilt it, then
distcleanshould delete it.
maintainer-cleanshould delete it. However
maintainer-cleanshould not delete anything that needs to exist in order to run
./configure && make.
We recommend that you follow this same set of heuristics in your