summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog23
-rw-r--r--Makefile.comm3
-rw-r--r--Makefile.in30
-rw-r--r--NEWS6
-rw-r--r--doc/groff.texinfo8
-rw-r--r--man/roff.man8
-rw-r--r--src/roff/groff/groff.man4
-rw-r--r--src/roff/troff/troff.man12
-rw-r--r--tmac/Makefile.sub59
9 files changed, 132 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 717764df..bc0fe275 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2000-11-08 Werner LEMBERG <wl@gnu.org>
+
+ Add system tmac directory (/usr/local/lib/groff/site-tmac).
+
+ * Makefile.in: Add $(libdir), $(libprogramdir), and $(systemtmacdir).
+ (uninstall_dirs): Add $(libdir), $(libprogramdir), and
+ $(systemtmacdir).
+ Use @libdir@.
+ * Makefile.comm (.man.n): Add @SYSTEMMACRODIR@.
+ * tmac/Makefile.sub (install_data): Create
+ $(systemtmacdir) and $(localtmacdir).
+ (uninstall_sub): Use $(systemtmacdir) for wrapper macros.
+ * man/roff.man, src/roff/troff/troff.man, src/roff/groff/groff.man,
+ NEWS, doc/groff.texinfo: Updated and minor fixes.
+
+ * Makefile.comm, Makefile.in: Added tmac_{s,an}_prefix stuff again.
+ * tmac/Makefile.sub: Added `wrap' stuff again, but installing into
+ $(systemtmacdir) since the wrapper files are platform-dependent.
+
+2000-11-01 Werner LEMBERG <wl@gnu.org>
+
+ * doc/groff.texinfo: Fix typo.
+
2000-10-26 Werner LEMBERG <wl@gnu.org>
Convert macros `tmac.XXX' to `XXX.tmac'. Special cases:
diff --git a/Makefile.comm b/Makefile.comm
index 8211f68a..b9c9c85b 100644
--- a/Makefile.comm
+++ b/Makefile.comm
@@ -123,6 +123,7 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
-e "s|@FONTDIR@|$(fontdir)|g" \
-e "s|@FONTPATH@|$(fontpath)|g" \
-e "s|@MACRODIR@|$(tmacdir)|g" \
+ -e "s|@SYSTEMMACRODIR@|$(systemtmacdir)|g" \
-e "s|@LOCALMACRODIR@|$(localtmacdir)|g" \
-e "s|@MACROPATH@|$(tmacpath)|g" \
-e "s|@DEVICE@|$(DEVICE)|g" \
@@ -133,7 +134,9 @@ revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
-e "s|@MAN1EXT@|$(man1ext)|g" \
-e "s|@MAN5EXT@|$(man5ext)|g" \
-e "s|@MAN7EXT@|$(man7ext)|g" \
+ -e "s|@TMAC_S_PREFIX@|$(tmac_s_prefix)|g" \
-e "s|@TMAC_M_PREFIX@|$(tmac_m_prefix)|g" \
+ -e "s|@TMAC_AN_PREFIX@|$(tmac_an_prefix)|g" \
-e "s|@TMAC_MDIR@|$(tmacdir)/mm|g" \
-e "s|@BROKEN_SPOOLER_FLAGS@|$(BROKEN_SPOOLER_FLAGS)|g" \
-e "s|@VERSION@|$(version)$(revision)|g" \
diff --git a/Makefile.in b/Makefile.in
index 03ef5e0d..61690796 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -80,13 +80,16 @@ g=@g@
# Used in definitions of exec_prefix, datasubdir, fontpath, manroot.
# This must already exist when you do make install.
prefix=@prefix@
-
exec_prefix=@exec_prefix@
# bindir says where to install executables.
-bindir=$(exec_prefix)/bin
+bindir=@bindir@
+
+# libdir says where to install platform-dependent data
+libdir=@libdir@
+libprogramdir=$(libdir)/groff
-# datasubdir says where to install data files
+# datasubdir says where to install platform-independent data files
datadir=@datadir@
dataprogramdir=$(datadir)/groff
datasubdir=$(dataprogramdir)/$(version)$(revision)
@@ -100,11 +103,14 @@ fontpath=.:$(fontdir):/usr/lib/font
# tmacdir says where to install macros.
tmacdir=$(datasubdir)/tmac
+# systemtmacdir says where to install platform-dependent macros
+systemtmacdir=$(libprogramdir)/site-tmac
+
# localtmacdir says where local files will be installed
localtmacdir=$(dataprogramdir)/site-tmac
# tmacpath says where to look for macro files.
-tmacpath=.:$(localtmacdir):$(tmacdir)
+tmacpath=.:$(systemtmacdir):$(localtmacdir):$(tmacdir)
# sys_tmac_prefix is prefix (if any) for system macro packages
sys_tmac_prefix=@sys_tmac_prefix@
@@ -123,6 +129,12 @@ tmac_prefix=g
# The groff -mm macros will be available as -m$(tmac_m_prefix)m.
tmac_m_prefix=\
`for i in $(tmac_wrap) ""; do case "$$i" in m) echo $(tmac_prefix);; esac; done`
+# The groff -ms macros will be available as -m$(tmac_s_prefix)s.
+tmac_s_prefix=\
+ `for i in $(tmac_wrap) ""; do case "$$i" in s) echo $(tmac_prefix);; esac; done`
+# The groff -man macros will be available as -m$(tmac_an_prefix)an.
+tmac_an_prefix=\
+ `for i in $(tmac_wrap) ""; do case "$$i" in an) echo $(tmac_prefix);; esac; done`
# Extension to be used for refer index files. Index files are not
# sharable between different architectures, so you might want to use
@@ -259,10 +271,13 @@ MDEFINES= \
"datadir=$(datadir)" \
"dataprogramdir=$(dataprogramdir)" \
"datasubdir=$(datasubdir)" \
+ "libdir=$(libdir)" \
+ "libprogramdir=$(libprogramdir)" \
"bindir=$(bindir)" \
"fontdir=$(fontdir)" \
"fontpath=$(fontpath)" \
"tmacdir=$(tmacdir)" \
+ "systemtmacdir=$(systemtmacdir)" \
"localtmacdir=$(localtmacdir)" \
"tmacpath=$(tmacpath)" \
"indexext=$(indexext)" \
@@ -279,6 +294,8 @@ MDEFINES= \
"mkinstalldirs=$(mkinstalldirs)" \
"tmac_wrap=$(tmac_wrap)" \
"sys_tmac_prefix=$(sys_tmac_prefix)" \
+ "tmac_an_prefix=$(tmac_an_prefix)" \
+ "tmac_s_prefix=$(tmac_s_prefix)" \
"tmac_m_prefix=$(tmac_m_prefix)" \
"CCC=$(CCC)" \
"CC=$(CC)" \
@@ -519,8 +536,9 @@ uninstall: uninstall_sub uninstall_dirs
uninstall_dirs:
# Use rmdir here so that the directories are only removed if they're empty
-rmdir $(man1dir) $(man5dir) $(man7dir) $(manroot) \
- $(tmacdir) $(localtmacdir) $(fontdir) $(bindir) \
- $(datasubdir) $(dataprogramdir) $(datadir)
+ $(tmacdir) $(systemtmacdir) $(localtmacdir) $(fontdir) $(bindir) \
+ $(datasubdir) $(dataprogramdir) $(datadir) \
+ $(libprogramdir) $(libdir)
.PHONY: check
diff --git a/NEWS b/NEWS
index 8e0e6a69..4335f59e 100644
--- a/NEWS
+++ b/NEWS
@@ -60,13 +60,15 @@ For security reasons the following changes have been done:
. The tmac.safer file has been replaced with a built-in solution;
.open, .opena, .pso, .sy, and .pi are completely disabled in
- safer mode (which is the default); to use these requests the `-U'
+ safer mode (which is the default); to enable these requests the `-U'
command line flag must be used.
groff will now install its data files into /usr/local/share/groff/<version>
by default, following the GNU standard. Additionally, a local tmac
directory (by default /usr/local/share/groff/site-tmac) will be scanned
-before the standard tmac directory.
+before the standard tmac directory. Wrapper files for system-specific macro
+packages (if necessary) are put into /usr/local/lib/groff/site-tmac; this
+directory will be searched after the local tmac directory.
VERSION 1.16.1
==============
diff --git a/doc/groff.texinfo b/doc/groff.texinfo
index 5b2433c7..af1ab9ae 100644
--- a/doc/groff.texinfo
+++ b/doc/groff.texinfo
@@ -1238,6 +1238,8 @@ for in the macro directories of @code{groff}. If it isn't found,
@file{tmac.@var{name}} will be tried (and searched in the same
directories).
+@c XXX document local and system macro dirs
+
@item -n@var{num}
Number the first page @var{num}.
@@ -1300,6 +1302,8 @@ If this is set to @var{X}, then @code{groff} will run
A colon-separated list of directories in which to search for macro
files (before the default directories are tried).
+@c XXX document local and system macro dirs
+
@item GROFF_TYPESETTER
@tindex GROFF_TYPESETTER, environment variable
The default output device.
@@ -6055,7 +6059,7 @@ The strings are ``formatted'' before being compared; for example,
yields ``true''. The resulting motions, character sizes, and fonts
have to match, and not the individual motion, size, and font requests.
-@Here, samp{|} and @samp{\fR|\fP} both result in a roman @samp{|}
+Here, @samp{|} and @samp{\fR|\fP} both result in a roman @samp{|}
character with the same point size and at the same location on the
page, so the strings are equal. If @samp{.ft@w{ }I} had been added
before the @samp{.ie}, then the result would be ``false'' because
@@ -6344,7 +6348,7 @@ name.
This would be called as
@example
-.vl $Id: groff.texinfo,v 1.51 2000/10/26 21:49:47 wlemb Exp $
+.vl $Id: groff.texinfo,v 1.52 2000/11/08 16:17:34 wlemb Exp $
@end example
@xref{Request Arguments}.
diff --git a/man/roff.man b/man/roff.man
index 6931e23a..01cff2d6 100644
--- a/man/roff.man
+++ b/man/roff.man
@@ -1,4 +1,4 @@
-.\" -*- nroff -*-
+.\" t -*- nroff -*-
.ig
roff.7
@@ -404,13 +404,15 @@ By default,
installs all of its data files in subdirectories of
.I @FONTDIR@
and in
-.IR @MACRODIR@ .
+.I @MACRODIR@
+(except wrapper files for system-specific macro packages which will be
+in
+.IR @SYSTEMMACRODIR@ ).
These locations might vary for different systems.
In the following, the former is referred to as
.IR <groff_font_dir> ,
the latter as
.IR <groff_macro_dir> .
-.LP
.TP
.IB <groff_macro_dir> /troffrc
Initialization file for troff.
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index d1f3efd0..16bc7ef4 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -346,7 +346,7 @@ and
.SM
.B GROFF_TMAC_PATH
A colon separated list of directories in which to search for
-macro files.
+macro files in addition to the default directories.
.TP
.SM
.B GROFF_TYPESETTER
@@ -356,7 +356,7 @@ Default device.
.B GROFF_FONT_PATH
A colon separated list of directories in which to search for the
.BI dev name
-directory.
+directory in addition to the default one.
.TP
.SM
.B GROFF_BIN_PATH
diff --git a/src/roff/troff/troff.man b/src/roff/troff/troff.man
index ba1addcf..0b883b88 100644
--- a/src/roff/troff/troff.man
+++ b/src/roff/troff/troff.man
@@ -147,7 +147,8 @@ Read in the file
If it isn't found, try
.BI tmac. name
instead.
-Normally this will be searched for in @LOCALMACRODIR@ or @MACRODIR@.
+Normally this will be searched for in the current directory, @LOCALMACRODIR@,
+@SYSTEMMACRODIR@, or @MACRODIR@.
.TP
.B \-U
Unsafe mode.
@@ -228,7 +229,8 @@ file and font files before the normal
Search directory
.I dir
for macro files before the normal
-.B @LOCALMACRODIR@
+.BR @LOCALMACRODIR@ ,
+.BR @SYSTEMMACRODIR@ ,
and
.BR @MACRODIR@ .
.SH USAGE
@@ -2191,6 +2193,12 @@ escape sequence.
.B GROFF_TMAC_PATH
A colon separated list of directories in which to search for
macro files.
+.B troff
+will search in directories given in the
+.B \-M
+option before these, and in standard directories
+.RB ( @MACROPATH@ )
+after these.
.TP
.SM
.B GROFF_TYPESETTER
diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub
index e809d460..c2c930b6 100644
--- a/tmac/Makefile.sub
+++ b/tmac/Makefile.sub
@@ -9,9 +9,8 @@ MAN7=\
groff_markup.n
NORMALFILES=\
- mandoc.tmac andoc.tmac an-old.tmac man.tmac an.tmac \
+ mandoc.tmac andoc.tmac an-old.tmac \
me.tmac \
- ms.tmac s.tmac \
mdoc.tmac \
pic.tmac \
a4.tmac \
@@ -25,21 +24,43 @@ NORMALFILES=\
eqnrc \
troffrc troffrc-end \
hyphen.us
+SPECIALFILES=an.tmac man.tmac s.tmac ms.tmac
STRIPFILES=e.tmac doc.tmac doc-old.tmac
MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
mdocdir=$(tmacdir)/mdoc
CLEANADD=\
+ stamp-wrap stamp-sed *-wrap man.tmac-sed ms.tmac-sed \
stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s
+tmac_s_prefix=
+tmac_an_prefix=
+tmac_wrap=
+sys_tmac_prefix=
-all: stamp-strip
+all: stamp-strip stamp-wrap stamp-sed
-install_data: $(NORMALFILES) man.local stamp-strip
+install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
+ stamp-strip stamp-wrap stamp-sed
-test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
+ -test -d $(systemtmacdir) || $(mkinstalldirs) $(systemtmacdir)
+ -test -d $(localtmacdir) || $(mkinstalldirs) $(localtmacdir)
+ if test -n "$(tmac_wrap)"; then \
+ for m in ""$(tmac_wrap); do \
+ $(INSTALL_DATA) $$m-wrap $(systemtmacdir)/$$m.tmac; \
+ done; \
+ fi
for f in $(NORMALFILES); do \
rm -f $(tmacdir)/$$f; \
$(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \
done
+ -rm -f $(tmacdir)/$(tmac_s_prefix)s.tmac
+ $(INSTALL_DATA) $(srcdir)/s.tmac $(tmacdir)/$(tmac_s_prefix)s.tmac
+ -rm -f $(tmacdir)/ms.tmac
+ $(INSTALL_DATA) ms.tmac-sed $(tmacdir)/ms.tmac
+ -rm -f $(tmacdir)/$(tmac_an_prefix)an.tmac
+ $(INSTALL_DATA) $(srcdir)/an.tmac $(tmacdir)/$(tmac_an_prefix)an.tmac
+ -rm -f $(tmacdir)/man.tmac
+ $(INSTALL_DATA) man.tmac-sed $(tmacdir)/man.tmac
for f in $(STRIPFILES); do \
rm -f $(tmacdir)/$$f; \
$(INSTALL_DATA) $$f-s $(tmacdir)/$$f; \
@@ -59,10 +80,40 @@ stamp-strip: $(STRIPFILES) $(MDOCFILES)
done
touch $@
+stamp-wrap:
+ if test -n "$(tmac_wrap)"; then \
+ for m in ""$(tmac_wrap); do \
+ rm -f $$m-wrap; \
+ if test "$$m" = an; then \
+ echo .do mso andoc.tmac >>$$m-wrap; \
+ fi; \
+ echo .cp 1 >>$$m-wrap; \
+ echo .so $(sys_tmac_prefix)$$m >>$$m-wrap; \
+ done; \
+ fi
+ touch $@
+
+stamp-sed: man.tmac ms.tmac
+ for f in man.tmac ms.tmac; do \
+ rm -f $$f-sed; \
+ sed -e "s;@TMAC_AN_PREFIX@;$(tmac_an_prefix);g" \
+ -e "s;@TMAC_S_PREFIX@;$(tmac_s_prefix);g" \
+ $(srcdir)/$$f > $$f-sed; \
+ done
+ touch $@
+
uninstall_sub:
+ -if test -n "$(tmac_wrap)"; then \
+ for m in ""$(tmac_wrap); do \
+ rm -f $(systemtmacdir)/$$m.tmac; \
+ done; \
+ fi
-for f in $(NORMALFILES) $(STRIPFILES); do \
rm -f $(tmacdir)/$$f; \
done
+ -rm -f $(tmacdir)/$(tmac_s_prefix)s.tmac
+ -rm -f $(tmacdir)/$(tmac_an_prefix)an.tmac
+ -rm -f $(tmacdir)/man.tmac $(tmacdir)/ms.tmac
-if cmp -s $(localtmacdir)/man.local $(srcdir)/man.local; then \
rm -f $(localtmacdir)/man.local; \
fi