]> The Tcpdump Group git mirrors - tcpslice/commitdiff
autogen.sh: Delete all trailing blank lines at end of configure.
authorDenis Ovsienko <[email protected]>
Sun, 1 Sep 2024 20:09:06 +0000 (21:09 +0100)
committerDenis Ovsienko <[email protected]>
Thu, 5 Sep 2024 12:23:16 +0000 (13:23 +0100)
CHANGES
autogen.sh

diff --git a/CHANGES b/CHANGES
index 8a8dc3c133a4d56a4b3c26a21361004208be0d42..7588fa3226f6c972965e75afec410c3fc822582f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,7 @@ v1.8 ...
 - Makefile.in: Fix the depend target.
 - mkdep: Exit with a non-zero status if a command fails.
 - autogen.sh: Allow to configure Autoconf warnings.
+- autogen.sh: Delete all trailing blank lines at end of configure.
 
 v1.7 Tue 23 Jan 12:31:18 GMT 2024
 
index 78b749a476da9a42dc06c50556e84cd350125d0e..e0f53398bb378dd74244be14885016d56e8037da 100755 (executable)
@@ -29,3 +29,13 @@ echo "$AUTORECONF identification: $AUTORECONFVERSION"
 # the branch) amount of noise to the build matrix output, so provide a means
 # to silence that.
 env ${AUTOCONF_WARNINGS:+WARNINGS="$AUTOCONF_WARNINGS"} "$AUTORECONF" -f
+
+# Autoconf 2.71 adds a blank line after the final "exit 0" on Linux, but not
+# on OpenBSD.  Remove this difference to make it easier to compare the result
+# of "make releasetar" across different platforms.  From sed one-liners:
+# "delete all trailing blank lines at end of file (works on all seds)".  Don't
+# use mktemp(1) because AIX does not have it.
+CONFIGURE_NEW="configure.new$$"
+sed -e :a -e '/^\n*$/{$d;N;ba' -e '}' <configure >"$CONFIGURE_NEW"
+cmp -s configure "$CONFIGURE_NEW" || cat "$CONFIGURE_NEW" >configure
+rm -f "$CONFIGURE_NEW"