Skip to content

Commit

Permalink
gnulib-tool.py: Fix testdirs created with --without-tests.
Browse files Browse the repository at this point in the history
* pygnulib/GLTestDir.py (GLTestDir.execute): Don't assume that 'gltests'
is the last subdirectory with a configure.ac.
  • Loading branch information
bhaible committed Aug 5, 2024
1 parent 14b5283 commit 26aab01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2024-08-05 Bruno Haible <[email protected]>

gnulib-tool.py: Fix testdirs created with --without-tests.
* pygnulib/GLTestDir.py (GLTestDir.execute): Don't assume that 'gltests'
is the last subdirectory with a configure.ac.

2024-08-05 Bruno Haible <[email protected]>

Fix compilation error in C++ mode with clang >= 16 (regr. 2024-07-29).
Expand Down
10 changes: 3 additions & 7 deletions pygnulib/GLTestDir.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,17 +619,13 @@ def execute(self) -> None:
emit += self.emitter.initmacro_done('%stests' % macro_prefix, testsbase)
emit += '\ngl_INIT\n\n'
if subdirs_with_configure_ac:
if single_configure:
emit += 'AC_CONFIG_SUBDIRS([%s])\n' % ' '.join(subdirs_with_configure_ac[:-1])
else: # if not single_configure
emit += 'AC_CONFIG_SUBDIRS([%s])\n' % ' '.join(subdirs_with_configure_ac)
emit += 'AC_CONFIG_SUBDIRS([%s])\n' % ' '.join(subdirs_with_configure_ac)
makefiles = ['Makefile']
for directory in subdirs:
# For subdirs that have a configure.ac by their own, it's the subdir's
# configure.ac which creates the subdir's Makefile.am, not this one.
makefiles.append(joinpath(directory, 'Makefile'))
if not single_configure:
makefiles = makefiles[:-1]
if not directory in subdirs_with_configure_ac:
makefiles.append(joinpath(directory, 'Makefile'))
emit += 'AC_CONFIG_FILES([%s])\n' % ' '.join(makefiles)
emit += 'AC_OUTPUT\n'
path = joinpath(self.testdir, 'configure.ac')
Expand Down

0 comments on commit 26aab01

Please sign in to comment.