tzfile.5, tzselect.8: sync from tzdb upstream
[man-pages.git] / Makefile
blob54b492d4057cc15cfb932b75b62b139e2980c98f
1 ########################################################################
2 # Copyright (C) 2021, 2022 Alejandro Colomar <alx@kernel.org>
3 # SPDX-License-Identifier: GPL-2.0 OR LGPL-2.0
4 ########################################################################
5 # Conventions:
7 # - Follow "Makefile Conventions" from the "GNU Coding Standards" closely.
8 # However, when something could be improved, don't follow those.
9 # - Uppercase variables, when referring files, refer to files in this repo.
10 # - Lowercase variables, when referring files, refer to system files.
11 # - Lowercase variables starting with '_' refer to absolute paths,
12 # including $(DESTDIR).
13 # - Uppercase variables starting with '_' refer to temporary files produced
14 # in $builddir.
15 # - Variables ending with '_' refer to a subdir of their parent dir, which
16 # is in a variable of the same name but without the '_'. The subdir is
17 # named after this project: <*/man>.
18 # - Variables ending in '_rm' refer to files that can be removed (exist).
19 # - Variables ending in '_rmdir' refer to dirs that can be removed (exist).
20 # - Targets of the form '%-rm' remove their corresponding file '%'.
21 # - Targets of the form '%/.-rmdir' remove their corresponding dir '%/'.
22 # - Targets of the form '%/.' create their corresponding directory '%/'.
23 # - Every file or directory to be created depends on its parent directory.
24 # This avoids race conditions caused by `mkdir -p`. Only the root
25 # directories are created with parents.
26 # - The 'FORCE' target is used to make phony some variables that can't be
27 # .PHONY to avoid some optimizations.
29 ########################################################################
31 SHELL := /usr/bin/env bash -Eeuo pipefail
34 MAKEFLAGS += --no-builtin-rules
35 MAKEFLAGS += --no-builtin-variables
36 MAKEFLAGS += --no-print-directory
37 MAKEFLAGS += --warn-undefined-variables
40 srcdir := .
43 .PHONY: all
44 all: build
47 .PHONY: help
48 help:
49 $(info Targets:)
50 $(info )
51 $(info all Alias for "build")
52 $(info )
53 $(info clean Remove $$(builddir))
54 $(info )
55 $(info build Alias for "build-html")
56 $(info )
57 $(info build-html Build HTML manual pages)
58 $(info html Alias for "build-html")
59 $(info )
60 $(info build-src Alias for "build-src-ld")
61 $(info build-src-c Extract C programs from EXAMPLES)
62 $(info build-src-cc Compile C programs from EXAMPLES)
63 $(info build-src-ld Link C programs from EXAMPLES)
64 $(info )
65 $(info lint Wrapper for "lint-c lint-man")
66 $(info lint-c Wrapper for lint-c-* targets)
67 $(info lint-c-checkpatch Lint C programs from EXAMPLES with checkpatch(1))
68 $(info lint-c-clang-tidy Lint C programs from EXAMPLES with clang-tidy(1))
69 $(info lint-c-cppcheck Lint C programs from EXAMPLES with cppcheck(1))
70 $(info lint-c-cpplint Lint C programs from EXAMPLES with cpplint(1))
71 $(info lint-c-iwyu Lint C programs from EXAMPLES with iwyu(1))
72 $(info lint-man Wrapper for lint-man-* targets)
73 $(info lint-man-groff Lint man pages with groff(1))
74 $(info lint-man-mandoc Lint man pages with mandoc(1))
75 $(info lint-man-tbl Lint man pages about '\" t' comment for tbl(1))
76 $(info )
77 $(info [un]install Alias for "[un]install-man")
78 $(info [un]install-man Wrapper for [un]install-man* targets)
79 $(info [un]install-man1 [Un]install man pages in section 1)
80 $(info [un]install-man2 [Un]install man pages in section 2)
81 $(info [un]install-man2type [Un]install man pages in section 2type)
82 $(info [un]install-man3 [Un]install man pages in section 3)
83 $(info [un]install-man3const [Un]install man pages in section 3const)
84 $(info [un]install-man3head [Un]install man pages in section 3head)
85 $(info [un]install-man3type [Un]install man pages in section 3type)
86 $(info [un]install-man4 [Un]install man pages in section 4)
87 $(info [un]install-man5 [Un]install man pages in section 5)
88 $(info [un]install-man6 [Un]install man pages in section 6)
89 $(info [un]install-man7 [Un]install man pages in section 7)
90 $(info [un]install-man8 [Un]install man pages in section 8)
91 $(info )
92 $(info [un]install-html [Un]install HTML manual pages)
93 $(info )
94 $(info dist Wrapper for dist-* targets)
95 $(info dist-tar Create a tarball of the repository)
96 $(info dist-gz Create a compressed tarball (.tar.gz))
97 $(info dist-xz Create a compressed tarball (.tar.xz))
98 $(info )
99 $(info help Print this help)
100 $(info )
101 $(info Variables:)
102 $(info )
103 $(info V Define to non-empty string for verbose output)
106 .SECONDEXPANSION:
109 include $(srcdir)/lib/build.mk
110 include $(srcdir)/lib/build-html.mk
111 include $(srcdir)/lib/build-src.mk
112 include $(srcdir)/lib/dist.mk
113 include $(srcdir)/lib/install.mk
114 include $(srcdir)/lib/install-html.mk
115 include $(srcdir)/lib/install-man.mk
116 include $(srcdir)/lib/lint.mk
117 include $(srcdir)/lib/lint-c.mk
118 include $(srcdir)/lib/lint-man.mk
119 include $(srcdir)/lib/verbose.mk
122 FORCE: