From: Denis Ovsienko Date: Tue, 24 Sep 2024 09:09:42 +0000 (+0100) Subject: autogen.sh: Delete all trailing blank lines at end of configure. X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/40e32903fbb78b4d1c96d8c42ae0a24017485316 autogen.sh: Delete all trailing blank lines at end of configure. Same as in tcpslice and libpcap. --- diff --git a/CHANGES b/CHANGES index c2ee030c..87318cc2 100644 --- a/CHANGES +++ b/CHANGES @@ -66,6 +66,7 @@ DayOfTheWeek, Month DD, YYYY / The Tcpdump Group .devel file does not exists. tests: On HP-UX use "diff -c" by default. autogen.sh: Allow to configure Autoconf warnings. + autogen.sh: Delete all trailing blank lines at end of configure. Documentation: man: Clarify the "any" pseudo-interface further. diff --git a/autogen.sh b/autogen.sh index 78b749a4..e0f53398 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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_NEW" +cmp -s configure "$CONFIGURE_NEW" || cat "$CONFIGURE_NEW" >configure +rm -f "$CONFIGURE_NEW"