From ab027d9cbcebf2aec1687dfef2b00ab32d39fb9c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 19 Feb 2024 09:32:07 +0100 Subject: [PATCH] docs: dist curl*.1 and install without perl Drop docs/mk-ca-bundle.1 from the tarball. It can be generated at will. Closes #12959 Fixes #12921 Reported-by: Michael Forney --- Makefile.am | 1 + docs/Makefile.am | 17 +++++++++-------- docs/libcurl/Makefile.am | 1 - docs/libcurl/opts/Makefile.am | 1 - 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Makefile.am b/Makefile.am index 6457d03dc4..bc995f1ed5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -249,6 +249,7 @@ install-data-hook: else install-data-hook: (cd include && $(MAKE) install) + (cd docs && $(MAKE) install) endif # We extend the standard uninstall with a custom hook: diff --git a/docs/Makefile.am b/docs/Makefile.am index 96c876019a..7dff433615 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -30,12 +30,7 @@ MK_CA_DOCS = mk-ca-bundle.1 CURLCONF_DOCS = curl-config.1 endif - -# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable -# but distribute it (using the relative file name) in the next variable -man_MANS = $(abs_builddir)/curl.1 -noinst_man_MANS = $(MK_CA_DOCS) -dist_man_MANS = $(CURLCONF_DOCS) $(MK_CA_DOCS) +man_MANS = $(abs_builddir)/curl.1 curl-config.1 CURLPAGES = curl-config.md mk-ca-bundle.md # Build targets in this file (.) before cmdline-opts to ensure that @@ -43,11 +38,13 @@ CURLPAGES = curl-config.md mk-ca-bundle.md SUBDIRS = . cmdline-opts libcurl DIST_SUBDIRS = $(SUBDIRS) examples -CLEANFILES = $(man_MANS) curl.1 $(CURLCONF_DOCS) $(MK_CA_DOCS) -nodist_MANS = $(CLEANFILES) +if BUILD_DOCS +CLEANFILES = curl.1 mk-ca-bundle.1 curl-config.1 +endif EXTRA_DIST = \ $(CURLPAGES) \ + $(CURLCONF_DOCS) \ ALTSVC.md \ BINDINGS.md \ BUFREF.md \ @@ -112,6 +109,8 @@ CD2_ = $(CD2_0) SUFFIXES = .1 .md +all: $(MK_CA_DOCS) + # $(abs_builddir) is to disable VPATH when searching for this file, which # would otherwise find the copy in $(srcdir) which breaks the $(HUGE) # rule in src/Makefile.am in out-of-tree builds that references the file in the @@ -131,6 +130,8 @@ $(abs_builddir)/curl.1: curl-config.1: curl-config.md +mk-ca-bundle.1: mk-ca-bundle.md + distclean: rm -f $(CLEANFILES) diff --git a/docs/libcurl/Makefile.am b/docs/libcurl/Makefile.am index 1a70b96733..d6e4314926 100644 --- a/docs/libcurl/Makefile.am +++ b/docs/libcurl/Makefile.am @@ -36,7 +36,6 @@ m4macrodir = $(datadir)/aclocal dist_m4macro_DATA = libcurl.m4 CLEANFILES = $(man_MANS) libcurl-symbols.md -nodist_MANS = $(man_MANS) EXTRA_DIST = $(CURLPAGES) ABI.md symbols-in-versions symbols.pl \ mksymbolsmanpage.pl CMakeLists.txt diff --git a/docs/libcurl/opts/Makefile.am b/docs/libcurl/opts/Makefile.am index 111202ddd3..be877c52ef 100644 --- a/docs/libcurl/opts/Makefile.am +++ b/docs/libcurl/opts/Makefile.am @@ -30,7 +30,6 @@ include Makefile.inc CURLPAGES = $(man_MANS:.3=.md) endif CLEANFILES = $(man_MANS) -nodist_MANS = $(man_MANS) EXTRA_DIST = $(CURLPAGES) CMakeLists.txt