mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-17 15:10:02 +08:00
tests: always extract only the first AC_CONFIG_MACRO_DIR arg.
Previous releases of libtoolize used the final invocation when there were several, and after the rewrite over extract-trace, all the invocation directories were concatenated. This change enforces correct and consistent behaviour. * tests/libtoolize.at (multiple AC_CONFIG_MACRO_DIR invocation): New test. * build-aux/extract-trace (func_extract_trace_first): New function for clients that source this file, which returns only the first argument to the first invocation of the named macros. * libtoolize.in (func_require_ac_macro_dir): Use it to make sure the first argument is always used. (func_require_ac_aux_dir, func_require_ac_ltdl_dir) (func_require_ac_ltdl_options): Future proof these functions against multiple invocations or additional arguments to the macros they trace. * News (Important incompatible changes): Note change in semantics. Reported by Eric Blake. Signed-off-by: Gary V. Vaughan <gary@gnu.org>
This commit is contained in:
parent
f8061eabaf
commit
55262b6fe4
6
NEWS
6
NEWS
@ -70,6 +70,12 @@ NEWS - list of user-visible changes between releases of GNU Libtool
|
||||
upgrade to the more standard naming of `ltdl.mk' in keeping with other
|
||||
GNU projects.
|
||||
|
||||
- libtoolize now behaves consistenty in respect of multiple directory
|
||||
arguments to ACLOCAL_AMFLAGS and multiple invocations of AC_CONFIG-
|
||||
_MACRO_DIRS, where the first directory is always selected. Previous
|
||||
releases took the first ACLOCAL_AMFLAGS argument, but the last
|
||||
invocation of AC_CONFIG_MACRO_DIRS.
|
||||
|
||||
New in 2.4.2 2011-10-17: git version 2.4.1a, Libtool team:
|
||||
|
||||
* New features:
|
||||
|
@ -348,6 +348,21 @@ func_extract_trace ()
|
||||
}
|
||||
|
||||
|
||||
# func_extract_trace_first MACRO_NAMES [FILENAME]...
|
||||
# --------------------------------------------------
|
||||
# Exactly like func_extract_trace, except that only the first argument
|
||||
# to the first invocation of one of the comma separated MACRO_NAMES is
|
||||
# returned in `$func_extract_trace_first_result`.
|
||||
func_extract_trace_first ()
|
||||
{
|
||||
$debug_cmd
|
||||
|
||||
func_extract_trace ${1+"$@"}
|
||||
func_extract_trace_first_result=`$bs_echo "$func_extract_trace_result" \
|
||||
|$SED 's|:.*$||g;1q'`
|
||||
}
|
||||
|
||||
|
||||
# func_main [ARG]...
|
||||
# ------------------
|
||||
func_main ()
|
||||
|
@ -1421,8 +1421,8 @@ func_require_ac_aux_dir ()
|
||||
$require_configure_ac
|
||||
|
||||
test -n "$configure_ac" && {
|
||||
func_extract_trace AC_CONFIG_AUX_DIR
|
||||
ac_aux_dir=$func_extract_trace_result
|
||||
func_extract_trace_first AC_CONFIG_AUX_DIR
|
||||
ac_aux_dir=$func_extract_trace_first_result
|
||||
|
||||
case $ac_aux_dir in
|
||||
*\$*)
|
||||
@ -1449,8 +1449,8 @@ func_require_ac_ltdl_dir ()
|
||||
$require_configure_ac
|
||||
|
||||
if test -n "$configure_ac"; then
|
||||
func_extract_trace LT_CONFIG_LTDL_DIR
|
||||
ac_ltdl_dir=`expr "$func_extract_trace_result" : '\([^:]*\)'`
|
||||
func_extract_trace_first LT_CONFIG_LTDL_DIR
|
||||
ac_ltdl_dir=$func_extract_trace_first_result
|
||||
|
||||
case $ac_ltdl_dir in
|
||||
*\$*)
|
||||
@ -1498,8 +1498,8 @@ func_require_ac_ltdl_options ()
|
||||
$require_configure_ac
|
||||
|
||||
if test -n "$configure_ac"; then
|
||||
func_extract_trace LTDL_INIT
|
||||
ac_ltdl_options=$func_extract_trace_result
|
||||
func_extract_trace_first LTDL_INIT
|
||||
ac_ltdl_options=$func_extract_trace_first_result
|
||||
|
||||
case $ac_ltdl_options in
|
||||
*\$*)
|
||||
@ -1524,8 +1524,8 @@ func_require_ac_macro_dir ()
|
||||
$require_configure_ac
|
||||
|
||||
if test -n "$configure_ac"; then
|
||||
func_extract_trace AC_CONFIG_MACRO_DIR
|
||||
ac_macro_dir=$func_extract_trace_result
|
||||
func_extract_trace_first AC_CONFIG_MACRO_DIR
|
||||
ac_macro_dir=$func_extract_trace_first_result
|
||||
fi
|
||||
|
||||
require_ac_macro_dir=:
|
||||
|
@ -123,6 +123,38 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 1, [ignore], experr)
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## ---------------------------------------- ##
|
||||
## AC_CONFIG_MACRO_DIR macrodir extraction. ##
|
||||
## ---------------------------------------- ##
|
||||
|
||||
AT_SETUP([multiple AC_CONFIG_MACRO_DIR invocation])
|
||||
|
||||
AT_DATA([configure.ac],
|
||||
[[AC_INIT([libtoolize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([first])
|
||||
AC_CONFIG_MACRO_DIR([second])
|
||||
LT_INIT
|
||||
AC_OUTPUT
|
||||
]])
|
||||
|
||||
AT_DATA(expout,
|
||||
[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
|
||||
libtoolize: copying file `build-aux/ltmain.sh'
|
||||
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `first'.
|
||||
libtoolize: copying file `first/libtool.m4'
|
||||
libtoolize: copying file `first/ltoptions.m4'
|
||||
libtoolize: copying file `first/ltsugar.m4'
|
||||
libtoolize: copying file `first/ltversion.m4'
|
||||
libtoolize: copying file `first/lt~obsolete.m4'
|
||||
libtoolize: Consider adding `-I first' to ACLOCAL_AMFLAGS in Makefile.am.
|
||||
]])
|
||||
|
||||
LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
## ------------------------------------ ##
|
||||
## ACLOCAL_AMFLAGS macrodir extraction. ##
|
||||
## ------------------------------------ ##
|
||||
|
Loading…
Reference in New Issue
Block a user