From ae418b7028dd7d85a634a59543506ff1ccd0dd22 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 4 Aug 2025 16:28:34 +0200 Subject: [PATCH] Update after gnulib changed. * gettext-tools/tests/Makefile.am (TESTS_ENVIRONMENT): Define top_builddir, consistently with Gnulib. * gettext-tools/tests/init-env.in (top_builddir): Remove definition here. --- gettext-tools/tests/Makefile.am | 7 +++++++ gettext-tools/tests/init-env.in | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index 9f54c706a..77034ae8d 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -334,6 +334,13 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \ RECODE="$(CHECKER) recode" \ CONFIG_SHELL='$(SHELL)' +# The value of top_builddir, determined by Autoconf and stored in the Makefile, +# consists of n times '..', where n is the depth of the $(srcdir) under +# $(top_srcdir). Here we need one more '..', because the test framework +# (init.sh) arranges to run the tests in a subdirectory of depth 1 under the +# directory where the Makefile sits. +TESTS_ENVIRONMENT += top_builddir='../@top_builddir@' + # Invoke the shell explicitly, because the execute-permission bit on the scripts # may get lost in particular circumstances (e.g. when unpacking a tarball, or # under Cygwin). diff --git a/gettext-tools/tests/init-env.in b/gettext-tools/tests/init-env.in index 63af19724..d3b60de2b 100644 --- a/gettext-tools/tests/init-env.in +++ b/gettext-tools/tests/init-env.in @@ -1,5 +1,5 @@ -# Variable needed by LTLIBINTL. -top_builddir=../.. +# Note: LTLIBINTL uses the variable ${top_builddir}, whose value is set +# as an environment variable by the 'test-framework-sh' module. OBJEXT="@OBJEXT@" EXEEXT="@EXEEXT@" -- 2.47.3