diff mbox

manual/Makefile: fix escaping of PKGVERSION and REPORT_BUGS_TO

Message ID 8762jyvsta.fsf@linaro.org
State New
Headers show

Commit Message

Michael Hope Oct. 9, 2011, 8 p.m. UTC
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

Comments

Maxim Kuvyrkov Oct. 11, 2011, 4:24 a.m. UTC | #1
On 10/10/2011, at 9:00 AM, Michael Hope wrote:

> 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,

Yeap, you are right, I will check in your patch shortly.

It should fix the overly pessimistic beginning of EGLIBC docs [*] :-).

[*] https://sourcery.mentor.com/GNUToolchain/doc12125/libc.pdf

Thanks for fixing this,

--
Maxim Kuvyrkov
CodeSourcery / Mentor Graphics
Joseph Myers Oct. 11, 2011, 3:28 p.m. UTC | #2
On Mon, 10 Oct 2011, Michael Hope wrote:

> 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.

I see Maxim committed this, but I don't think it's the right approach.  
The autoconf macros used (shared with GCC, binutils etc.) define 
REPORT_BUGS_TEXI, and that's what should be used for the manual.
diff mbox

Patch

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@linaro.org>
+
+	* manual/Makefile (stamp-pkgvers): Escape PKGVERSION.  Fix the
+	escaping of REPORT_BUGS_TO.
+
 2011-09-06  Dr. David Alan Gilbert  <david.gilbert@linaro.org>
 
 	* 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 $@