]> sourceware.org Git - automake.git/commitdiff
2001-05-17 Alexandre Duret-Lutz <duret_g@epita.fr>
authorTom Tromey <tromey@redhat.com>
Fri, 18 May 2001 01:14:52 +0000 (01:14 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 18 May 2001 01:14:52 +0000 (01:14 +0000)
* lib/am/install.am (install-strip): Set INSTALL_PROGRAM_ENV if
STRIP is not empty.
* m4/strip.m4 (AM_PROG_INSTALL_STRIP): Set INSTALL_STRIP_PROGRAM
to install-sh unconditionally.  Don't set INSTALL_STRIP_PROGRAM_ENV.
* automake.texi (Requirements): Document the use of the STRIP
variable in cross-compilation environments.

ChangeLog
automake.texi
lib/am/install.am
m4/strip.m4

index fd40dbe16de56133926c575a91b95d1fa30ec75f..977af965981d5af7f74ffa7ce1661dad077d238d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-05-17  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * lib/am/install.am (install-strip): Set INSTALL_PROGRAM_ENV if
+       STRIP is not empty.
+       * m4/strip.m4 (AM_PROG_INSTALL_STRIP): Set INSTALL_STRIP_PROGRAM
+       to install-sh unconditionally.  Don't set INSTALL_STRIP_PROGRAM_ENV.
+       * automake.texi (Requirements): Document the use of the STRIP
+       variable in cross-compilation environments.
+
 2001-05-17  Tom Tromey  <tromey@redhat.com>
 
        * m4/depend.m4 (AM_DEPENDENCIES): If depcomp doesn't exist, revert
index e655cbb00381e9af5fde2baf8f377062ca961600..34825b3e3b5943351b5354df3254f4c9d01d3317 100644 (file)
@@ -936,6 +936,25 @@ are removed by @code{make clean}.
 @cvindex AC_OUTPUT
 @end table
 
+You may need the following macros in some conditions, even though they
+are not required.
+
+@table @code
+@item AC_CHECK_TOOL([STRIP],[strip])
+@cindex STRIP, how to setup
+@cindex install-strip and STRIP
+@cvindex AC_CHECK_TOOL([STRIP],[strip])
+Installed binaries are usually stripped using @code{strip} when you run
+@code{make install-strip}.  However @code{strip} might not be the
+right tool to use in cross-compilation environments, therefore
+Automake will honor the @code{STRIP} environment variable to overrule
+the program used to perform stripping.  Automake will not set @code{STRIP}
+itself.  If your package is not setup for cross-compilation you do not
+have to care (@code{strip} is ok), otherwise you can set @code{STRIP}
+automatically by calling @code{AC_CHECK_TOOL([STRIP],[strip])} from
+your @file{configure.in}.
+@end table
+
 
 @node Optional, Invoking aclocal, Requirements, configure
 @section Other things Automake recognizes
index c3e688347fc59a35c8cf7b9ad4b9d220348c6191..45c059bb6e4707cf5a102e0ca88e750508a80e97 100644 (file)
@@ -66,4 +66,5 @@ install-strip:
 ## Use double quotes here because we might need to interpolate some
 ## backquotes at runtime.
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-         INSTALL_PROGRAM_ENV='$(INSTALL_STRIP_PROGRAM_ENV)' install
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
index 8ca63feb835b1c501fbc82e233ec15009e57f7be..5e8f1e5b0ea8f95f3493075a7ab59113afd55789 100644 (file)
@@ -1,51 +1,12 @@
 # One issue with vendor `install' (even GNU) is that you can't
 # specify the program used to strip binaries.  This is especially
-# annoying in cross=compiling environments, where the build's strip
+# annoying in cross-compiling environments, where the build's strip
 # is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so if we ever
-# need to use a non standard strip, we just have to make sure we use
-# install-sh with the STRIPPROG variable set.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
 AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_MISSING_INSTALL_SH])
-dnl Don't test for $cross_compiling = yes, it might be `maybe'...
-# We'd like to do this but we can't because it will unconditionally
-# require config.guess.  One way would be if autoconf had the capability
-# to let us compile in this code only when config.guess was already
-# a possibility.
-#if test "$cross_compiling" != no; then
-#  # since we are cross-compiling, we need to check for a suitable `strip'
-#  AM_PROG_STRIP
-#  if test -z "$STRIP"; then
-#    AC_MSG_WARN([strip missing, install-strip will not strip binaries])
-#  fi
-#fi
-
-# If $STRIP is defined (either by the user, or by AM_PROG_STRIP),
-# instruct install-strip to use install-sh and the given $STRIP program.
-# Otherwise, just use ${INSTALL}: the idea is to use the vendor install
-# as much as possible, because it's faster.
-if test -z "$STRIP"; then
-  # The top level make will set INSTALL_PROGRAM=$(INSTALL_STRIP_PROGRAM)
-  # and the double dolard below is there to make sure that ${INSTALL}
-  # is substitued in the sub-makes, not at the top-level; this is
-  # needed if ${INSTALL} is a relative path (ajusted in each subdirectory
-  # by config.status).
-  INSTALL_STRIP_PROGRAM='$${INSTALL} -s'
-  INSTALL_STRIP_PROGRAM_ENV=''
-else
-  _am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
-  INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
-  INSTALL_STRIP_PROGRAM_ENV="STRIPPROG='\$(STRIP)'"
-fi
-AC_SUBST([STRIP])
-AC_SUBST([INSTALL_STRIP_PROGRAM])
-AC_SUBST([INSTALL_STRIP_PROGRAM_ENV])])
-
-#AC_DEFUN([AM_PROG_STRIP],
-#[# Check for `strip', unless the installer
-# has set the STRIP environment variable.
-# Note: don't explicitly check for -z "$STRIP" here because
-# that will cause problems if AC_CANONICAL_* is AC_REQUIREd after
-# this macro, and anyway it doesn't have an effect anyway.
-#AC_CHECK_TOOL([STRIP],[strip])
-#])
+[AC_REQUIRE([AM_MISSING_INSTALL_SH])dnl
+_am_dirpart="`echo $install_sh | sed -e 's,//*[[^/]]*$,,'`"
+INSTALL_STRIP_PROGRAM="\${SHELL} \`CDPATH=: && cd $_am_dirpart && pwd\`/install-sh -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
This page took 0.043334 seconds and 5 git commands to generate.