From patchwork Wed Oct 12 03:03:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Hope X-Patchwork-Id: 4637 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8057C23F59 for ; Wed, 12 Oct 2011 03:04:33 +0000 (UTC) Received: from mail-bw0-f52.google.com (mail-bw0-f52.google.com [209.85.214.52]) by fiordland.canonical.com (Postfix) with ESMTP id 3C0C0A18416 for ; Wed, 12 Oct 2011 03:04:33 +0000 (UTC) Received: by bke5 with SMTP id 5so491196bke.11 for ; Tue, 11 Oct 2011 20:04:33 -0700 (PDT) Received: by 10.223.85.134 with SMTP id o6mr43616212fal.8.1318388646647; Tue, 11 Oct 2011 20:04:06 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.24.41 with SMTP id r9cs195873laf; Tue, 11 Oct 2011 20:04:05 -0700 (PDT) Received: by 10.216.160.75 with SMTP id t53mr1794677wek.29.1318388640625; Tue, 11 Oct 2011 20:04:00 -0700 (PDT) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id y3si464294wec.74.2011.10.11.20.04.00 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 11 Oct 2011 20:04:00 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of michael.hope@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of michael.hope@linaro.org) smtp.mail=michael.hope@linaro.org Received: by wwe3 with SMTP id 3so312036wwe.31 for ; Tue, 11 Oct 2011 20:04:00 -0700 (PDT) Received: by 10.216.192.35 with SMTP id h35mr2026599wen.9.1318388640119; Tue, 11 Oct 2011 20:04:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.180.7.170 with HTTP; Tue, 11 Oct 2011 20:03:40 -0700 (PDT) In-Reply-To: References: <8762jyvsta.fsf@linaro.org> From: Michael Hope Date: Wed, 12 Oct 2011 16:03:40 +1300 Message-ID: Subject: Re: [Patches] manual/Makefile: fix escaping of PKGVERSION and REPORT_BUGS_TO To: "Joseph S. Myers" Cc: patches@eglibc.org, patches@linaro.org On Wed, Oct 12, 2011 at 4:28 AM, Joseph S. Myers wrote: > 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. The attached version defines PKGVERSION_TEXI and uses the *_TEXI versions in the manual. -- Michael Index: libc/config.make.in =================================================================== --- libc/config.make.in (revision 15508) +++ libc/config.make.in (working copy) @@ -140,6 +140,8 @@ # Package versions and bug reporting configuration. PKGVERSION = @PKGVERSION@ +PKGVERSION_TEXI = @PKGVERSION_TEXI@ REPORT_BUGS_TO = @REPORT_BUGS_TO@ +REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@ # More variables may be inserted below by configure. Index: libc/aclocal.m4 =================================================================== --- libc/aclocal.m4 (revision 15508) +++ libc/aclocal.m4 (working copy) @@ -131,7 +131,9 @@ esac], PKGVERSION="($1) " ) + PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'` AC_SUBST(PKGVERSION) + AC_SUBST(PKGVERSION_TEXI) ]) dnl Support the --with-bugurl configure option. Index: libc/manual/Makefile =================================================================== --- libc/manual/Makefile (revision 15508) +++ libc/manual/Makefile (working copy) @@ -116,9 +116,8 @@ # Package version and bug reporting URL. pkgvers.texi: stamp-pkgvers stamp-pkgvers: - echo "@set PKGVERSION $(subst @,@@,$(PKGVERSION))" > pkgvers-tmp - echo "@set REPORT_BUGS_TO $(subst @,@@,$(REPORT_BUGS_TO))" \ - >> pkgvers-tmp + echo "@set PKGVERSION $(PKGVERSION_TEXI)" > pkgvers-tmp + echo "@set REPORT_BUGS_TO $(REPORT_BUGS_TEXI)" >> pkgvers-tmp $(move-if-change) pkgvers-tmp pkgvers.texi touch $@ Index: libc/configure =================================================================== --- libc/configure (revision 15508) +++ libc/configure (working copy) @@ -733,6 +733,7 @@ libc_cv_nss_crypt REPORT_BUGS_TEXI REPORT_BUGS_TO +PKGVERSION_TEXI PKGVERSION all_warnings force_install @@ -3831,10 +3832,12 @@ fi + PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'` + # Check whether --with-bugurl was given. if test "${with_bugurl+set}" = set; then withval=$with_bugurl; case "$withval" in Index: libc/ChangeLog.eglibc =================================================================== --- libc/ChangeLog.eglibc (revision 15508) +++ libc/ChangeLog.eglibc (working copy) @@ -1,3 +1,11 @@ +2011-10-12 Michael Hope + + * aclocal.m4 (PKGVERSION_TEXI): Define. + * config.make.in (PKGVERSION_TEXI, REPORT_BUGS_TEXI): Define. + * manual/Makefile (stamp-pkgvers): Use PKGVERSION_TEXI and + REPORT_BUGS_TEXI. + * configure: Regenerate. + 2011-10-07 Michael Hope * manual/Makefile (stamp-pkgvers): Escape PKGVERSION. Fix the