summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-08-30 10:47:11 +0200
committerJim Meyering <jim@meyering.net>2007-08-30 17:28:12 +0200
commit624d125ceec7b676a38a252f9c5c7e69f4ada8b5 (patch)
treecac53661f6041d31ffcd09c3e8a0ae6ce8fdd8c7 /Makefile.am
parentbfe49f506f3385329d37baf4e242529049cfc887 (diff)
downloadcoreutils-624d125ceec7b676a38a252f9c5c7e69f4ada8b5.tar.xz
Perform the s,rm,/bin/rm, fix-up properly. No more kludge.
* Makefile.am (EXTRA_DIST): Remove .kludge-stamp. (.kludge-stamp): Remove rule. Instead, ... (dist-hook): Do the job here, operating on the file in $(distdir). (rm_subst): Adjust regexp to match "rm -f rm$(EXEEXT)", not "rm -f rm". (MAINTAINERCLEANFILES): s/+=/=/, now that this is the sole use. (dist-hook): Remove the legacy-from-cvs install-sh is-executable check. * .gitignore: Remove .kludge-stamp. Signed-off-by: Jim Meyering <jim@meyering.net>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am30
1 files changed, 13 insertions, 17 deletions
diff --git a/Makefile.am b/Makefile.am
index dad84fbc6..8136526a5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@
SUBDIRS = lib src doc man po tests
EXTRA_DIST = Makefile.cfg Makefile.maint GNUmakefile \
- .kludge-stamp .prev-version THANKS-to-translators THANKStt.in \
+ .prev-version THANKS-to-translators THANKStt.in \
.vg-suppressions \
.x-po-check \
.x-sc_file_system .x-sc_obsolete_symbols \
@@ -54,15 +54,6 @@ ACLOCAL_AMFLAGS = -I m4
check-root:
cd tests && $(MAKE) $@
-# Arrange so that .version appears only in distribution tarballs,
-# never in a checked-out repository.
-dist-hook:
- echo $(VERSION) > $(distdir)/.version
- test -x $(srcdir)/build-aux/install-sh
-
-distcheck-hook:
- $(MAKE) my-distcheck
-
# Just prior to distribution, ...
# transform the automake-generated rule that runs `rm -f rm'.
# On some systems, that command would fail with a diagnostic like
@@ -70,16 +61,21 @@ distcheck-hook:
# in the shell's search path that running `rm' would run the `rm'
# executable in the current directory.
# Similarly, adjust the clean-binPROGRAMS rule.
-
rm_subst = \
- s!(rm -f (rm|\$$\(bin_PROGRAMS\)))$$!$$1 > /dev/null 2>&1 || /bin/$$1!
-MAINTAINERCLEANFILES = .kludge-stamp
-.kludge-stamp: $(srcdir)/src/Makefile.in
- perl -pi -e '$(rm_subst)' $(srcdir)/src/Makefile.in
- touch $@
+ s!(rm -f (rm\b|\$$\(bin_PROGRAMS\)$$))!$$1 > /dev/null 2>&1 || /bin/$$1!
+
+# Arrange so that .version appears only in distribution tarballs,
+# never in a checked-out repository.
+# The perl substitution is to change some key uses of "rm" to "/bin/rm".
+# See the rm_subst comment for details.
+dist-hook:
+ echo $(VERSION) > $(distdir)/.version
+ perl -pi -e '$(rm_subst)' $(distdir)/src/Makefile.in
+distcheck-hook:
+ $(MAKE) my-distcheck
-MAINTAINERCLEANFILES += THANKS-to-translators
+MAINTAINERCLEANFILES = THANKS-to-translators
THANKS-to-translators: po/LINGUAS THANKStt.in
( \
cat $(srcdir)/THANKStt.in; \