summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/cmdline-opts/Makefile.am12
1 files changed, 11 insertions, 1 deletions
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)