1 # Make coreutils man pages. -*-Makefile-*-
2 # This is included by the top-level Makefile.am.
4 # Copyright (C) 2002-2015 Free Software Foundation, Inc.
6 # This program is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 EXTRA_DIST
+= man
/help2man man
/dummy-man
21 ## Graceful degradation for systems lacking perl.
23 run_help2man
= $(PERL
) -- $(srcdir)/man
/help2man
25 run_help2man
= $(SHELL
) $(srcdir)/man
/dummy-man
28 man1_MANS
= @man1_MANS@
29 EXTRA_DIST
+= $(man1_MANS
:.1=.x
)
31 EXTRA_MANS
= @EXTRA_MANS@
32 EXTRA_DIST
+= $(EXTRA_MANS
:.1=.x
)
34 ALL_MANS
= $(man1_MANS
) $(EXTRA_MANS
)
36 CLEANFILES
+= $(ALL_MANS
)
38 # This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
39 # Without this, "make distcheck" might fail.
41 test x
$(srcdir) = x
$(builddir
) ||
rm -f
$(ALL_MANS
)
43 # Dependencies common to all man pages. Updated below.
46 # Depend on this to get version number changes.
49 # This is required so that changes to e.g., emit_bug_reporting_address
50 # provoke regeneration of all the manpages.
51 mandeps
+= $(top_srcdir
)/src
/system.h
53 $(ALL_MANS
): $(mandeps
)
56 mandeps
+= src
/coreutils
$(EXEEXT
)
58 # Most prog.1 man pages depend on src/prog. List the exceptions:
59 man
/arch
.1: src
/uname
$(EXEEXT
)
60 man
/install.1: src
/ginstall
$(EXEEXT
)
61 man
/test.1: src
/[$(EXEEXT
)
63 man
/base64.1
: src
/base64
$(EXEEXT
)
64 man
/basename.1: src
/basename$(EXEEXT
)
65 man
/cat
.1: src
/cat
$(EXEEXT
)
66 man
/chcon
.1: src
/chcon
$(EXEEXT
)
67 man
/chgrp
.1: src
/chgrp
$(EXEEXT
)
68 man
/chmod
.1: src
/chmod
$(EXEEXT
)
69 man
/chown
.1: src
/chown
$(EXEEXT
)
70 man
/chroot
.1: src
/chroot
$(EXEEXT
)
71 man
/cksum
.1: src
/cksum
$(EXEEXT
)
72 man
/comm
.1: src
/comm
$(EXEEXT
)
73 man
/coreutils
.1: src
/coreutils
$(EXEEXT
)
74 man
/cp
.1: src
/cp
$(EXEEXT
)
75 man
/csplit
.1: src
/csplit
$(EXEEXT
)
76 man
/cut
.1: src
/cut
$(EXEEXT
)
77 man
/date
.1: src
/date
$(EXEEXT
)
78 man
/dd
.1: src
/dd
$(EXEEXT
)
79 man
/df
.1: src
/df
$(EXEEXT
)
80 man
/dir.1: src
/dir$(EXEEXT
)
81 man
/dircolors
.1: src
/dircolors
$(EXEEXT
)
82 man
/dirname
.1: src
/dirname
$(EXEEXT
)
83 man
/du
.1: src
/du
$(EXEEXT
)
84 man
/echo
.1: src
/echo
$(EXEEXT
)
85 man
/env
.1: src
/env
$(EXEEXT
)
86 man
/expand
.1: src
/expand
$(EXEEXT
)
87 man
/expr
.1: src
/expr
$(EXEEXT
)
88 man
/factor
.1: src
/factor
$(EXEEXT
)
89 man
/false
.1: src
/false
$(EXEEXT
)
90 man
/fmt
.1: src
/fmt
$(EXEEXT
)
91 man
/fold
.1: src
/fold
$(EXEEXT
)
92 man
/groups
.1: src
/groups
$(EXEEXT
)
93 man
/head
.1: src
/head
$(EXEEXT
)
94 man
/hostid
.1: src
/hostid
$(EXEEXT
)
95 man
/hostname
.1: src
/hostname
$(EXEEXT
)
96 man
/id
.1: src
/id
$(EXEEXT
)
97 man
/join.1: src
/join$(EXEEXT
)
98 man
/kill
.1: src
/kill
$(EXEEXT
)
99 man
/link
.1: src
/link
$(EXEEXT
)
100 man
/ln
.1: src
/ln
$(EXEEXT
)
101 man
/logname
.1: src
/logname
$(EXEEXT
)
102 man
/ls
.1: src
/ls
$(EXEEXT
)
103 man
/md5sum
.1: src
/md5sum
$(EXEEXT
)
104 man
/mkdir
.1: src
/mkdir
$(EXEEXT
)
105 man
/mkfifo
.1: src
/mkfifo
$(EXEEXT
)
106 man
/mknod
.1: src
/mknod
$(EXEEXT
)
107 man
/mktemp
.1: src
/mktemp
$(EXEEXT
)
108 man
/mv
.1: src
/mv
$(EXEEXT
)
109 man
/nice
.1: src
/nice
$(EXEEXT
)
110 man
/nl
.1: src
/nl
$(EXEEXT
)
111 man
/nohup
.1: src
/nohup
$(EXEEXT
)
112 man
/nproc
.1: src
/nproc
$(EXEEXT
)
113 man
/numfmt
.1: src
/numfmt
$(EXEEXT
)
114 man
/od
.1: src
/od
$(EXEEXT
)
115 man
/paste
.1: src
/paste
$(EXEEXT
)
116 man
/pathchk
.1: src
/pathchk
$(EXEEXT
)
117 man
/pinky
.1: src
/pinky
$(EXEEXT
)
118 man
/pr
.1: src
/pr
$(EXEEXT
)
119 man
/printenv
.1: src
/printenv
$(EXEEXT
)
120 man
/printf
.1: src
/printf
$(EXEEXT
)
121 man
/ptx
.1: src
/ptx
$(EXEEXT
)
122 man
/pwd
.1: src
/pwd
$(EXEEXT
)
123 man
/readlink
.1: src
/readlink
$(EXEEXT
)
124 man
/realpath
.1: src
/realpath
$(EXEEXT
)
125 man
/rm.1: src
/rm$(EXEEXT
)
126 man
/rmdir
.1: src
/rmdir
$(EXEEXT
)
127 man
/runcon
.1: src
/runcon
$(EXEEXT
)
128 man
/seq
.1: src
/seq
$(EXEEXT
)
129 man
/sha1sum
.1: src
/sha1sum
$(EXEEXT
)
130 man
/sha224sum
.1: src
/sha224sum
$(EXEEXT
)
131 man
/sha256sum
.1: src
/sha256sum
$(EXEEXT
)
132 man
/sha384sum
.1: src
/sha384sum
$(EXEEXT
)
133 man
/sha512sum
.1: src
/sha512sum
$(EXEEXT
)
134 man
/shred
.1: src
/shred
$(EXEEXT
)
135 man
/shuf
.1: src
/shuf
$(EXEEXT
)
136 man
/sleep
.1: src
/sleep
$(EXEEXT
)
137 man
/sort.1: src
/sort$(EXEEXT
)
138 man
/split
.1: src
/split
$(EXEEXT
)
139 man
/stat
.1: src
/stat
$(EXEEXT
)
140 man
/stdbuf
.1: src
/stdbuf
$(EXEEXT
)
141 man
/stty
.1: src
/stty
$(EXEEXT
)
142 man
/sum
.1: src
/sum
$(EXEEXT
)
143 man
/sync
.1: src
/sync
$(EXEEXT
)
144 man
/tac
.1: src
/tac
$(EXEEXT
)
145 man
/tail
.1: src
/tail
$(EXEEXT
)
146 man
/tee
.1: src
/tee
$(EXEEXT
)
147 man
/timeout
.1: src
/timeout
$(EXEEXT
)
148 man
/touch
.1: src
/touch
$(EXEEXT
)
149 man
/tr
.1: src
/tr
$(EXEEXT
)
150 man
/true
.1: src
/true
$(EXEEXT
)
151 man
/truncate
.1: src
/truncate
$(EXEEXT
)
152 man
/tsort
.1: src
/tsort
$(EXEEXT
)
153 man
/tty
.1: src
/tty
$(EXEEXT
)
154 man
/uname
.1: src
/uname
$(EXEEXT
)
155 man
/unexpand
.1: src
/unexpand
$(EXEEXT
)
156 man
/uniq
.1: src
/uniq
$(EXEEXT
)
157 man
/unlink
.1: src
/unlink
$(EXEEXT
)
158 man
/uptime
.1: src
/uptime
$(EXEEXT
)
159 man
/users
.1: src
/users
$(EXEEXT
)
160 man
/vdir
.1: src
/vdir
$(EXEEXT
)
161 man
/wc
.1: src
/wc
$(EXEEXT
)
162 man
/who
.1: src
/who
$(EXEEXT
)
163 man
/whoami
.1: src
/whoami
$(EXEEXT
)
164 man
/yes
.1: src
/yes
$(EXEEXT
)
168 $(AM_V_GEN
)name
=`echo $@ | sed 's|.*/||; s|\.1$$||'` || exit
1; \
169 ## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
170 ## creating 'install.1'. Similarly, ensure that it uses the 'src/[' binary
171 ## to create 'test.1'.
173 install) prog
='ginstall'; argv
=$$name;; \
174 test) prog
='['; argv
='[';; \
175 *) prog
=$$name; argv
=$$prog;; \
177 ## Note the use of $$t/$*, rather than just '$*' as in other packages.
178 ## That is necessary to avoid failures for programs that are also shell
179 ## built-in functions like echo, false, printf, pwd.
184 && (cd
$$t && $(LN_S
) '$(abs_top_builddir)/src/'$$prog$(EXEEXT
) \
187 --source
='$(PACKAGE_STRING)' \
188 --include=$(srcdir)/man
/$$name.x \
189 --output
=$$t/$$name.1 \
190 --info-page
='\(aq(coreutils) '$$name' invocation\(aq' \
191 $$t/$$argv$(EXEEXT
) \
194 -e
'/For complete documentation/d' \
195 $$t/$$name.1 > $@
-t \