From: Jim Meyering Date: Thu, 8 Nov 2012 06:37:39 +0000 (-0800) Subject: prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition X-Git-Tag: v0.1~375 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;ds=sidebyside;h=7f526ae61f715cf5d30bccc7fb7c0f091b95b0d5;p=gnulib.git prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition * build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require white space before each of the special-cased file names, to avoid adding "lib/" after $(libdir)/. Reported by Matias A. fonzo in http://bugs.gnu.org/12830. --- diff --git a/ChangeLog b/ChangeLog index 9817769fc..a742d0a93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-11-08 Jim Meyering + + prefix-gnulib-mk: avoid overzealous "lib/"-prefix addition + * build-aux/prefix-gnulib-mk (prefix): Tighten a regexp to require + white space before each of the special-cased file names, to avoid + adding "lib/" after $(libdir)/. Reported by Matias A. fonzo + in http://bugs.gnu.org/12830. + 2012-11-08 Paul Eggert fcntl-h: default O_SEARCH, O_EXEC back to O_RDONLY diff --git a/build-aux/prefix-gnulib-mk b/build-aux/prefix-gnulib-mk index 9b23245b9..7553f6542 100755 --- a/build-aux/prefix-gnulib-mk +++ b/build-aux/prefix-gnulib-mk @@ -147,7 +147,11 @@ sub prefix ($) {prefix_assignment($1, $2)}gem; # These three guys escape all the other regular rules. - s{(charset\.alias|ref-add\.sed|ref-del\.sed)}{$prefix$1}g; + # Require the leading white space to avoid inserting the prefix + # on a line like this: + # charset_alias = $(DESTDIR)$(libdir)/charset.alias + # With $(libdir), it would be erroneous. + s{(\s)(charset\.alias|ref-add\.sed|ref-del\.sed)}{$1$prefix$2}g; # Unfortunately, as a result we sometimes have lib/lib. s{($prefix){2}}{$1}g;