From: Gary V. Vaughan Date: Mon, 31 Oct 2011 11:29:35 +0000 (+0700) Subject: libtoolize: fix some long-standing sed substitution bugs X-Git-Tag: v2.4.2.418~309 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1fd9a12cb4475e81f4ee8310a0108d9fc92934d;p=thirdparty%2Flibtool.git libtoolize: fix some long-standing sed substitution bugs * libtoolize.m4sh (func_fixup_Makefile): `\\\\\$' in a " quoted script that is evaluated twice before execution becomes a `\$', which sed interprets as a literal $. The script will then delete any lines with a first non-whitespace character of `$'. Instead use `\\\\$' in single quotes, which sed eventually receives as `\\$' and correctly interprets as part of an instruction to delete otherwise empty lines ending with a `\'. Additionally the rest of the same sed script is no longer applied to comment lines to avoid munging the copyright header among others. * NEWS: Updated. --- diff --git a/NEWS b/NEWS index a960e4333..94de233f8 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,9 @@ NEWS - list of user-visible changes between releases of GNU Libtool - Fix a long-standing latent bug in autom4te include path for autotests with VPATH builds. + - Fix a long-standing latent bug in libtoolize which could delete lines + from libltdl/Makefile.am in recursive mode due to underquoting in a + sed script. New in 2.4.2 2011-10-17: git version 2.4.1a, Libtool team: diff --git a/libtoolize.m4sh b/libtoolize.m4sh index 1626c177e..4489b57dd 100644 --- a/libtoolize.m4sh +++ b/libtoolize.m4sh @@ -320,7 +320,7 @@ func_fixup_Makefile () my_filename="$1" my_srcdir="$2" my_destdir="$3" - my_fixup_non_subpackage_script="\ + my_fixup_non_subpackage_script='/^[^#]/{ s,(LIBOBJS),(ltdl_LIBOBJS),g s,(LTLIBOBJS),(ltdl_LTLIBOBJS),g s,libltdl/configure.ac,, @@ -329,7 +329,8 @@ func_fixup_Makefile () s,libltdl/config-h.in,, s,libltdl/Makefile.am,, s,libltdl/Makefile.in,, - /^[ ]*\\\\\$/d" + /^[ ]*\\\\$/d + }' case $my_filename in Makefile.am) my_fixup_non_subpackage_script=`echo "$my_fixup_non_subpackage_script" | \