From 601721c18625f5af669c5a05f76da5f82e669af8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 21 Apr 2017 17:06:15 +0200 Subject: cmdline-opts: for non-perl builds copy from source tree ... for out-of-tree builds from tarballs that have a pre-built docs/curl.1 in the source. --- docs/cmdline-opts/Makefile.am | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/cmdline-opts/Makefile.am b/docs/cmdline-opts/Makefile.am index e5762096d..692eb42d2 100644 --- a/docs/cmdline-opts/Makefile.am +++ b/docs/cmdline-opts/Makefile.am @@ -31,4 +31,14 @@ EXTRA_DIST = $(DPAGES) MANPAGE.md gen.pl $(OTHERPAGES) CMakeLists.txt all: $(MANPAGE) $(MANPAGE): $(DPAGES) $(OTHERPAGES) - @PERL@ $(srcdir)/gen.pl mainpage $(srcdir) > $(MANPAGE) + (if ! test -x "$(PERL)"; then \ + if ! test -f "$(top_srcdir)/docs/curl.1"; then \ + echo "Creating docs/curl.1 requires perl!"; \ + exit 2; \ + fi; \ + if test "$(top_srcdir)x" != "$(top_builddir)x"; then \ + cp $(top_srcdir)/docs/curl.1 $(MANPAGE); \ + fi \ + else \ + @PERL@ $(srcdir)/gen.pl mainpage $(srcdir) > $(MANPAGE); \ + fi) -- cgit v1.2.1