Removes intermediate files:

- Documentation/DocBook/.*.xml.cmd
- Documentation/.../*.pyc
- Documentation/.../*.pyo
- Documentation/.../__pycache__

To be more future-proof, this covers more than we need today. I guess
there comes the day we assemble a python package structure under
Documentation/sphinx.

References: 
http://lkml.kernel.org/r/camuhmdvxqph7-9xj+ye_pgoa+-fe0969cskoehyh3uubycr...@mail.gmail.com
Reported-by: Geert Uytterhoeven <ge...@linux-m68k.org>
Signed-off-by: Markus Heiser <markus.hei...@darmarit.de>
---
 Documentation/DocBook/Makefile | 1 +
 Documentation/Makefile.sphinx  | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile
index fdf8232..263e657 100644
--- a/Documentation/DocBook/Makefile
+++ b/Documentation/DocBook/Makefile
@@ -264,6 +264,7 @@ clean-files := $(DOCBOOKS) \
        $(patsubst %.xml, %.aux.xml, $(DOCBOOKS)) \
        $(patsubst %.xml, %.xml.db,  $(DOCBOOKS)) \
        $(patsubst %.xml, %.xml,     $(DOCBOOKS)) \
+       $(patsubst %.xml, .%.xml.cmd, $(DOCBOOKS)) \
        $(index)
 
 clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man
diff --git a/Documentation/Makefile.sphinx b/Documentation/Makefile.sphinx
index 92deea3..3e8a7d7 100644
--- a/Documentation/Makefile.sphinx
+++ b/Documentation/Makefile.sphinx
@@ -92,7 +92,9 @@ mandocs:
 installmandocs:
 
 cleandocs:
-       $(Q)rm -rf $(BUILDDIR)
+       $(Q)rm -rf $(obj)/output
+       $(Q)find $(srctree)/$(src) -type d -name '__pycache__' | xargs rm -rf
+       $(Q)find $(srctree)/$(src) -name '*.pyc' -o -name '*.pyo' | xargs rm -f
 
 endif # HAVE_SPHINX
 
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to