]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
config: Support AUTOMAKE_LIBDIR environment variable
authorMathieu Lirzin <mthl@gnu.org>
Tue, 29 Aug 2017 12:16:24 +0000 (14:16 +0200)
committerMathieu Lirzin <mthl@gnu.org>
Wed, 30 Aug 2017 10:46:33 +0000 (12:46 +0200)
* lib/Automake/Config.in: Let AUTOMAKE_LIBDIR environment variable
override the default location for '$libdir'.
* doc/automake.texi (automake Invocation): Document AUTOMAKE_LIBDIR.
* pre-inst-env.in (AUTOMAKE_LIBDIR): Set AUTOMAKE_LIBDIR.
* bin/wrap-automake.in: Don't use "--libdir" option.

bin/wrap-automake.in
doc/automake.texi
lib/Automake/Config.in
pre-inst-env.in

index a363dbc7c6834104d11ea6a22a08e182dc375a84..09b1b30f8b9f7485f38443c816f7ec77670a7bca 100644 (file)
@@ -16,9 +16,4 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-BEGIN
-{
-  use strict;
-  unshift @ARGV, '--libdir=@abs_top_srcdir@/lib';
-}
 require '@abs_top_builddir@/bin/automake';
index 544f7c1e4861e4d5908e522ea261946f78091d60..1f0b7e581784993b75a212b74b6e6d845e90e658 100644 (file)
@@ -2579,6 +2579,11 @@ for more information.
 Look for Automake data files in directory @var{dir} instead of in the
 installation directory.  This is typically used for debugging.
 
+@vindex AUTOMAKE_LIBDIR
+The environment variable @env{AUTOMAKE_LIBDIR} provides another way to
+set the directory containing Automake data files.  However
+@option{--libdir} takes precedence over it.
+
 @item --print-libdir
 @opindex --print-libdir
 Print the path of the installation directory containing Automake-provided
index 9437eca9dfb95b23b28aec71a91e8fa4f58ca029..a22fdc0f75bf1e3a90587d22eb9cc5440c304ab8 100644 (file)
@@ -32,7 +32,7 @@ our $PACKAGE = '@PACKAGE@';
 our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@';
 our $VERSION = '@VERSION@';
 our $RELEASE_YEAR = '@RELEASE_YEAR@';
-our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
+our $libdir = $ENV{"AUTOMAKE_LIBDIR"} || '@datadir@/@PACKAGE@-@APIVERSION@';
 
 our $perl_threads = 0;
 # We need at least this version for CLONE support.
index 1599c7b5d86da66c74b89c4d22aa34768d06d706..880012cce3a625051b1c1b9b8faf90badcee5086 100644 (file)
@@ -29,4 +29,7 @@ export PATH
 AUTOMAKE_UNINSTALLED=1
 export AUTOMAKE_UNINSTALLED
 
+AUTOMAKE_LIBDIR="$abs_top_srcdir/lib"
+export AUTOMAKE_LIBDIR
+
 exec "$@"