xref: /curl/docs/cmdline-opts/Makefile.am (revision 0066d169)
1#***************************************************************************
2#                                  _   _ ____  _
3#  Project                     ___| | | |  _ \| |
4#                             / __| | | | |_) | |
5#                            | (__| |_| |  _ <| |___
6#                             \___|\___/|_| \_\_____|
7#
8# Copyright (C) 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
27MANPAGE = curl.1
28ASCIIPAGE = curl.txt
29
30include Makefile.inc
31
32EXTRA_DIST = $(DPAGES) MANPAGE.md $(SUPPORT) CMakeLists.txt mainpage.idx
33
34GEN = $(GN_$(V))
35GN_0 = @echo "  GENERATE" $@;
36GN_1 =
37GN_ = $(GN_0)
38
39MANAGEN=$(top_srcdir)/scripts/managen
40MAXLINE=$(top_srcdir)/scripts/maxline
41
42# Maximum number of columns accepted in the ASCII version of the manpage
43INCDIR=$(top_srcdir)/include
44
45if BUILD_DOCS
46CLEANFILES = $(MANPAGE) $(ASCIIPAGE)
47man_MANS = $(MANPAGE)
48
49all: $(MANPAGE) $(ASCIIPAGE)
50
51endif
52
53$(MANPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
54	$(GEN)(rm -f $(MANPAGE) && @PERL@ $(MANAGEN) -d $(srcdir) -I $(INCDIR) mainpage $(DPAGES) > manpage.tmp.$$$$ && mv manpage.tmp.$$$$ $(MANPAGE))
55
56$(ASCIIPAGE): $(DPAGES) $(SUPPORT) mainpage.idx Makefile.inc $(MANAGEN)
57	$(GEN)(rm -f $(ASCIIPAGE) && @PERL@ $(MANAGEN) -d $(srcdir) -I $(INCDIR) ascii $(DPAGES) > asciipage.tmp.$$$$ && mv asciipage.tmp.$$$$ $(ASCIIPAGE))
58
59listhelp:
60	$(MANAGEN) -d $(srcdir) listhelp $(DPAGES) > $(top_builddir)/src/tool_listhelp.c
61
62listcats:
63	@$(MANAGEN) listcats $(DPAGES)
64