From 63630690a851a7dc36ebe0c6065df72c13ee4a93 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 27 Apr 2015 23:52:36 +0900 Subject: [PATCH] Fix `make -j3 distcheck` error --- doc/Makefile.am | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/Makefile.am b/doc/Makefile.am index deead9d4..ed3b9ed1 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -201,11 +201,28 @@ help: @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" -apiref.rst: $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \ +apiref.rst macros.rst enums.rst types.rst: \ + $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \ $(top_builddir)/lib/includes/nghttp2/nghttp2.h $(PYTHON) $(top_srcdir)/doc/mkapiref.py \ $@ macros.rst enums.rst types.rst . $^ +# Inspired by +# http://www.gnu.org/savannah-checkouts/gnu/automake/manual/html_node/Multiple-Outputs.html +apidoc.stamp: $(top_builddir)/lib/includes/nghttp2/nghttp2ver.h \ + $(top_builddir)/lib/includes/nghttp2/nghttp2.h + @rm -f apidoc.tmp + @touch apidoc.tmp + $(PYTHON) $(top_srcdir)/doc/mkapiref.py \ + $@ macros.rst enums.rst types.rst . $^ + @mv -f apidoc.tmp $@ +$(APIDOC): apidoc.stamp +## Recover from the removal of $@ + @if test -f $@; then :; else \ + rm -f apidoc.stamp; \ + $(MAKE) $(AM_MAKEFLAGS) apidoc.stamp; \ + fi + clean-local: -rm $(APIDOCS) -rm -rf $(BUILDDIR)/*