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