changeset 36845:6df2a3fedfc4

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.
author Jim Meyering <jim@meyering.net>
date Wed, 07 Nov 2012 22:37:39 -0800
parents 665b33213bc8
children 6c299522fa54
files ChangeLog build-aux/prefix-gnulib-mk
diffstat 2 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Nov 08 15:14:54 2012 -0800
+++ b/ChangeLog	Wed Nov 07 22:37:39 2012 -0800
@@ -1,3 +1,11 @@
+2012-11-08  Jim Meyering  <jim@meyering.net>
+
+	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  <eggert@cs.ucla.edu>
 
 	fcntl-h: default O_SEARCH, O_EXEC back to O_RDONLY
--- a/build-aux/prefix-gnulib-mk	Thu Nov 08 15:14:54 2012 -0800
+++ b/build-aux/prefix-gnulib-mk	Wed Nov 07 22:37:39 2012 -0800
@@ -147,7 +147,11 @@
    {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;