From: Josh Stone Date: Mon, 25 Aug 2014 21:40:35 +0000 (-0700) Subject: Prevent premature @AR@ replacement in a sed expression. X-Git-Tag: elfutils-0.160^0 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1ec744b5747a3bd66297c9f965be6ea10cb7f86;p=thirdparty%2Felfutils.git Prevent premature @AR@ replacement in a sed expression. The Makefile rule for make-debug-archive has a sed expression to replace @AR@ will the installed name, but this was itself getting replaced when the Makefile was configured, for a pattern like "s,ar,/path/prefix-,g". Havoc ensued in the resulting make-debug-archive. The fix matches it using a regex bracket expression, "[@]AR[@]", so sed will still match it, but it's immune to configure's replacement. Signed-off-by: Josh Stone --- diff --git a/src/ChangeLog b/src/ChangeLog index 2d6965bff..986b34177 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-08-25 Josh Stone + + * Makefile.am: Prevent premature @AR@ replacement in a sed expression. + 2014-07-04 Menanteau Guy Mark Wielaard diff --git a/src/Makefile.am b/src/Makefile.am index 9829f15b9..28dad8581 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -160,7 +160,7 @@ MAINTAINERCLEANFILES = ldlex.c ldscript.c ldscript.h make-debug-archive: $(srcdir)/make-debug-archive.in UNSTRIP=$(bindir)/`echo unstrip | sed '$(transform)'`; \ AR=$(bindir)/`echo ar | sed '$(transform)'`; \ - sed -e "s,@UNSTRIP@,$$UNSTRIP,g" -e "s,@AR@,$$AR,g" \ + sed -e "s,[@]UNSTRIP[@],$$UNSTRIP,g" -e "s,[@]AR[@],$$AR,g" \ -e "s%[@]PACKAGE_NAME[@]%$(PACKAGE_NAME)%g" \ -e "s%[@]PACKAGE_VERSION[@]%$(PACKAGE_VERSION)%g" \ $(srcdir)/make-debug-archive.in > $@.new