(EXTRA_DIST): Add m4/ChangeLog, now that we no longer have m4/Makefile*.
[platform/upstream/coreutils.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-
2
3 SUBDIRS = lib src doc man po tests
4 EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
5   .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
6   .x-sc_space_tab .x-sc_sun_os_names \
7   announce-gen \
8   m4/ChangeLog \
9   old/fileutils/ChangeLog \
10   old/fileutils/ChangeLog-1997 \
11   old/sh-utils/ChangeLog \
12   old/sh-utils/ChangeLog.0 \
13   old/textutils/ChangeLog \
14   old/fileutils/NEWS \
15   old/sh-utils/NEWS \
16   old/textutils/NEWS
17
18 install-root:
19         cd src && $(MAKE) $@
20
21 ACLOCAL_AMFLAGS = -I m4
22
23 # Some tests always need root privileges, others need them only sometimes.
24 check-root:
25         cd tests && $(MAKE) $@
26
27 dist-hook:
28         test -x $(srcdir)/config/install-sh
29
30 distcheck-hook:
31         $(MAKE) my-distcheck
32
33 # Just prior to distribution, ...
34 # transform the automake-generated rule that runs `rm -f rm'.
35 # On some systems, that command would fail with a diagnostic like
36 # `rm: cannot unlink `rm': Text file busy' when `.' appears so early
37 # in the shell's search path that running `rm' would run the `rm'
38 # executable in the current directory.
39 # Similarly, adjust the clean-binPROGRAMS rule.
40
41 rm_subst = \
42   s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
43 .kludge-stamp: $(srcdir)/src/Makefile.in
44         perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
45         touch $@
46
47 THANKS-to-translators: po/LINGUAS THANKStt.in
48         (                                                               \
49           cat $(srcdir)/THANKStt.in;                                    \
50           for lang in `cat po/LINGUAS`; do                              \
51             echo http://www.iro.umontreal.ca/contrib/po/HTML/team-$$lang.html; \
52           done;                                                         \
53         ) > $@-tmp && mv $@-tmp $@