[Top][All Lists]

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

[bug #55004] Makefile variables expanded in man page text are not proper

From: G. Branden Robinson
Subject: [bug #55004] Makefile variables expanded in man page text are not properly escaped
Date: Wed, 15 Jun 2022 13:29:28 -0400 (EDT)

Update of bug #55004 (project groff):

                Category:                    None => General                


Follow-up Comment #3:

commit f61089db04816e30cc9045988a4c80f84d0350d7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Nov 10 10:00:01 2018 -0500

    man pages: Escape interpolated Make variables.
            * makevarescape.sed: Transform - to \-, ~ to \(ti, and so forth,
            (with an extra layer of backslashes--see below) so that Makefile
            variables containing ASCII characters that do not represent
            themselves literally in *roff (see groff_char(7)) are correctly
            interpolated into man page text.
            * Makefile.am (.man): Transform Makefile variables with the
            above script when interpolating them into man page text.
            Note that while the script, combined with this target, will
            transform ` to \(ga, including grave accents in Makefile
            variables is likely to fail when the shell lexes the argument to
            echo within the old-style command substitution ``.  Testing
            shows that grave accents should work[1] if POSIX-style command
            substitution $() is done instead.  However, $() is less
            portable.  (Triple-escaping grave accents \\\` inside the
            interpolated Makefile variable will work, but is not attempted
            at present.)
            Note also that the amount of backslash-escaping in the sed
            script is excessive (and incorrect) for normal purposes, but
            required here because a command substitution is being nested
            inside yet another invocation of sed.
            [1] For this target; no assurances about the good behavior of
            unusual characters in Makefile variables in other aspects of the
            groff build are offered.
            Fixes <https://savannah.gnu.org/bugs/index.php?55004>.


Reply to this item at:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]