[PATCH] doc-rst: make cleandocs misses a fair number of files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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+-fe0969cSkOehYh3uubYcrhZA@xxxxxxxxxxxxxx
Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Signed-off-by: Markus Heiser <markus.heiser@xxxxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux