+2024-03-07 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Fix errors when executing --create-megatestdir.
+ * pygnulib/GLTestDir.py (GLMegaTestDir.execute): Create a testdir for
+ each module in its own subdirectory. Create a testdir with all modules
+ in 'ALL'. Add missing join call on str object. Don't emit 'configure.ac'
+ into 'Makefile.am'. Make sure commands are executed in the proper
+ directory.
+
2024-03-07 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 46.
# First, all modules one by one.
for module in modules:
self.config.setModules([str(module)])
- #GLTestDir(self.config, self.megatestdir).execute()
+ GLTestDir(self.config, joinpath(self.megatestdir, str(module))).execute()
megasubdirs += [str(module)]
# Then, all modules all together.
if str(module) != 'config-h' ]
self.config.setModules([ str(module)
for module in modules ])
- #GLTestDir(self.config, self.megatestdir).execute()
+ GLTestDir(self.config, joinpath(self.megatestdir, 'ALL')).execute()
megasubdirs += ['ALL']
# Create autobuild.
emit += 'AC_CONFIG_AUX_DIR([%s])\n' % auxdir
emit += 'AM_INIT_AUTOMAKE\n\n'
emit += 'AC_PROG_MAKE_SET\n\n'
- emit += 'AC_CONFIG_SUBDIRS([%s])\n' % ' '.megasubdirs
+ emit += 'AC_CONFIG_SUBDIRS([%s])\n' % ' '.join(megasubdirs)
emit += 'AC_CONFIG_FILES([Makefile])\n'
emit += 'AC_OUTPUT\n'
emit = constants.nlconvert(emit)
- path = joinpath(self.megatestdir, 'Makefile.am')
+ path = joinpath(self.megatestdir, 'configure.ac')
with codecs.open(path, 'wb', 'UTF-8') as file:
file.write(emit)
# Create autogenerated files.
- os.chdir(DIRS['cwd'])
+ os.chdir(self.megatestdir)
args = [UTILS['aclocal']]
constants.execute(args, verbose)
try: # Try to make a directory
args = [UTILS['automake'], '--add-missing', '--copy']
constants.execute(args, verbose)
shutil.rmtree('autom4te.cache')
+ os.chdir(DIRS['cwd'])
sp.call(['rm', '-rf', self.config['tempdir']], shell=False)