8093ebe416df7ee663767d3e59d3a1cf8a949faa
[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   .hgignore \
6   .gitignore \
7   .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
8   .vg-suppressions \
9   .x-po-check \
10   .x-sc_space_tab .x-sc_sun_os_names \
11   .x-sc_file_system .x-sc_obsolete_symbols \
12   .x-sc_unmarked_diagnostics \
13   .x-sc_useless_cpp_parens \
14   .x-sc_no_if_have_config_h \
15   .x-sc_require_config_h \
16   .x-sc_prohibit_assert_without_use \
17   .x-sc_prohibit_atoi_atof \
18   .x-sc_trailing_blank \
19   .x-sc_two_space_separator_in_usage \
20   announce-gen \
21   build-aux/cvsu \
22   build-aux/vc-list-files \
23   m4/ChangeLog \
24   ChangeLog-2005 \
25   old/fileutils/ChangeLog \
26   old/fileutils/ChangeLog-1997 \
27   old/sh-utils/ChangeLog \
28   old/sh-utils/ChangeLog.0 \
29   old/textutils/ChangeLog \
30   old/fileutils/NEWS \
31   old/sh-utils/NEWS \
32   old/textutils/NEWS
33
34 install-root:
35         cd src && $(MAKE) $@
36
37 ACLOCAL_AMFLAGS = -I m4
38
39 # Some tests always need root privileges, others need them only sometimes.
40 check-root:
41         cd tests && $(MAKE) $@
42
43 dist-hook:
44         test -x $(srcdir)/build-aux/install-sh
45
46 distcheck-hook:
47         $(MAKE) my-distcheck
48
49 # Just prior to distribution, ...
50 # transform the automake-generated rule that runs `rm -f rm'.
51 # On some systems, that command would fail with a diagnostic like
52 # `rm: cannot unlink `rm': Text file busy' when `.' appears so early
53 # in the shell's search path that running `rm' would run the `rm'
54 # executable in the current directory.
55 # Similarly, adjust the clean-binPROGRAMS rule.
56
57 rm_subst = \
58   s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
59 .kludge-stamp: $(srcdir)/src/Makefile.in
60         perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
61         touch $@
62
63
64 MAINTAINERCLEANFILES = THANKS-to-translators
65 THANKS-to-translators: po/LINGUAS THANKStt.in
66         (                                                               \
67           cat $(srcdir)/THANKStt.in;                                    \
68           for lang in `cat po/LINGUAS`; do                              \
69             echo http://www.iro.umontreal.ca/contrib/po/HTML/team-$$lang.html; \
70           done;                                                         \
71         ) > $@-tmp && mv $@-tmp $@