+2020-12-28 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool: Fix logic whether to add a dummy.c.
+ * gnulib-tool (func_remove_if_blocks): New function.
+ (func_modules_add_dummy): Use it to eliminate all conditional statements
+ from the automake snippet.
+
2020-12-28 Paul Eggert <eggert@cs.ucla.edu>
faccessat: revert recent EOVERFLOW change
done
}
+# func_remove_if_blocks
+# removes if...endif blocks from an automake snippet.
+func_remove_if_blocks ()
+{
+ sed -n -e '/^if / {
+ :a
+ n
+ s/^endif//
+ tb
+ ba
+ :b
+ }
+ p'
+}
+
# func_modules_add_dummy
# Input:
# - local_gnulib_path from --local-dir
# contribute to lib_SOURCES.
:
else
- # Extract the value of "lib_SOURCES += ...".
+ # Extract the value of unconditional "lib_SOURCES += ..." augmentations.
for file in `func_get_automake_snippet "$module" | combine_lines |
+ func_remove_if_blocks |
sed -n -e 's,^lib_SOURCES[ ]*+=\([^#]*\).*$,\1,p'`; do
# Ignore .h files since they are not compiled.
case "$file" in