]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-97731: fix distclean target to clean docs GH-97732 (#97844)
authorSenthil Kumaran <senthil@python.org>
Tue, 4 Oct 2022 21:56:46 +0000 (14:56 -0700)
committerGitHub <noreply@github.com>
Tue, 4 Oct 2022 21:56:46 +0000 (14:56 -0700)
Backport  gh-97731: fix distclean target to clean docs #97732 to 3.11

Makefile.pre.in

index 3efc6c2456c4acc9b420aa6a58a4f640bcfa5c31..d23976ff80fbbbd3c405dee7a539f3570b5cd06a 100644 (file)
@@ -2388,8 +2388,7 @@ rmtestturds:
        -rm -f gb-18030-2000.xml
 
 docclean:
-       -rm -rf Doc/build
-       -rm -rf Doc/tools/sphinx Doc/tools/pygments Doc/tools/docutils
+       $(MAKE) -C Doc clean
 
 # like the 'clean' target but retain the profile guided optimization (PGO)
 # data.  The PGO data is only valid if source code remains unchanged.
@@ -2440,7 +2439,7 @@ clobber: clean
 # 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
+distclean: clobber docclean
        for file in $(srcdir)/Lib/test/data/* ; do \
            if test "$$file" != "$(srcdir)/Lib/test/data/README"; then rm "$$file"; fi; \
        done