make -C docs/cmdline-opts install depends on all-am, which in turn
depends on $(MANS), unconditionally defined to be $(man_MANS).
As with CLEANFILES, only add curl.1 to man_MANS when BUILD_DOCS is true
so we don't try to build curl.1 unnecessarily.
Closes #13198
MANPAGE = curl.1
ASCIIPAGE = curl.txt
-man_MANS = $(MANPAGE)
-
include Makefile.inc
EXTRA_DIST = $(DPAGES) MANPAGE.md $(SUPPORT) CMakeLists.txt mainpage.idx
if BUILD_DOCS
CLEANFILES = $(MANPAGE) $(ASCIIPAGE)
+man_MANS = $(MANPAGE)
all: $(MANPAGE) $(ASCIIPAGE)