STINNER Victor added the comment:

Extract of "GNU standards":

# make distclean
#      Delete all files from the current directory 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.

Python should only remove files generated by the build process: Makefile, 
pyconfig.h, *.o, etc. But not files generated by Mercurial (.orig, .rej), 
backup files (.old, .bak), nor any other files which is not generated by the 
build. These files may be important for the developer (Mercurial keeps modified 
files after "hg revert --all" for example).

If someone wants an hardcore cleaner, the command can be kept, but please, 
under a different name.

I use "make distclean" when I change compiler options (rerun Makefile), when a 
new C file is added (calling "make" is usually not enough, and I prefer to 
restart from a "clean" source tree), or more generally when Python doesn't 
compile for an unknown reason. For example, "make distclean" was need when the 
new _stat (Modules/_stat.c) module was added.

R. David Murray wrote on python-dev: "We also sometimes ask someone reporting 
an issue to do a make distclean and recompile (...)".

Here is a patch simply removing the "find -exec rm {};" command from "make 
distclean". Remaining commands:

--------------
# Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]
# Keep configure and Python-ast.[ch], it's possible they can't be generated
distclean: clobber
        for file in Lib/test/data/* ; do \
            if test "$$file" != "Lib/test/data/README"; then rm "$$file"; fi; \
        done
        -rm -f core Makefile Makefile.pre config.status \
                Modules/Setup Modules/Setup.local Modules/Setup.config \
                Modules/ld_so_aix Modules/python.exp Misc/python.pc
        -rm -f python*-gdb.py
--------------

----------
keywords: +patch
nosy: +haypo
Added file: http://bugs.python.org/file30710/make_distclean.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18312>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to