'make distcheck' was failing because fixmanpages.sh was not present in the test build directory. While this can be addressed, it has no chance of working because make has already deleted the generated man pages. To solve this problem, this patch makes the Makefile become "aware" that is being run by 'make distcheck' and keep going if so. The Makefile also has to take special action so 'make distcleancheck' passes. This does mean that 'make distcheck' doesn't test fixmanpages.sh. Signed-off-by: Duncan Roe <duncan_roe@xxxxxxxxxxxxxxx> --- doxygen/Makefile.am | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doxygen/Makefile.am b/doxygen/Makefile.am index a4db804..9c06983 100644 --- a/doxygen/Makefile.am +++ b/doxygen/Makefile.am @@ -9,7 +9,12 @@ doc_srcs = $(top_srcdir)/src/libnetfilter_queue.c \ $(top_srcdir)/src/extra/pktbuff.c doxyfile.stamp: $(doc_srcs) fixmanpages.sh - rm -rf html man && (cd .. && doxygen doxygen.cfg) && ./fixmanpages.sh +# Hack so 'make distcheck' passes: +# just keep going if fixmanpages.sh is missing +# as an extra check, ensure penultimate 2 components of cwd are "_build/sub" + rm -rf html man && (cd .. && doxygen doxygen.cfg) &&\ + [ ! -x ./fixmanpages.sh -a "$$(pwd|rev|cut -d/ -f2-3|rev)" = _build/sub ] ||\ + ./fixmanpages.sh touch doxyfile.stamp CLEANFILES = doxyfile.stamp @@ -19,5 +24,12 @@ clean-local: rm -rf $(top_srcdir)/doxygen/man $(top_srcdir)/doxygen/html install-data-local: mkdir -p $(DESTDIR)$(mandir)/man3 - cp --no-dereference --preserve=links,mode,timestamps man/man3/*.3 $(DESTDIR)$(mandir)/man3/ +# Need another hack so 'make distcleancheck' passes :( +# No need to check directory tree again + if [ ! -x ./fixmanpages.sh ];\ + then\ + rm -rf html;\ + else\ + cp --no-dereference --preserve=links,mode,timestamps man/man3/*.3 $(DESTDIR)$(mandir)/man3/;\ + fi endif -- 2.14.5