This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients barry, eric.smith, vstinner
Date 2013-06-27.07:36:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372318577.21.0.0072373110646.issue18312@psf.upfronthosting.co.za>
In-reply-to
Content
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
--------------
History
Date User Action Args
2013-06-27 07:36:17vstinnersetrecipients: + vstinner, barry, eric.smith
2013-06-27 07:36:17vstinnersetmessageid: <1372318577.21.0.0072373110646.issue18312@psf.upfronthosting.co.za>
2013-06-27 07:36:17vstinnerlinkissue18312 messages
2013-06-27 07:36:16vstinnercreate