diff options
author | Bruno Haible <bruno@clisp.org> | 2022-08-09 16:11:09 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-08-09 23:19:56 +0200 |
commit | 98e7ca354a1108b0b99236e29bedbc6bfbd8593e (patch) | |
tree | 7cddc27a5aca8e58d38ff3a22eebb7b3f3d8e10e /pygnulib/GLImport.py | |
parent | 501feeb5d595d8b4cea9a1a8e404277c27d2f5bf (diff) | |
download | gnulib-98e7ca354a1108b0b99236e29bedbc6bfbd8593e.tar.gz |
gnulib-tool.py: Fix some code generation details.
* pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am): When removing a
lib_LDFLAGS line, remove also the newline. Fix regex that matches
lib_SOMETHING. Add a newline after each '## begin gnulib module' line.
Don't emit 'endif' lines without corresponding 'if'. When emitting a
'+=' augmentation, make sure it does not get emitted a second time.
Don't emit a blank line when there is no AM_CPPFLAGS augmentation.
Update after getLink() changed. In the value of DEFAULT_TEXT_DOMAIN,
backslash-escape the double-quotes. Don't produce Windows CR-LFs on
Windows. Simplify.
(GLEmiter.tests_Makefile_am): When removing a lib_LDFLAGS line, remove
also the newline. Fix regex that matches lib_SOMETHING. Don't remove a
blank line before EXTRA_DIST. Add a newline after each
'## begin gnulib module' line. Set uses_subdirs also when there is a .c
file in a subdir of tests/. When emitting a '+=' augmentation, make sure
it does not get emitted a second time. Don't produce Windows CR-LFs on
Windows. Simplify.
* pygnulib/GLImport.py (GLImport.execute): Update after getLink()
changed.
Diffstat (limited to 'pygnulib/GLImport.py')
-rw-r--r-- | pygnulib/GLImport.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py index 87d85c5181..0197e0671d 100644 --- a/pygnulib/GLImport.py +++ b/pygnulib/GLImport.py @@ -1398,18 +1398,18 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix # Get link directives. links = [ module.getLink() for module in self.moduletable['main'] ] - ulinks = list() - for link in links: - for lib in link: - ulinks += [lib] - ulinks = sorted(set(ulinks)) - if ulinks: + lines = [ line + for link in links + for line in link.split('\n') + if line != '' ] + lines = sorted(set(lines)) + if lines: print(''' You may need to use the following Makefile variables when linking. Use them in <program>_LDADD when linking a program, or in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library.''') - for link in ulinks: - print(' %s' % link) + for line in lines: + print(' %s' % line) # Print reminders. print('') |