1 # Make coreutils man pages. -*-Makefile-*-
2 # This is included by the top-level Makefile.am.
4 # Copyright (C) 2002-2013 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 required because we have subtle inter-directory dependencies:
39 # in order to generate all man pages, even those for which we don't
40 # install a binary, require that all programs be built at distribution
41 # time. We can't use 'dist-hook' for this, since it would run too late:
42 # the manpages must be generated before the distdir is created and filled.
43 $(EXTRA_MANS
): $(all_programs
)
45 # This is a kludge to remove generated 'man/*.1' from a non-srcdir build.
46 # Without this, "make distcheck" might fail.
48 test x
$(srcdir) = x
$(builddir
) ||
rm -f
$(ALL_MANS
)
50 # Dependencies common to all man pages. Updated below.
53 # Depend on this to get version number changes.
56 # This is required so that changes to e.g., emit_bug_reporting_address
57 # provoke regeneration of all the manpages.
58 mandeps
+= $(top_srcdir
)/src
/system.h
60 $(ALL_MANS
): $(mandeps
)
62 # Most prog.1 man pages depend on src/prog. List the exceptions:
63 # Note that dir and vdir are exceptions only if you consider the name
64 # of the .c file upon which they depend: ls.c.
67 man
/install.1: src
/ginstall
70 man
/base64.1
: src
/base64
71 man
/basename.1: src
/basename
73 man
/chcon
.1: src
/chcon
74 man
/chgrp
.1: src
/chgrp
75 man
/chmod
.1: src
/chmod
76 man
/chown
.1: src
/chown
77 man
/chroot
.1: src
/chroot
78 man
/cksum
.1: src
/cksum
81 man
/csplit
.1: src
/csplit
86 man
/dircolors
.1: src
/dircolors
87 man
/dirname
.1: src
/dirname
91 man
/expand
.1: src
/expand
93 man
/factor
.1: src
/factor
94 man
/false
.1: src
/false
97 man
/groups
.1: src
/groups
99 man
/hostid
.1: src
/hostid
100 man
/hostname
.1: src
/hostname
106 man
/logname
.1: src
/logname
108 man
/md5sum
.1: src
/md5sum
109 man
/mkdir
.1: src
/mkdir
110 man
/mkfifo
.1: src
/mkfifo
111 man
/mknod
.1: src
/mknod
112 man
/mktemp
.1: src
/mktemp
116 man
/nohup
.1: src
/nohup
117 man
/nproc
.1: src
/nproc
118 man
/numfmt
.1: src
/numfmt
120 man
/paste
.1: src
/paste
121 man
/pathchk
.1: src
/pathchk
122 man
/pinky
.1: src
/pinky
124 man
/printenv
.1: src
/printenv
125 man
/printf
.1: src
/printf
128 man
/readlink
.1: src
/readlink
129 man
/realpath
.1: src
/realpath
131 man
/rmdir
.1: src
/rmdir
132 man
/runcon
.1: src
/runcon
134 man
/sha1sum
.1: src
/sha1sum
135 man
/sha224sum
.1: src
/sha224sum
136 man
/sha256sum
.1: src
/sha256sum
137 man
/sha384sum
.1: src
/sha384sum
138 man
/sha512sum
.1: src
/sha512sum
139 man
/shred
.1: src
/shred
141 man
/sleep
.1: src
/sleep
143 man
/split
.1: src
/split
145 man
/stdbuf
.1: src
/stdbuf
153 man
/timeout
.1: src
/timeout
154 man
/touch
.1: src
/touch
157 man
/truncate
.1: src
/truncate
158 man
/tsort
.1: src
/tsort
160 man
/uname
.1: src
/uname
161 man
/unexpand
.1: src
/unexpand
163 man
/unlink
.1: src
/unlink
164 man
/uptime
.1: src
/uptime
165 man
/users
.1: src
/users
168 man
/whoami
.1: src
/whoami
172 $(AM_V_GEN
)name
=`echo $@ | sed 's|.*/||; s|\.1$$||'` || exit
1; \
173 ## Ensure that help2man runs the 'src/ginstall' binary as 'install' when
174 ## creating 'install.1'. Similarly, ensure that it uses the 'src/[' binary
175 ## to create 'test.1'.
177 install) prog
='ginstall';; \
181 ## Note the use of $$t/$*, rather than just '$*' as in other packages.
182 ## That is necessary to avoid failures for programs that are also shell
183 ## built-in functions like echo, false, printf, pwd.
188 && (cd
$$t && $(LN_S
) '$(abs_top_builddir)/src/'$$prog $$name) \
190 --source
='$(PACKAGE_STRING)' \
191 --include=$(srcdir)/man
/$$name.x \
192 --output
=$$t/$$name.1 $$t/$$name \
193 --info-page
='coreutils \(aq'$$name' invocation\(aq' \
196 -e
'/For complete documentation/d' \
197 $$t/$$name.1 > $@
-t \