new file
[s-roff.git] / test-groff
blob88ee77bc192b61448b49d61f6dc686faa2f0026c
1 #! /bin/sh
2 # This script runs groff without requiring that it be installed.
3 # The current directory must be the build directory.
5 builddir=./src
6 srcdir=`echo $0 | sed -e 's;/[^/]*$;;'`
8 if test ! -d $builddir/roff/groff || test ! -r $builddir/roff/groff/groff
9 then
10 echo $0 must be run with the build directory as the current directory 2>&1
11 exit 1
14 PATH=\
15 $builddir/roff/troff:\
16 $builddir/preproc/pic:\
17 $builddir/preproc/eqn:\
18 $builddir/preproc/tbl:\
19 $builddir/preproc/grn:\
20 $builddir/preproc/refer:\
21 $builddir/preproc/soelim:\
22 $builddir/preproc/html2:\
23 $builddir/devices/grops:\
24 $builddir/devices/grodvi:\
25 $builddir/devices/grotty:\
26 $builddir/devices/grolj4:\
27 $builddir/devices/grolbp:\
28 $builddir/devices/grohtml:\
29 $builddir/devices/grohtml2:\
30 $srcdir/$builddir/xditview:\
31 $PATH
33 test -n "$srcdir" || srcdir=.
35 XENVIRONMENT=`cd $srcdir; pwd`/src/xditview/GXditview.ad
36 export XENVIRONMENT
38 GROFF_COMMAND_PREFIX=
39 GROFF_FONT_PATH=$builddir:$srcdir/font
40 GROFF_TMAC_PATH=$srcdir/tmac
41 export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH
43 exec $builddir/roff/groff/groff ${1+"$@"}