Merge the three files from fileutils, textutils, and sh-utils.
[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 djgpp
4 EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
5   .kludge-stamp .prev-version
6
7 install-root:
8         cd src && $(MAKE) $@
9
10 ACLOCAL_AMFLAGS = -I m4
11
12 # Some tests always need root privileges, others need them only sometimes.
13 check-root:
14         cd tests && $(MAKE) $@
15
16 distcheck-hook:
17         $(MAKE) my-distcheck
18
19 # Just prior to distribution, ...
20 # transform the automake-generated rule that runs `rm -f rm'.
21 # On some systems, that command would fail with a diagnostic like
22 # `rm: cannot unlink `rm': Text file busy' when `.' appears so early
23 # in the shell's search path that running `rm' would run the `rm'
24 # executable in the current directory.
25 # Similarly, adjust the clean-binPROGRAMS rule.
26
27 rm_subst = \
28   s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
29 .kludge-stamp: $(srcdir)/src/Makefile.in
30         perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
31         touch $@