summaryrefslogtreecommitdiff
path: root/test-groff
diff options
context:
space:
mode:
authorwlemb <wlemb>2000-02-06 09:34:01 +0000
committerwlemb <wlemb>2000-02-06 09:34:01 +0000
commit653c6faab591f3c5f290a18a7f58c29cb1a3b0a7 (patch)
tree633fec7ba17c3da901e7725d1907a103a17e4532 /test-groff
downloadgroff-653c6faab591f3c5f290a18a7f58c29cb1a3b0a7.tar.gz
Initial revision
Diffstat (limited to 'test-groff')
-rw-r--r--test-groff39
1 files changed, 39 insertions, 0 deletions
diff --git a/test-groff b/test-groff
new file mode 100644
index 00000000..e78ba302
--- /dev/null
+++ b/test-groff
@@ -0,0 +1,39 @@
+#! /bin/sh
+# This script runs groff without requiring that it be installed.
+# The current directory must be the build directory.
+
+builddir=./src
+srcdir=`echo $0 | sed -e 's;/[^/]*$;;'`
+
+if test ! -d $builddir/roff/groff || test ! -r $builddir/roff/groff/groff
+then
+ echo $0 must be run with the build directory as the current directory 2>&1
+ exit 1
+fi
+
+PATH=\
+$builddir/roff/troff:\
+$builddir/preproc/pic:\
+$builddir/preproc/eqn:\
+$builddir/preproc/tbl:\
+$builddir/preproc/refer:\
+$builddir/preproc/soelim:\
+$builddir/devices/grops:\
+$builddir/devices/grodvi:\
+$builddir/devices/grotty:\
+$builddir/devices/grolj4:\
+$builddir/devices/grohtml:\
+$srcdir/$builddir/xditview:\
+$PATH
+
+test -n "$srcdir" || srcdir=.
+
+XENVIRONMENT=`cd $srcdir; pwd`/src/xditview/GXditview.ad
+export XENVIRONMENT
+
+GROFF_COMMAND_PREFIX=
+GROFF_FONT_PATH=$builddir:$srcdir/font
+GROFF_TMAC_PATH=$srcdir/tmac:$srcdir/src/roff/troff
+export PATH GROFF_COMMAND_PREFIX GROFF_FONT_PATH GROFF_TMAC_PATH
+
+exec $builddir/roff/groff/groff ${1+"$@"}