diff options
author | Mathieu Lirzin <mthl@gnu.org> | 2017-08-29 14:16:24 +0200 |
---|---|---|
committer | Mathieu Lirzin <mthl@gnu.org> | 2017-08-30 12:46:33 +0200 |
commit | dd0b8142683d35bdb7e04cc15ece43039ede2a41 (patch) | |
tree | 7733576d6baa1504d7ccdd2d6c17c6cf6b0340ca | |
parent | 37d403fd06596cd27ffd22d5d9796af811841305 (diff) | |
download | automake-dd0b8142683d35bdb7e04cc15ece43039ede2a41.tar.gz |
config: Support AUTOMAKE_LIBDIR environment variable
* 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.
-rw-r--r-- | bin/wrap-automake.in | 5 | ||||
-rw-r--r-- | doc/automake.texi | 5 | ||||
-rw-r--r-- | lib/Automake/Config.in | 2 | ||||
-rw-r--r-- | pre-inst-env.in | 3 |
4 files changed, 9 insertions, 6 deletions
diff --git a/bin/wrap-automake.in b/bin/wrap-automake.in index a363dbc7c..09b1b30f8 100644 --- a/bin/wrap-automake.in +++ b/bin/wrap-automake.in @@ -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'; diff --git a/doc/automake.texi b/doc/automake.texi index 544f7c1e4..1f0b7e581 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -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 diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in index 9437eca9d..a22fdc0f7 100644 --- a/lib/Automake/Config.in +++ b/lib/Automake/Config.in @@ -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. diff --git a/pre-inst-env.in b/pre-inst-env.in index 1599c7b5d..880012cce 100644 --- a/pre-inst-env.in +++ b/pre-inst-env.in @@ -29,4 +29,7 @@ export PATH AUTOMAKE_UNINSTALLED=1 export AUTOMAKE_UNINSTALLED +AUTOMAKE_LIBDIR="$abs_top_srcdir/lib" +export AUTOMAKE_LIBDIR + exec "$@" |