From ae88824aa879b9a8b97f05bd1623fea56880c7b1 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 10 Mar 2024 00:55:56 -0800 Subject: [PATCH 4/5] gnulib-tool.py: Follow gnulib-tool changes, part 54. Follow gnulib-tool change 2021-12-24 Paul Eggert maint: avoid empty lines in recipes * pygnulib/GLEmiter.py (_eliminate_NMD): Eliminate occurrences of @!NMD@ too. --- ChangeLog | 9 +++++++++ gnulib-tool.py.TODO | 38 -------------------------------------- pygnulib/GLEmiter.py | 6 ++++-- 3 files changed, 13 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27a9b2ea2c..f565d0d657 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-03-10 Collin Funk + + gnulib-tool.py: Follow gnulib-tool changes, part 54. + Follow gnulib-tool change + 2021-12-24 Paul Eggert + maint: avoid empty lines in recipes + * pygnulib/GLEmiter.py (_eliminate_NMD): Eliminate occurrences of @!NMD@ + too. + 2024-03-10 Collin Funk gnulib-tool.py: Follow gnulib-tool changes, part 53. diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO index c3d5d65f5c..69d3cf7d72 100644 --- a/gnulib-tool.py.TODO +++ b/gnulib-tool.py.TODO @@ -169,44 +169,6 @@ Date: Sat Dec 25 12:19:13 2021 +0100 -------------------------------------------------------------------------------- -commit b4c57b4240992832fa89a02dc620c4fa5ac36973 -Author: Paul Eggert -Date: Fri Dec 24 17:22:00 2021 -0800 - - maint: avoid empty lines in recipes - - AIX 7.2 ‘make’ complains about recipe lines that are empty after - macro expansion, and I suppose there’s a good chance some - non-POSIX ‘make’ would prohibit them. Rework macros so - that we can avoid them. - * gnulib-tool (func_emit_lib_Makefile_am) - (func_emit_lib_Makefile_am): Support @!NMD@ too. - * modules/gen-header (@gl_V_at): New macro. - * modules/alloca-opt, modules/argz, modules/assert-h: - * modules/byteswap, modules/configmake, modules/ctype: - * modules/dirent, modules/errno, modules/execinfo, modules/fcntl-h: - * modules/float, modules/fnmatch-h, modules/getopt-posix: - * modules/glob-h, modules/iconv-h, modules/ieee754-h: - * modules/inttypes-incomplete, modules/langinfo: - * modules/libtextstyle-optional, modules/limits-h, modules/locale: - * modules/malloc-h, modules/math, modules/monetary, modules/netdb: - * modules/openmp-init, modules/poll-h, modules/posix-shell: - * modules/pthread-h, modules/pty, modules/sched, modules/search: - * modules/signal-h, modules/sigsegv, modules/snippet/link-warning: - * modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool: - * modules/stddef, modules/stdint, modules/stdio, modules/stdlib: - * modules/stdnoreturn, modules/string, modules/strings: - * modules/sysexits, modules/termios, modules/threads-h: - * modules/time, modules/uchar, modules/unicase/base: - * modules/uniconv/base, modules/unictype/base, modules/unigbrk/base: - * modules/unilbrk/base, modules/uniname/base, modules/uninorm/base: - * modules/unistd, modules/unistdio/base, modules/unistr/base: - * modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base: - * modules/utime-h, modules/wchar, modules/wctype-h: - Use it. - --------------------------------------------------------------------------------- - commit 4bdc327dbda59dcdbfa0f983a4f35c4a4ec3578c Author: Bruno Haible Date: Sun Dec 19 12:49:16 2021 +0100 diff --git a/pygnulib/GLEmiter.py b/pygnulib/GLEmiter.py index 0845bce5f1..d907adeaef 100644 --- a/pygnulib/GLEmiter.py +++ b/pygnulib/GLEmiter.py @@ -67,9 +67,11 @@ def _convert_to_gnu_make(snippet: str) -> str: def _eliminate_NMD(snippet: str, automake_subdir: bool) -> str: if automake_subdir: - lines = [line if not line.startswith('@NMD@') else line.replace('@NMD@', '') for line in snippet.splitlines()] + lines = [line if not line.startswith('@NMD@') else line.replace('@NMD@', '') + for line in snippet.splitlines() if not line.startswith('@!NMD@')] else: - lines = [line for line in snippet.splitlines() if not line.startswith('@NMD@')] + lines = [line if not line.startswith('@!NMD@') else line.replace('@!NMD@', '') + for line in snippet.splitlines() if not line.startswith('@NMD@')] return '\n'.join(lines) + '\n' -- 2.44.0