[Top][All Lists]

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

Re: [groff] More on stripping

From: Peter Schaffter
Subject: Re: [groff] More on stripping
Date: Wed, 14 Mar 2018 19:36:36 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Mar 13, 2018, Bjarni Ingi Gislason wrote:
> On Tue, Mar 13, 2018 at 01:27:28AM +0000, Bjarni Ingi Gislason wrote:
> >[...] 
> >   Define a variable, for example ""
> > (in the file (?))
> > 
> >   Add that to the target "install:" in the Makefile... .
> > 
> >   Other additions are appropriate, for example for uninstalling.
>   This is wrong.
>   It seems to be enough to add "" to the variable
> "MOMNORMALFILES" in "" to get it installed.

This results in om.tmac and om.tmac-u being installed.  We want only
om.tmac (not stripped) installed.  If om.tmac-u is removed from the
sources and replaced with om.tmac (unstripped), the attached patch
should give us what we want.

On the subject of strip.sed (which we don't want used on om.tmac),
even with Bjarni's suggested patches, it still removes the \" that
protects trailing spaces from constructions like

  .ds foo \
  bar \"

>From my tests, the modified version, below, results in fully
stripped files that keep the protecting \"

---modified strip.sed---
2 i\
.\\" This is a generated file, created by 'tmac/strip.sed' in groff's\
.\\" source code bundle from a file having '-u' appended to its name.
# strip comments, spaces, etc., after a line containing '%beginstrip%'
/%beginstrip%/,$ {
  s/^\.[         ]*/./
  s/\([  ]*\)\\"[        ]*.\+/\1\\"/
  s/\\"[         ]*.\+//
---modified strip.sed---

Peter Schaffter

Description: Text Data

reply via email to

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