From 55262b6fe432ee00ef2acf8b76d37b9ed459cf46 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Fri, 19 Oct 2012 12:23:39 +0700 Subject: 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 --- tests/libtoolize.at | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'tests') diff --git a/tests/libtoolize.at b/tests/libtoolize.at index 332b7e9d..cd0fa34a 100644 --- a/tests/libtoolize.at +++ b/tests/libtoolize.at @@ -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. ## ## ------------------------------------ ## -- cgit v1.2.1