Hi Branden,
Werner LEMBERG wrote on Thu, Nov 02, 2017 at 08:09:48AM +0100:
> Branden Robinson wrote:
>> Does anyone know the reason for the following convention?
>>
>> $ find -name "*.tmac-*"
>> ./contrib/hdtbl/hdmisc.tmac-u
>> ./contrib/hdtbl/hdtbl.tmac-u
>> ./contrib/mom/om.tmac-u
>> ./tmac/e.tmac-u
>> ./tmac/doc.tmac-u
>> ./tmac/doc-old.tmac-u
> If my memory serves me well, the `u' stands for `uncompressed', i.e.,
> without comments and indentation removed.
Exactly the other way round: uncompressed = *with* comments and
with blank lines and with indentation.
> Bertrand removed the functionality to install stripped tmac files,
> IIRC -
I don't see any evidence for that, i think he did not.
For example, the file tmac/doc.tmac-u in git contains:
..
.
.
.\" NS doc-print-and-reset macro
.\" NS finish input line and clean up argument vectors
.
.de doc-print-and-reset
. if \n[doc-space-mode] \
. nop \)
. doc-reset-args
..
.
.
By contrast, the installed file /usr/local/share/groff/1.22.3/tmac/doc.tmac
contains:
..
.de print-and-reset
.if \n[space-mode] \
.nop \)
.reset-args
..
> computers are much faster today, so this is (probably?) no longer
> needed.
While that may be true (i never measured performance), be careful
if you want to clean it up. The script tmac/strip.sed also manipulates
mdoc(7) internal macro names:
s/\([^/]\)doc-/\1/g
The file tmac.am says:
$(TMACMDOCFILES) $(TMACSTRIPFILES):
$(MKDIR_P) $(top_builddir)/tmac
for f in $(TMACMDOCFILES) $(TMACSTRIPFILES); do \
sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$$f-u > \
$(top_builddir)/$$f; \
done
All that said, i do consider such munging quite ugly. It harms
maintainability, reduces readability of installed macros, hinders
debugging, and provokes mistakes of various kinds.
Yours,
Ingo