summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-07-04 09:41:57 +0200
committerJim Meyering <meyering@redhat.com>2008-07-04 09:46:31 +0200
commit9a4e22d03600c836673033089e396e141c7d1f08 (patch)
tree3ba989bb07361d102102fedc4c12cd07577a0b84
parentbba4d3e054cee1f479e6f7239304df676bd63fea (diff)
downloadcoreutils-9a4e22d03600c836673033089e396e141c7d1f08.tar.xz
install with just-built ./ginstall only when not cross-compiling
* src/Makefile.am (install-exec-am): ...otherwise, use the default value, $(INSTALL_PROGRAM). Reported by Brian Silverman.
-rw-r--r--THANKS1
-rw-r--r--src/Makefile.am11
2 files changed, 9 insertions, 3 deletions
diff --git a/THANKS b/THANKS
index 40b33bada..bff091755 100644
--- a/THANKS
+++ b/THANKS
@@ -79,6 +79,7 @@ Bob Proulx rwp@fc.hp.com
Branden Robinson branden@necrotic.deadbeast.net
Brendan O'Dea bod@compusol.com.au
Brian Kimball bfk@footbag.org
+Brian Silverman bsilverman@conceptxdesign.com
Brian Youmans 3diff@gnu.org
Bruce Korb bkorb@veritas.com
Bruce Robertson brucer@theodolite.dyndns.org
diff --git a/src/Makefile.am b/src/Makefile.am
index 342fc0964..65b20a2a3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -437,11 +437,15 @@ sc_tight_scope: $(all_programs)
{ echo 'the above variables should have static scope' 1>&2; \
exit 1; } || :
-.PHONY: cu-install-binPROGRAMS
+# Use the just-built ./ginstall, when not cross-compiling.
+# Override automake's install-one-at-a-time rule, when possible.
install-exec-am:
- @case '$(program_transform_name):$(EXEEXT)' in \
+ @(./ginstall --version) > /dev/null 2>&1 \
+ && install=./ginstall \
+ || install='$(INSTALL_PROGRAM)'; \
+ case '$(program_transform_name):$(EXEEXT)' in \
's,x,x,:') cu=cu-;; *) cu= ;; esac; \
- $(MAKE) $(AM_MAKEFLAGS) binPROGRAMS_INSTALL=./ginstall \
+ $(MAKE) $(AM_MAKEFLAGS) binPROGRAMS_INSTALL="$$install" \
$${cu}install-binPROGRAMS
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
@@ -458,6 +462,7 @@ install-exec-am:
filtered_PROGS = \
`echo "$(bin_PROGRAMS)" | sed 's/ *\<ginstall\> */ /;s/ *\[ */ /'`
d_bindir = $(DESTDIR)$(bindir)
+.PHONY: cu-install-binPROGRAMS
cu-install-binPROGRAMS: $(bin_PROGRAMS)
$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(d_bindir)"