summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2012-10-19 12:23:39 +0700
committerGary V. Vaughan <gary@gnu.org>2012-10-19 14:24:21 +0700
commit55262b6fe432ee00ef2acf8b76d37b9ed459cf46 (patch)
tree14fe9a5d8d1d1eb589222a8f364ed22a912f56b9 /tests
parentf8061eabaf08f75f5f0430a59bb20f4344838b0e (diff)
downloadlibtool-55262b6fe432ee00ef2acf8b76d37b9ed459cf46.tar.gz
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/libtoolize.at32
1 files changed, 32 insertions, 0 deletions
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. ##
## ------------------------------------ ##