]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-97731: fix distclean target to clean docs (#97732)
authorSkip Montanaro <skip.montanaro@gmail.com>
Tue, 4 Oct 2022 14:38:19 +0000 (09:38 -0500)
committerGitHub <noreply@github.com>
Tue, 4 Oct 2022 14:38:19 +0000 (07:38 -0700)
fix distclean target to clean docs

Makefile.pre.in

index 5201abb5ee5b412b441f970f1a051cae3607e5c9..01578306bd5ff506c0899f6ee11a99d8e28e8efd 100644 (file)
@@ -1863,7 +1863,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
       $(DSYMUTIL_PATH) $(DESTDIR)$(PYTHONFRAMEWORKPREFIX)/$(INSTSONAME); \
                fi \
        fi
-       
+
 
 bininstall: altbininstall
        if test ! -d $(DESTDIR)$(LIBPC); then \
@@ -2432,8 +2432,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.
@@ -2485,7 +2484,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