[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #55004] Makefile variables expanded in man page text are not proper
G. Branden Robinson
[bug #55004] Makefile variables expanded in man page text are not properly escaped
Wed, 15 Jun 2022 13:29:28 -0400 (EDT)
Update of bug #55004 (project groff):
Category: None => General
Follow-up Comment #3:
Author: G. Branden Robinson <firstname.lastname@example.org>
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 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
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.
 For this target; no assurances about the good behavior of
unusual characters in Makefile variables in other aspects of the
groff build are offered.
Reply to this item at:
Message sent via Savannah
|[Prev in Thread]
||[Next in Thread]|
- [bug #55004] Makefile variables expanded in man page text are not properly escaped,
G. Branden Robinson <=