Ensure that each version string change propagates to man pages.
[platform/upstream/coreutils.git] / Makefile.am
1 # Make coreutils.                                       -*-Makefile-*-
2
3 # Copyright (C) 1990, 1993-2008 Free Software Foundation, Inc.
4
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 SUBDIRS = lib src doc man po tests gnulib-tests
19 EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
20   .prev-version THANKS-to-translators THANKStt.in \
21   .vg-suppressions \
22   .x-po-check \
23   .x-sc_GPL_version \
24   .x-sc_file_system .x-sc_obsolete_symbols \
25   .x-sc_prohibit_atoi_atof \
26   .x-sc_prohibit_strcmp \
27   .x-sc_require_config_h \
28   .x-sc_space_tab .x-sc_sun_os_names \
29   .x-sc_trailing_blank \
30   .x-sc_unmarked_diagnostics \
31   .x-sc_useless_cpp_parens \
32   ChangeLog-2005 \
33   bootstrap \
34   bootstrap.conf \
35   build-aux/cvsu \
36   build-aux/git-version-gen \
37   build-aux/vc-list-files \
38   gl/modules/getloadavg.diff \
39   m4/ChangeLog \
40   old/fileutils/ChangeLog \
41   old/fileutils/ChangeLog-1997 \
42   old/fileutils/NEWS \
43   old/sh-utils/ChangeLog \
44   old/sh-utils/ChangeLog.0 \
45   old/sh-utils/NEWS \
46   old/textutils/ChangeLog \
47   old/textutils/NEWS
48
49 install-root:
50         cd src && $(MAKE) $@
51
52 ACLOCAL_AMFLAGS = -I m4
53
54 # Some tests always need root privileges, others need them only sometimes.
55 check-root:
56         cd tests && $(MAKE) $@
57
58 # Just prior to distribution, ...
59 # transform the automake-generated rule that runs `rm -f rm'.
60 # On some systems, that command would fail with a diagnostic like
61 # `rm: cannot unlink `rm': Text file busy' when `.' appears so early
62 # in the shell's search path that running `rm' would run the `rm'
63 # executable in the current directory.
64 # Similarly, adjust the clean-binPROGRAMS rule.
65 rm_subst = \
66   s!(rm -f (rm\b|\$$\(bin_PROGRAMS\)$$))!$$1 > /dev/null 2>&1 || /bin/$$1!
67
68 # Arrange so that .version appears only in distribution tarballs,
69 # never in a checked-out repository.
70 # The perl substitution is to change some key uses of "rm" to "/bin/rm".
71 # See the rm_subst comment for details.
72 dist-hook:
73         echo $(VERSION) > $(distdir)/.version
74         perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
75
76 distcheck-hook:
77         $(MAKE) my-distcheck
78
79 DISTCLEANFILES = VERSION
80 MAINTAINERCLEANFILES = THANKS-to-translators
81 THANKS-to-translators: po/LINGUAS THANKStt.in
82         (                                                               \
83           cat $(srcdir)/THANKStt.in;                                    \
84           for lang in `cat $(srcdir)/po/LINGUAS`; do                            \
85             echo http://www.iro.umontreal.ca/contrib/po/HTML/team-$$lang.html; \
86           done;                                                         \
87         ) > $@-tmp && mv $@-tmp $@