groff
[Top][All Lists]
Advanced

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

Re: [Groff] new groff directory structure


From: Andy Dougherty
Subject: Re: [Groff] new groff directory structure
Date: Thu, 26 Oct 2000 10:36:55 -0400 (EDT)

> to follow the GNU standards, groff will now by default install its
> data files into

>    /usr/local/share/groff/<version>

>  e.g. /usr/local/share/groff/1.16.1).

This would break nearly every document I have written on my system. I use
the -mm macros extensively.  These macros can be controlled by a number of
parameters that must be set *before* the -mm macros are loaded.  Hence, my
typical prologue is something like:

    .nr N 2                 .\" Page header replaces footer on Page 1.
    .ie \n(.g .so /usr/local/share/groff/tmac/tmac.m
    .el .so /usr/lib/tmac/tmac.m

This style is recommended in section 2.5 of the AT&T -mm documentation
(without the groff reference, of course!).

If a version number gets added, all my old documents won't print without
hand-editing. Worse, the hand-editing will have to be changed every time
the version number gets changed.

I'm curious why this might be considered useful.  It's not at all clear to
me what is being accomplished.  (I helped design and implement perl's
versioned library structure, so I do have considerable experience with the
sorts of issues involved.)

I just checked on http://www.gnu.org/prep/standards.html and didn't see
any specific reference to the issue of libraries and version numbers.
Perhaps there is some other "standard" I should consult for the rationale?

As I see it at first glance, the difference between groff and other
packages that use versioned libraries (such as perl and emacs) is that the
package automatically handles the version numbers; users aren't expected
to load in the files directly.  At least for the -mm macros, directly
importing them is a useful documented idiom.

I see a few possible solutions.  Doubtless there are other better ones
too:

1.  Don't use version-specific directories.  (Current behavior).
    Unless you are really trying to support multiple simultaneous 
    installations of different versions of groff, the current behavior
    seems fine.
2.  Add in a "smarter" .so command that "knows" about the versioned
    directory structure (and probably about the site directories too).
3.  For each of the standard tmac.* files, add in a stub 
    tmac.* file in /usr/local/src/groff/ that sources the one from the
    versioned directory.
4.  Define a string register of some sort to hold the current version
    so a .so command can be written that is robust across version
    changes.

These are just a few suggestions.  Doubtless others may have better ones.

-- 
    Andy Dougherty              address@hidden
    Dept. of Physics
    Lafayette College, Easton PA 18042


reply via email to

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