diff --git a/Makefile.am b/Makefile.am index 56a8500a5a1d155b82803550b35a968ba9d58b06..b4e111b91ef1939125c46741da409799eef832c3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -57,10 +57,13 @@ DIRS = \ test/data \ tools -BUILDTIME_DIRS = \ +BUILDTIME_DIR_AUTOCREATE = \ scripts \ doc/api \ - doc/coverage \ + doc/coverage + +BUILDTIME_DIRS = \ + $(BUILDTIME_DIR_AUTOCREATE) \ doc/html DIRCHECK_EXCLUDE = \ @@ -68,7 +71,7 @@ DIRCHECK_EXCLUDE = \ ganeti-[0-9]*.[0-9]*.[0-9]* \ doc/html/_* -all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIRS)) +all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE)) MAINTAINERCLEANFILES = \ $(docpng) \ @@ -226,9 +229,10 @@ docrst = \ $(RUN_IN_TEMPDIR): | $(all_dirfiles) doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \ - $(RUN_IN_TEMPDIR) | doc/html/.dir + $(RUN_IN_TEMPDIR) @test -n "$(SPHINX)" || \ { echo 'sphinx-build' not found during configure; exit 1; } + @mkdir_p@ $(dir $@) PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \ -d . \ -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \ @@ -732,7 +736,6 @@ dist-hook: $(MAKE) regen-vcs-version && \ rm -f $(top_distdir)/vcs-version && \ cp -p $(srcdir)/vcs-version $(top_distdir) - rm $(top_distdir)/doc/html/.dir # a distcheck hook rule for catching revision control directories distcheck-hook: