summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2000-10-23 17:55:42 +0000
committerwlemb <wlemb>2000-10-23 17:55:42 +0000
commit981608bc9ba892ccae441db5eb7f57b946faf6d3 (patch)
tree4a721f6f257c1cd96b4f28547495d4850894114c
parente8fea0b834cb9584e3fef8fafb3357f08bf02fa6 (diff)
downloadgroff-981608bc9ba892ccae441db5eb7f57b946faf6d3.tar.gz
* aclocal.m4 (GROFF_PAGE): Add test for new directory structure.
* configure: Updated. * arch/djgpp/README, font/devutf8/NOTES: Use it. * man/roff.man, tmac/groff_tmac.man: Use @FONTPATH@, @FONTDIR@, and @MACRODIR@ instead of hard-coded directories.
-rw-r--r--ChangeLog5
-rw-r--r--aclocal.m47
-rw-r--r--arch/djgpp/README96
-rwxr-xr-xconfigure13
-rw-r--r--font/devutf8/NOTES2
-rw-r--r--man/roff.man8
-rwxr-xr-xtmac/groff_tmac.man11
7 files changed, 83 insertions, 59 deletions
diff --git a/ChangeLog b/ChangeLog
index f09d6985..8376c42a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,7 +12,12 @@
* Makefile.in, Makefile.comm, src/utils/indxbib/Makefile.sub,
doc/Makefile, src/xditview/Imakefile.in: Implement it.
+ * aclocal.m4 (GROFF_PAGE): Add test for new directory structure.
+ * configure: Updated.
+ * arch/djgpp/README, font/devutf8/NOTES: Use it.
* NEWS: Document it.
+ * man/roff.man, tmac/groff_tmac.man: Use @FONTPATH@, @FONTDIR@, and
+ @MACRODIR@ instead of hard-coded directories.
2000-10-22 Werner LEMBERG <wl@gnu.org>
diff --git a/aclocal.m4 b/aclocal.m4
index 1cd92ce2..f7cc11ac 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -238,6 +238,13 @@ if test -z "$PAGE"; then
descfile=$prefix/share/groff/font/devps/DESC
elif test -r $prefix/lib/groff/font/devps/DESC; then
descfile=$prefix/lib/groff/font/devps/DESC
+ else
+ for f in $prefix/share/groff/*/font/devps/DESC; do
+ if test -r $f; then
+ descfile=$f
+ break
+ fi
+ done
fi
if test -n "$descfile" \
&& grep "^paperlength 841890" $descfile >/dev/null 2>&1; then
diff --git a/arch/djgpp/README b/arch/djgpp/README
index 799f05f1..77da35e6 100644
--- a/arch/djgpp/README
+++ b/arch/djgpp/README
@@ -24,9 +24,11 @@ I. Installing the pre-compiled binary package
where you unzip Groff. In this latter case, you will need to
set additional environment variables:
- GROFF_TMAC_PATH=.;%DJDIR%/share/groff/tmac
- GROFF_TYPESETTER=ascii
- GROFF_FONT_PATH=.;%DJDIR%/share/groff/font
+ GROFF_TMAC_PATH=.;%DJDIR%/share/groff/<version>/tmac
+ GROFF_TYPESETTER=ascii
+ GROFF_FONT_PATH=.;%DJDIR%/share/groff/<version>/font
+
+ <version> is something like `1.16.1' or `1.17'.
In addition, you can set the variable GROFF_TMPDIR to point to
a directory where you want Groff to create temporary files it
@@ -74,34 +76,34 @@ I. Installing the pre-compiled binary package
5. For those who only need Groff to format man pages and don't
like reading the docs, here's a minimal cookbook:
- groff -man -s foo.1 > foo.man
+ groff -man -s foo.1 > foo.man
where `foo.1' is the troff source of the man page and `foo.man'
is the formatted page. If you need to view the man page, say
this:
- groff -man -s foo.1 | less
+ groff -man -s foo.1 | less
You can also use the DJGPP clone of the Unix `man' command, in
which case `man' runs the above command for you automatically.
Here's how you print man pages on a PostScript printer:
- groff -man -s -Tps foo.1 > prn
+ groff -man -s -Tps foo.1 > prn
And this is for a LaserJet4 printer:
- groff -man -s -Tlj4 foo.1 > prn
+ groff -man -s -Tlj4 foo.1 > prn
Printing the documents produced by Groff is possible either by
- redirecting Groff's stdandard output to the local printer
+ redirecting Groff's standard output to the local printer
device, like shown above, or by using the `-l' switch to Groff.
The latter possibility causes Groff to pipe its output to a
program whose name and arguments appear in the files named
`DESC' in each of the `devFOO' subdirectories of the
- %DJDIR%/share/groff/font directory; for example, the file
- devps/DESC is used by "groff -Tps". The relevant line in these
- files begins with the word "print".
+ %DJDIR%/share/groff/<version>/font directory; for example, the
+ file devps/DESC is used by "groff -Tps". The relevant line in
+ these files begins with the word "print".
As configured, when invoked with the `-l' switch, Groff will
call `cat' (from GNU Textutils) to pipe its output to the
@@ -117,7 +119,7 @@ I. Installing the pre-compiled binary package
Beginning with version 1.15, Groff can create HTML output, like
this:
- groff -man -s -Thtml foo.1 > foo.html
+ groff -man -s -Thtml foo.1 > foo.html
Producing HTML files sometimes requires Ghostscript to be
installed, and, for gif images, ppmquant and ppmtogif as well.
@@ -136,10 +138,10 @@ I. Installing the pre-compiled binary package
These scripts need the following utilities to run (in addition
to the Groff programs they invoke):
- - bash
- - gawk
- - egrep
- - sed
+ - bash
+ - gawk
+ - egrep
+ - sed
The `afmtodit' and `mmroff' utilities are Perl scripts, so you
will need a Perl port to run them.
@@ -162,9 +164,9 @@ I. Installing the pre-compiled binary package
DJGPP FAQ list in case you have any problems with the emulator.
8. The package does not include the directories under
- share/groff/font whose names begin with "devX": these are
- needed on X-Windows for running the gxditview program, which is
- not supported by this port.
+ share/groff/<version>/font whose names begin with "devX": these
+ are needed on X-Windows for running the gxditview program, which
+ is not supported by this port.
9. Due to 8+3 limitations of DOS filesystems, several files were
renamed:
@@ -173,16 +175,16 @@ I. Installing the pre-compiled binary package
"groff -m mndoc" instead of "groff -m mandoc". "groff -mandoc"
still works as usual.
- - tmac.tty-char was renamed to tmac.ttchar. All the files in
+ - tmac.tty-char was renamed to tmac.ttchar. All the files in
the distribution that referenced tmac.tty-char were edited
to refer to the new name.
- - tmac.doc.old was renamed to tmac.old-doc. Use -mold-doc
+ - tmac.doc.old was renamed to tmac.old-doc. Use -mold-doc
instead of -mdoc.old switch. The `grog' utility was
changed to suggest the -mold-doc switch instead of
-mdoc.old.
- - dingbatsmap and dingbatsrmap were renamed to dingbats.map
+ - dingbatsmap and dingbatsrmap were renamed to dingbats.map
and dingbats.rmap, respectively. The Makefile in the
font/devps/generate directory was modified accordingly.
@@ -199,18 +201,18 @@ II. Building Groff from sources
name in parentheses is what you need to download from one of
the DJGPP sites):
- - Standard DJGPP development environment (djdev203.zip)
- - GNU C compiler (gcc2721b.zip)
- - GNU C++ compiler (gpp2721b.zip)
- - GNU Make 3.79 (mak379b.zip)
- - Bash v2.03 (bsh203b.zip)
- - Fileutils 3.16 (fil316b.zip)
- - Textutils 2.0 (txt20b.zip)
- - Sh-utils 1.12 (shl112b.zip)
- - Sed 3.02 (sed302b.zip)
- - Gawk 3.04 (gwk304b.zip)
- - Grep 2.4 (grep24b.zip)
- - Bison (only if you change one of the *.y files)
+ - Standard DJGPP development environment (djdev203.zip)
+ - GNU C compiler (gcc2721b.zip)
+ - GNU C++ compiler (gpp2721b.zip)
+ - GNU Make 3.79 (mak379b.zip)
+ - Bash v2.03 (bsh203b.zip)
+ - Fileutils 3.16 (fil316b.zip)
+ - Textutils 2.0 (txt20b.zip)
+ - Sh-utils 1.12 (shl112b.zip)
+ - Sed 3.02 (sed302b.zip)
+ - Gawk 3.04 (gwk304b.zip)
+ - Grep 2.4 (grep24b.zip)
+ - Bison (only if you change one of the *.y files)
Note that you don't need to install libg++ (lgpNNNb.zip) since
Groff doesn't use any C++ classes except its own.
@@ -229,8 +231,8 @@ II. Building Groff from sources
awk.exe. If not, go to the DJGPP bin/ subdirectory and type
the following words of wisdom from the DOS prompt:
- ln -s bash.exe sh.exe
- ln -s gawk.exe awk.exe
+ ln -s bash.exe sh.exe
+ ln -s gawk.exe awk.exe
(`ln' is part of GNU Fileutils, see above.)
@@ -244,7 +246,7 @@ II. Building Groff from sources
If you are building from the official GNU distribution, unpack
the .tar.gz archive like this:
- djtar -x groff-X.YZ.tar.gz
+ djtar -x groff-X.YZ.tar.gz
(DJTAR is part of the standard DJGPP development distribution.)
@@ -262,13 +264,13 @@ II. Building Groff from sources
have to reconfigure Groff. To this end, use the CONFIG.BAT
batch file in the DJGPP subdirectory:
- arch\djgpp\config
+ arch\djgpp\config
You can configure and build Groff from outside its source
directory. In that case, you need to pass the full path to the
source directory as an argument to CONFIG.BAT, like this:
- d:\gnu\groff-1.16\arch\djgpp\config d:/gnu/groff-1.16
+ d:\gnu\groff-1.16\arch\djgpp\config d:/gnu/groff-1.16
Note that you MUST use forward slashes in the path you pass to
CONFIG.BAT, or else it may fail. (For versions of Groff other
@@ -287,18 +289,18 @@ II. Building Groff from sources
preconfigured package. If this is not an option, you will have
to edit the file lang/cxx/_G_config.h and change this line:
- #define _G_HAVE_SYS_SOCKET 1
+ #define _G_HAVE_SYS_SOCKET 1
to say this instead:
- #define _G_HAVE_SYS_SOCKET 0
+ #define _G_HAVE_SYS_SOCKET 0
The problem with redefining NULL should not happen with DJGPP
v2.03 or later. But if you still see compilation errors which
say "`NULL' undeclared", comment out the line in _G_config.h
that says this:
- #undef NULL
+ #undef NULL
Alternatively, you can reconfigure the package as described in
the previous paragraph, before building it.
@@ -326,7 +328,7 @@ II. Building Groff from sources
subsidiary COMMAND.COM with plenty of environment space, like
so:
- command.com /e:3000
+ command.com /e:3000
then invoke T-GROFF.BAT from that COMMAND.COM.
@@ -342,7 +344,7 @@ II. Building Groff from sources
install the package by setting the `prefix' variable. For
example:
- make install prefix=c:/groff
+ make install prefix=c:/groff
"make install" doesn't format the man pages, it just copies
them into subdirectories of the %DJDIR%\MAN directory. If you
@@ -356,6 +358,6 @@ II. Building Groff from sources
Consult the installation instructions for pre-compiled binaries
above, for more info about installing and using Groff.
- 8. You can safely delete the directories under share/groff/font
- whose names begin with "devX": these are needed on X-Windows
- which is not supported by this port.
+ 8. You can safely delete the directories under
+ share/groff/<version>/font whose names begin with "devX": these
+ are needed on X-Windows which is not supported by this port.
diff --git a/configure b/configure
index 160b11d4..48ecc482 100755
--- a/configure
+++ b/configure
@@ -2765,6 +2765,13 @@ if test -z "$PAGE"; then
descfile=$prefix/share/groff/font/devps/DESC
elif test -r $prefix/lib/groff/font/devps/DESC; then
descfile=$prefix/lib/groff/font/devps/DESC
+ else
+ for f in $prefix/share/groff/*/font/devps/DESC; do
+ if test -r $f; then
+ descfile=$f
+ break
+ fi
+ done
fi
if test -n "$descfile" \
&& grep "^paperlength 841890" $descfile >/dev/null 2>&1; then
@@ -2793,7 +2800,7 @@ test -n "$PAGE" || PAGE=letter
echo "$ac_t""$PAGE" 1>&6
echo $ac_n "checking for existing troff installation""... $ac_c" 1>&6
-echo "configure:2797: checking for existing troff installation" >&5
+echo "configure:2804: checking for existing troff installation" >&5
if test "x`(echo .tm '|n(.g' | tr '|' '\\\\' | troff -z -i 2>&1) 2>/dev/null`" = x0; then
echo "$ac_t""yes" 1>&6
g=g
@@ -2803,7 +2810,7 @@ else
fi
echo $ac_n "checking for prefix of system macro packages""... $ac_c" 1>&6
-echo "configure:2807: checking for prefix of system macro packages" >&5
+echo "configure:2814: checking for prefix of system macro packages" >&5
sys_tmac_prefix=
sys_tmac_file_prefix=
for d in /usr/share/lib/tmac /usr/lib/tmac; do
@@ -2823,7 +2830,7 @@ echo "$ac_t""$sys_tmac_prefix" 1>&6
tmac_wrap=
echo $ac_n "checking which system macro packages should be made available""... $ac_c" 1>&6
-echo "configure:2827: checking which system macro packages should be made available" >&5
+echo "configure:2834: checking which system macro packages should be made available" >&5
if test "x$sys_tmac_file_prefix" = "xtmac."; then
for f in $sys_tmac_prefix*; do
suff=`echo $f | sed -e "s;$sys_tmac_prefix;;"`
diff --git a/font/devutf8/NOTES b/font/devutf8/NOTES
index 67421555..550d7a83 100644
--- a/font/devutf8/NOTES
+++ b/font/devutf8/NOTES
@@ -86,7 +86,7 @@ U+20AC. You need to do two things:
(the second column is computed as 24 * wcwidth(0x20AC)) to the file
R.proto, or, when groff is already installed, to the four fonts files in
- $(prefix)/share/groff/font/devutf8/.
+ $(prefix)/share/groff/<version>/font/devutf8/.
- In your source file, use the notation \N'8364' where 8364 is the decimal
representation of 0x20AC.
diff --git a/man/roff.man b/man/roff.man
index 3291e36c..cc14b046 100644
--- a/man/roff.man
+++ b/man/roff.man
@@ -394,15 +394,17 @@ directory.
will search in directories given in the
.option \-F
option before these, and in standard directories
-.RB ( .:/usr/local/share/groff/font:/usr/lib/font )
+.RB ( @FONTPATH@ )
after these.
.\" --------------------------------------------------------------------
.SH FILES
.\" --------------------------------------------------------------------
By default,
.I groff
-installs all of its library files in a directory tree under
-.IR /usr/local/share/groff .
+installs all of its data files in subdirectories of
+.I @FONTDIR@
+and in
+.IR @MACRODIR@ .
This location might vary for different systems.
In the following, this directory is referred to as
.IR <groff_dir> .
diff --git a/tmac/groff_tmac.man b/tmac/groff_tmac.man
index c3562e7d..af0df1d9 100755
--- a/tmac/groff_tmac.man
+++ b/tmac/groff_tmac.man
@@ -218,7 +218,7 @@ in the preprocessor word as described in section
.BR CONVENTION .
.LP
For example, suppose a macro file is stored as
-.I /usr/share/groff/tmac/tmac.macros
+.I @MACRODIR@/tmac.macros
and is used in some document called
.IR docu.roff .
.LP
@@ -241,7 +241,7 @@ To include the macro file directly in the document either
is used or
.RS
.ft CR
-\&\.so /usr/share/groff/tmac/tmac.macros
+\&\.so @MACRODIR@/tmac.macros
.ft P
.RE
.LP
@@ -359,9 +359,10 @@ all of which constitue the
.BR path.
In accordance with the Filesystem Hierarchy Standard (FHS), the standard
tmac directory location for groff is
-.IR /usr/share/groff/tmac ,
-a local installation will use
-.IR /usr/local/share/groff/tmac .
+.IB /usr/share/groff/ <version> /tmac\c
+, a local installation will use
+.IB /usr/local/share/groff/ <version> /tmac\c
+\&.
Older systems used a subdirectory of
.IR /usr/lib .
Independently of the default tmac path, the tmac path actually used by a