From 70a81a85c2fb59c4778bde80ebbf93a071eeb381 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Wed, 16 Nov 2016 15:43:16 +0100
Subject: [PATCH] docs/curl.1: generate from the cmdline-opts script

---
 docs/Makefile.am |    3 +
 docs/curl.1      | 2508 ------------------------------------------------------
 src/Makefile.am  |    3 +
 3 files changed, 6 insertions(+), 2508 deletions(-)
 delete mode 100644 docs/curl.1

diff --git a/docs/Makefile.am b/docs/Makefile.am
index fd045d2..94a9576 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -42,10 +42,13 @@ EXTRA_DIST = MANUAL BUGS CONTRIBUTE.md FAQ FEATURES INTERNALS.md SSLCERTS.md  \
 
 MAN2HTML= roffit $< >$@
 
 SUFFIXES = .1 .html .pdf
 
+curl.1:
+	(cd $(top_srcdir)/docs/cmdline-opts && ./gen.pl mainpage) > curl.1
+
 html: $(HTMLPAGES)
 	cd libcurl && make html
 
 pdf: $(PDFPAGES)
 	cd libcurl && make pdf
diff --git a/docs/curl.1 b/docs/curl.1
deleted file mode 100644
index c455b89..0000000
diff --git a/src/Makefile.am b/src/Makefile.am
index 878bbfe..2c8710b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -100,10 +100,13 @@ HUGE=tool_hugehelp.c
 
 if USE_MANUAL
 # Here are the stuff to create a built-in manual
 
 if HAVE_LIBZ
+$(MANPAGE):
+	cd $(top_builddir)/docs && make curl.1
+
 # This generates the tool_hugehelp.c file in both uncompressed and
 # compressed formats
 $(HUGE): $(README) $(MANPAGE)  mkhelp.pl
 	echo '#include "tool_setup.h"' > $(HUGE)
 	echo '#ifndef HAVE_LIBZ' >> $(HUGE)
-- 
2.10.2

