[tor-commits] [stem/master] Skip recreating unchanged docs

atagar at torproject.org atagar at torproject.org
Wed Jun 6 04:30:17 UTC 2012


commit a3a7b2055144ae4ccb06e464510df211fc4fb43a
Author: Damian Johnson <atagar at torproject.org>
Date:   Sat Jun 2 19:19:24 2012 -0700

    Skip recreating unchanged docs
    
    Greatly decreasing the time it takes to generate documentation when pydocs
    haven't changed. Sphinx is smart enough to avoid running against files whos
    last-modified timestamp hasn't changed, but not smart enough to check the hash
    of the content. Hence using rsync to avoid modifying our pydoc derived content
    unless the pydocs have changed.
---
 docs/Makefile |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/docs/Makefile b/docs/Makefile
index 2c2cc2e..b868f11 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -37,8 +37,9 @@ clean:
 	-rm -rf $(BUILDDIR)/*
 
 html:
-	@rm -f ./stem.* ./modules.rst
-	@sphinx-apidoc -o . ../stem
+	@rm -rf /tmp/stem_docs
+	@sphinx-apidoc -o /tmp/stem_docs ../stem
+	@rsync --size-only /tmp/stem_docs/* .
 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
 	@echo
 	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."





More information about the tor-commits mailing list