blob: 0d565796fa00a7c31fda5261ee4e14c0b0531425 [file] [log] [blame]
xf.li6c8fc1e2023-08-12 00:11:09 -07001#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
13#
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
17#
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
20#
21# SPDX-License-Identifier: curl
22#
23###########################################################################
24
25AUTOMAKE_OPTIONS = foreign no-dependencies
26
27# EXTRA_DIST breaks with $(abs_builddir) so build it using this variable
28# but distribute it (using the relative file name) in the next variable
29man_MANS = $(abs_builddir)/curl.1
30noinst_man_MANS = curl.1 mk-ca-bundle.1
31dist_man_MANS = curl-config.1
32GENHTMLPAGES = curl.html curl-config.html mk-ca-bundle.html
33PDFPAGES = curl.pdf curl-config.pdf mk-ca-bundle.pdf
34MANDISTPAGES = curl.1.dist curl-config.1.dist
35
36HTMLPAGES = $(GENHTMLPAGES)
37
38# Build targets in this file (.) before cmdline-opts to ensure that
39# the curl.1 rule below runs first
40SUBDIRS = . cmdline-opts
41DIST_SUBDIRS = $(SUBDIRS) examples libcurl
42
43CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) $(MANDISTPAGES) curl.1
44
45EXTRA_DIST = \
46 $(noinst_man_MANS) \
47 ALTSVC.md \
48 BINDINGS.md \
49 BUFREF.md \
50 BUG-BOUNTY.md \
51 BUGS.md \
52 CHECKSRC.md \
53 CIPHERS.md \
54 CMakeLists.txt \
55 CODE_OF_CONDUCT.md \
56 CODE_REVIEW.md \
57 CODE_STYLE.md \
58 CONTRIBUTE.md \
59 CURL-DISABLE.md \
60 DEPRECATE.md \
61 DYNBUF.md \
62 EXPERIMENTAL.md \
63 FAQ \
64 FEATURES.md \
65 GOVERNANCE.md \
66 HELP-US.md \
67 HISTORY.md \
68 HSTS.md \
69 HTTP-COOKIES.md \
70 HTTP2.md \
71 HTTP3.md \
72 HYPER.md \
73 INSTALL \
74 INSTALL.cmake \
75 INSTALL.md \
76 INTERNALS.md \
77 KNOWN_BUGS \
78 MAIL-ETIQUETTE \
79 MQTT.md \
80 NEW-PROTOCOL.md \
81 options-in-versions \
82 PARALLEL-TRANSFERS.md \
83 README.md \
84 RELEASE-PROCEDURE.md \
85 RUSTLS.md \
86 ROADMAP.md \
87 SECURITY-PROCESS.md \
88 SSL-PROBLEMS.md \
89 SSLCERTS.md \
90 THANKS \
91 TODO \
92 TheArtOfHttpScripting.md \
93 URL-SYNTAX.md \
94 VERSIONS.md \
95 WEBSOCKET.md
96
97MAN2HTML= roffit $< >$@
98
99SUFFIXES = .1 .html .pdf
100
101# $(abs_builddir) is to disable VPATH when searching for this file, which
102# would otherwise find the copy in $(srcdir) which breaks the $(HUGE)
103# rule in src/Makefile.am in out-of-tree builds that references the file in the
104# build directory.
105#
106# First, seed the used copy of curl.1 with the prebuilt copy (in an out-of-tree
107# build), then run make recursively to rebuild it only if its dependencies
108# have changed.
109$(abs_builddir)/curl.1:
110 if test "$(top_builddir)x" != "$(top_srcdir)x" -a -e "$(srcdir)/curl.1"; then \
111 $(INSTALL_DATA) "$(srcdir)/curl.1" $@; fi
112 cd cmdline-opts && $(MAKE)
113
114html: $(HTMLPAGES)
115 cd libcurl && $(MAKE) html
116
117pdf: $(PDFPAGES)
118 cd libcurl && $(MAKE) pdf
119
120.1.html:
121 $(MAN2HTML)
122
123.1.pdf:
124 @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \
125 groff -Tps -man $< >$$foo.ps; \
126 ps2pdf $$foo.ps $@; \
127 rm $$foo.ps; \
128 echo "converted $< to $@")
129
130distclean:
131 rm -f $(CLEANFILES)