From 0fdc8e921622d3614c22082a6934548e4a161bbc Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 7 Sep 2019 12:14:29 +0100 Subject: Escape %troff% expansion correctly in manual pages Fixes part of Debian bug #892230. * configure.ac: Substitute troff_as_troff_input, which is the same as troff but with suitable escaping so that "groff -mandoc" turns into "groff \-mandoc". * man/replace.sin.in (%troff%): Substitute @troff_as_troff_input@ rather than @troff@. --- configure.ac | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0cbd9c28..09d9d2b4 100644 --- a/configure.ac +++ b/configure.ac @@ -197,6 +197,14 @@ then else troff="(troff not installed)" fi +dnl We want to end up with "-" written as "\-" in manual pages. This +dnl requires additional \-escaping corresponding to the following quote +dnl removal steps: +dnl 1) the following sed command +dnl 2) the following assignment +dnl 2) sed running on the substituted version of man/replace.sin.in +troff_as_troff_input=`echo "$troff" | sed 's/-/\\\\\\\\-/g'` +AC_SUBST([troff_as_troff_input]) if test -n "$nroff" then -- cgit v1.2.3