[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Patches] manual/Makefile: fix escaping of PKGVERSION and REPORT_BUGS_TO



crosstool-NG uses 'crosstool-NG @ mercurial-revno' as the default
package version.  This breaks the EGLIBC manuals as '@' starts a
Texinfo command.  Fix by escaping.

I noticed that REPORT_BUGS_TO is broken as well, but in a different
way.  There's a sed that converts @ into the escaped @@ to allow email
style bug URLs, but it applies it to the command as well as the value.

I've converted these to GNU make substitutions instead.  The change is EGLIBC
specific as GLIBC doesn't put the pkgversion in the manual.

-- Michael

Index: libc/ChangeLog.eglibc
===================================================================
--- libc/ChangeLog.eglibc	(revision 15493)
+++ libc/ChangeLog.eglibc	(working copy)
@@ -1,3 +1,8 @@
+2011-10-07  Michael Hope  <michael.hope@xxxxxxxxxx>
+
+	* manual/Makefile (stamp-pkgvers): Escape PKGVERSION.  Fix the
+	escaping of REPORT_BUGS_TO.
+
 2011-09-06  Dr. David Alan Gilbert  <david.gilbert@xxxxxxxxxx>
 
 	* elf/Makefile: Push tst-initorder through cross-test-wrapper.
Index: libc/manual/Makefile
===================================================================
--- libc/manual/Makefile	(revision 15493)
+++ libc/manual/Makefile	(working copy)
@@ -116,9 +116,8 @@
 # Package version and bug reporting URL.
 pkgvers.texi: stamp-pkgvers
 stamp-pkgvers:
-	echo "@set PKGVERSION $(PKGVERSION)" > pkgvers-tmp
-	echo "@set REPORT_BUGS_TO $(REPORT_BUGS_TO)" \
-	  | sed -e 's/@/@@/g' >> pkgvers-tmp
+	echo "@set PKGVERSION $(subst @,@@,$(PKGVERSION))" > pkgvers-tmp
+	echo "@set REPORT_BUGS_TO $(subst @,@@,$(REPORT_BUGS_TO))" >> pkgvers-tmp
 	$(move-if-change) pkgvers-tmp pkgvers.texi
 	touch $@