+2024-03-20 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Don't print empty Automake snippets.
+ * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am)
+ (GLEmiter.tests_Makefile_am): Handle empty strings when checking if the
+ snippet should be printed.
+
2024-03-19 Collin Funk <collin.funk1@gmail.com>
gnulib-tool.py: Follow gnulib-tool changes, part 68.
amsnippet2 = amsnippet2.replace('$(GNULIB_',
'$(' + module_indicator_prefix + '_GNULIB_')
# Skip the contents if it's entirely empty.
- if not (amsnippet1 + amsnippet2).isspace():
+ if (amsnippet1 + amsnippet2).strip() != '':
allsnippets += '## begin gnulib module %s\n' % str(module)
if gnu_make:
allsnippets += 'ifeq (,$(OMIT_GNULIB_MODULE_%s))\n' % str(module)
amsnippet2 = amsnippet2.replace('$(GNULIB_',
'$(' + module_indicator_prefix + '_GNULIB_')
# Skip the contents if it's entirely empty.
- if not (amsnippet1 + amsnippet2).isspace():
+ if (amsnippet1 + amsnippet2).strip() != '':
snippet = '## begin gnulib module %s\n' % str(module)
if gnu_make:
snippet += 'ifeq (,$(OMIT_GNULIB_MODULE_%s))\n' % str(module)