1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
3 base64.1 basename.1 cat.1 chgrp.1 chmod.1 chown.1 chroot.1 cksum.1 comm.1 \
4 cp.1 csplit.1 cut.1 date.1 dd.1 df.1 dir.1 dircolors.1 dirname.1 du.1 \
5 echo.1 env.1 expand.1 expr.1 factor.1 false.1 fmt.1 fold.1 groups.1 \
6 head.1 hostid.1 hostname.1 id.1 install.1 join.1 kill.1 \
7 link.1 ln.1 logname.1 \
8 ls.1 md5sum.1 mkdir.1 mkfifo.1 mknod.1 mv.1 nice.1 nl.1 nohup.1 od.1 \
9 paste.1 pathchk.1 pinky.1 pr.1 printenv.1 printf.1 ptx.1 pwd.1 readlink.1 \
10 rm.1 rmdir.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 sha384sum.1 sha512sum.1 \
11 shred.1 shuf.1 sleep.1 sort.1 split.1 stat.1 stty.1 \
12 su.1 sum.1 sync.1 tac.1 tail.1 tee.1 test.1 touch.1 tr.1 true.1 tsort.1 \
13 tty.1 uname.1 unexpand.1 uniq.1 unlink.1 uptime.1 users.1 vdir.1 wc.1 \
16 man_aux = $(dist_man_MANS:.1=.x)
18 EXTRA_DIST = $(man_aux) help2man
19 MAINTAINERCLEANFILES = $(man_MANS)
21 # Depend on configure.ac to get version number changes.
22 common_dep = $(top_srcdir)/configure.ac
24 base64.1: $(common_dep) $(srcdir)/base64.x ../src/base64.c
25 basename.1: $(common_dep) $(srcdir)/basename.x ../src/basename.c
26 cat.1: $(common_dep) $(srcdir)/cat.x ../src/cat.c
27 chgrp.1: $(common_dep) $(srcdir)/chgrp.x ../src/chgrp.c
28 chmod.1: $(common_dep) $(srcdir)/chmod.x ../src/chmod.c
29 chown.1: $(common_dep) $(srcdir)/chown.x ../src/chown.c
30 chroot.1: $(common_dep) $(srcdir)/chroot.x ../src/chroot.c
31 cksum.1: $(common_dep) $(srcdir)/cksum.x ../src/cksum.c
32 comm.1: $(common_dep) $(srcdir)/comm.x ../src/comm.c
33 cp.1: $(common_dep) $(srcdir)/cp.x ../src/cp.c
34 csplit.1: $(common_dep) $(srcdir)/csplit.x ../src/csplit.c
35 cut.1: $(common_dep) $(srcdir)/cut.x ../src/cut.c
36 date.1: $(common_dep) $(srcdir)/date.x ../src/date.c
37 dd.1: $(common_dep) $(srcdir)/dd.x ../src/dd.c
38 df.1: $(common_dep) $(srcdir)/df.x ../src/df.c
40 # Note that dir depends on ls.c, since that's where it's --help text is.
41 dir.1: $(common_dep) $(srcdir)/dir.x ../src/ls.c
43 dircolors.1: $(common_dep) $(srcdir)/dircolors.x ../src/dircolors.c
44 dirname.1: $(common_dep) $(srcdir)/dirname.x ../src/dirname.c
45 du.1: $(common_dep) $(srcdir)/du.x ../src/du.c
46 echo.1: $(common_dep) $(srcdir)/echo.x ../src/echo.c
47 env.1: $(common_dep) $(srcdir)/env.x ../src/env.c
48 expand.1: $(common_dep) $(srcdir)/expand.x ../src/expand.c
49 expr.1: $(common_dep) $(srcdir)/expr.x ../src/expr.c
50 factor.1: $(common_dep) $(srcdir)/factor.x ../src/factor.c
51 false.1: $(common_dep) $(srcdir)/false.x ../src/false.c
52 fmt.1: $(common_dep) $(srcdir)/fmt.x ../src/fmt.c
53 fold.1: $(common_dep) $(srcdir)/fold.x ../src/fold.c
54 groups.1: $(common_dep) $(srcdir)/groups.x ../src/groups.sh
55 head.1: $(common_dep) $(srcdir)/head.x ../src/head.c
56 hostid.1: $(common_dep) $(srcdir)/hostid.x ../src/hostid.c
57 hostname.1: $(common_dep) $(srcdir)/hostname.x ../src/hostname.c
58 id.1: $(common_dep) $(srcdir)/id.x ../src/id.c
59 install.1: $(common_dep) $(srcdir)/install.x ../src/install.c
60 join.1: $(common_dep) $(srcdir)/join.x ../src/join.c
61 kill.1: $(common_dep) $(srcdir)/kill.x ../src/kill.c
62 link.1: $(common_dep) $(srcdir)/link.x ../src/link.c
63 ln.1: $(common_dep) $(srcdir)/ln.x ../src/ln.c
64 logname.1: $(common_dep) $(srcdir)/logname.x ../src/logname.c
65 ls.1: $(common_dep) $(srcdir)/ls.x ../src/ls.c
66 md5sum.1: $(common_dep) $(srcdir)/md5sum.x ../src/md5sum.c
67 mkdir.1: $(common_dep) $(srcdir)/mkdir.x ../src/mkdir.c
68 mkfifo.1: $(common_dep) $(srcdir)/mkfifo.x ../src/mkfifo.c
69 mknod.1: $(common_dep) $(srcdir)/mknod.x ../src/mknod.c
70 mv.1: $(common_dep) $(srcdir)/mv.x ../src/mv.c
71 nice.1: $(common_dep) $(srcdir)/nice.x ../src/nice.c
72 nl.1: $(common_dep) $(srcdir)/nl.x ../src/nl.c
73 nohup.1: $(common_dep) $(srcdir)/nohup.x ../src/nohup.c
74 od.1: $(common_dep) $(srcdir)/od.x ../src/od.c
75 paste.1: $(common_dep) $(srcdir)/paste.x ../src/paste.c
76 pathchk.1: $(common_dep) $(srcdir)/pathchk.x ../src/pathchk.c
77 pinky.1: $(common_dep) $(srcdir)/pinky.x ../src/pinky.c
78 pr.1: $(common_dep) $(srcdir)/pr.x ../src/pr.c
79 printenv.1: $(common_dep) $(srcdir)/printenv.x ../src/printenv.c
80 printf.1: $(common_dep) $(srcdir)/printf.x ../src/printf.c
81 ptx.1: $(common_dep) $(srcdir)/ptx.x ../src/ptx.c
82 pwd.1: $(common_dep) $(srcdir)/pwd.x ../src/pwd.c
83 readlink.1: $(common_dep) $(srcdir)/readlink.x ../src/readlink.c
84 rm.1: $(common_dep) $(srcdir)/rm.x ../src/rm.c
85 rmdir.1: $(common_dep) $(srcdir)/rmdir.x ../src/rmdir.c
86 seq.1: $(common_dep) $(srcdir)/seq.x ../src/seq.c
87 sha1sum.1: $(common_dep) $(srcdir)/sha1sum.x ../src/md5sum.c
88 sha224sum.1: $(common_dep) $(srcdir)/sha224sum.x ../src/md5sum.c
89 sha256sum.1: $(common_dep) $(srcdir)/sha256sum.x ../src/md5sum.c
90 sha384sum.1: $(common_dep) $(srcdir)/sha384sum.x ../src/md5sum.c
91 sha512sum.1: $(common_dep) $(srcdir)/sha512sum.x ../src/md5sum.c
92 shred.1: $(common_dep) $(srcdir)/shred.x ../src/shred.c
93 shuf.1: $(common_dep) $(srcdir)/shuf.x ../src/shuf.c
94 sleep.1: $(common_dep) $(srcdir)/sleep.x ../src/sleep.c
95 sort.1: $(common_dep) $(srcdir)/sort.x ../src/sort.c
96 split.1: $(common_dep) $(srcdir)/split.x ../src/split.c
97 stat.1: $(common_dep) $(srcdir)/stat.x ../src/stat.c
98 stty.1: $(common_dep) $(srcdir)/stty.x ../src/stty.c
99 su.1: $(common_dep) $(srcdir)/su.x ../src/su.c
100 sum.1: $(common_dep) $(srcdir)/sum.x ../src/sum.c
101 sync.1: $(common_dep) $(srcdir)/sync.x ../src/sync.c
102 tac.1: $(common_dep) $(srcdir)/tac.x ../src/tac.c
103 tail.1: $(common_dep) $(srcdir)/tail.x ../src/tail.c
104 tee.1: $(common_dep) $(srcdir)/tee.x ../src/tee.c
105 test.1: $(common_dep) $(srcdir)/test.x ../src/test.c
106 touch.1: $(common_dep) $(srcdir)/touch.x ../src/touch.c
107 tr.1: $(common_dep) $(srcdir)/tr.x ../src/tr.c
108 true.1: $(common_dep) $(srcdir)/true.x ../src/true.c
109 tsort.1: $(common_dep) $(srcdir)/tsort.x ../src/tsort.c
110 tty.1: $(common_dep) $(srcdir)/tty.x ../src/tty.c
111 uname.1: $(common_dep) $(srcdir)/uname.x ../src/uname.c
112 unexpand.1: $(common_dep) $(srcdir)/unexpand.x ../src/unexpand.c
113 uniq.1: $(common_dep) $(srcdir)/uniq.x ../src/uniq.c
114 unlink.1: $(common_dep) $(srcdir)/unlink.x ../src/unlink.c
115 uptime.1: $(common_dep) $(srcdir)/uptime.x ../src/uptime.c
116 users.1: $(common_dep) $(srcdir)/users.x ../src/users.c
117 vdir.1: $(common_dep) $(srcdir)/vdir.x ../src/ls.c
118 wc.1: $(common_dep) $(srcdir)/wc.x ../src/wc.c
119 who.1: $(common_dep) $(srcdir)/who.x ../src/who.c
120 whoami.1: $(common_dep) $(srcdir)/whoami.x ../src/whoami.c
121 yes.1: $(common_dep) $(srcdir)/yes.x ../src/yes.c
125 # Ensure that help2man runs the ../src/ginstall binary as
126 # `install' when creating install.1.
127 # Similarly, ensure that it uses the ../src/[ binary to create test.1.
129 mapped_name = `echo $*|sed 's/install/ginstall/; s/test/[/'`
131 # Note the use of $t/$*, rather than just `$*' as in other packages.
132 # That is necessary to avoid failures for programs that are also shell built-in
133 # functions like echo, false, printf, pwd.
136 @echo "Updating man page $@"; \
139 (cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
140 $(PERL) -- $(srcdir)/help2man \
141 --include=$(srcdir)/$*.x \
143 @sed 's|$*\.td/||g' $t/$@ > $@
147 check-local: check-x-vs-1 check-programs-vs-x
149 # Sort in traditional ASCII order, regardless of the current locale;
150 # otherwise we may get into trouble with distinct strings that the
151 # current locale considers to be equal.
152 ASSORT = LC_ALL=C sort
154 # Ensure that for each .x file in this directory, there is a
155 # corresponding .1 file in the definition of $(dist_man_MANS) above.
158 PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
160 (cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
161 echo $(dist_man_MANS) | tr -s ' ' '\n' | sed 's/\.1$$//' \
162 | $(ASSORT) | diff - $$t || { rm $$t; exit 1; }; \
166 (cd ../src && MAKEFLAGS= $(MAKE) -s all_programs.list) \
169 .PHONY: check-programs-vs-x
172 for p in dummy `$(all_programs)`; do \
173 test $$p = dummy && continue; \
174 test $$p = ginstall && p=install || : ; \
175 test -f $(srcdir)/$$p.x \
176 || { echo missing $$p.x 1>&2; status=1; }; \