@echo off
Rem This script runs groff without requiring that it be installed.
Rem The current directory must be the build directory.

test -d groff
if not errorlevel 1 goto dirOk
echo this batch file must be run with the build directory as the current directory
goto end
:dirOk
test -x groff/groff
if not errorlevel 1 goto groffOk
echo this batch file must be run with the build directory as the current directory
goto end
:groffOk
set GROFF_FONT_PATH=.
set GROFF_TMAC_PATH=./tmac;./troff
set PATH1=%PATH%
set PATH=troff;soelim;eqn;tbl;pic;refer;grotty;%PATH1%
Rem
echo I will use this command to format a document and print it on the screen:
groff\groff -V -e -s -t -p -R -me -Tascii doc/meintro.me
pause
Rem Make the following command pipe to Less if you have Less installed:
groff\groff -e -s -t -p -R -me -Tascii doc/meintro.me
Rem
set PATH=troff;soelim;eqn;tbl;pic;refer;grops;%PATH1%
echo I will use this command to format a document and print it on PS printer:
groff\groff -V -e -s -t -p -R -me -Tps doc/meintro.me
pause
Rem Uncomment the following command if you have a PostScript printer:
REM groff\groff -e -s -t -p -R -me -Tps doc/meintro.me > prn
Rem
set PATH=troff;soelim;eqn;tbl;pic;refer;grolj4;%PATH1%
echo I will use this command to format a document and print it on LJ4 printer:
groff\groff -V -e -s -t -p -R -me -Tlj4 doc/meintro.me
pause
Rem Uncomment the following command if you have a LaserJet4 printer:
REM groff\groff -e -s -t -p -R -me -Tlj4 doc/meintro.me > prn
Rem
set PATH=troff;soelim;eqn;tbl;pic;refer;grodvi;%PATH1%
echo I will use this command to format a document into a DVI format:
groff\groff -V -e -s -t -p -R -me -Tdvi doc/meintro.me
pause
Rem Uncomment the following command if you have a DVI viewer:
groff\groff -e -s -t -p -R -me -Tdvi doc/meintro.me > meintro.dvi
set PATH=%PATH1%
set GROFF_FONT_PATH=
set GROFF_TMAC_PATH=
set PATH1=
:exit
