diff --git a/Makefile.sphinx b/Makefile.sphinx --- a/Makefile.sphinx +++ b/Makefile.sphinx @@ -31,8 +31,14 @@ endif sphinx/clean: + if [ -f "$(CURDIR)/images/Makefile" ]; then \ + make -C $(CURDIR)/images/ clean; \ + fi $(SPHINXBUILD) -M clean $(SPHINX_SRCDIR) $(SPHINX_BUILDDIR) $(SPHINXOPTS) sphinx/%: $(apidoc_dep) + if [ -f "$(CURDIR)/images/Makefile" ]; then \ + make -C $(CURDIR)/images/ $@; \ + fi $(SPHINXBUILD) -b $* $(SPHINX_SRCDIR) $(SPHINX_BUILDDIR)/$* $(SPHINXOPTS) apidoc: $(apidoc_dep) @@ -42,7 +48,7 @@ find $(shell pwd)/apidoc -name "*.rst" | xargs sed -i '1i:orphan:\n' touch $@ -.PHONY: clean clean-apidoc +.PHONY: clean clean-apidoc sphinx/clean clean: sphinx/clean clean-apidoc clean-apidoc: rm -rf $(APIDOC_DIR)