From 0a76e006e5ce9c15332e3733d825e4ee342f6dbe Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Sun, 9 Jan 2022 20:32:09 +0300 Subject: [PATCH] Fixed "make distcheck" (finally) Also fixed "make dist" from read-only unpacked tarball. --- Makefile.am | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index 4bbf92e7..65674601 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,11 +58,18 @@ dist-hook: dist-po rm -f '$(distdir)/pre-dist-hook-dummy' @rm -f pre-dist-hook-dummy -pre-dist-hook: +pre-dist-hook: pre-dist-hook-doc @echo "Preparing to make dist" - @$(am__cd) doc && $(MAKE) $(AM_MAKEFLAGS) update-stamp -.PHONY: pre-dist-hook +pre-dist-hook-doc: + @echo "Preparing to make dist in doc" + @if test -w '$(top_srcdir)/doc' ; then \ + $(am__cd) doc && $(MAKE) $(AM_MAKEFLAGS) update-stamp; \ + else \ + echo "Source tree is read-only, skipping force doc update"; \ + fi; + +.PHONY: pre-dist-hook pre-dist-hook-doc distclean-local: distclean-po