echo "*** iSiTeX 3.141 Installation program"
echo "*** ================================="
echo "***"
echo "*** Do not forget to retrieve the files *.tex and *.sty"
echo "*** from eiunix.tuwien.ac.at:/pub/sisisi/COMMON and"
echo "*** copy them into your TEXINPUTS path."
echo "***"
echo "*** You also have to get tie from the COMMON directory"
echo "*** and put it into a directory holding executables, so"
echo "*** it can be used by the installation."
echo "***"
echo "*** Before the installation can continue, you have to"
echo "*** follow the guidelines from the TeX3.141 distribution"
echo "*** and set the pathnames in the several Makefile.in"
echo "*** and site.h for your site's needs."
echo "***"
echo "*** Do not run configure, it is started by this script."
echo "***"
echo "*** If you want to stop the installation, press 'q' now."
echo "*** Press <cr> to continue."
read x
if [ "$x" = "q" ]
then
exit
fi
echo
echo "Starting installation of iSiTeX3.141"
echo
cd $TEXDIR
echo "Changing to $TEXDIR"
if [ ! -f tex.web.orig ]
then
echo "Saving tex.web in tex.web.orig"
mv tex.web tex.web.orig
fi
if [ ! -f tex.ch.orig ]
then
echo "Saving tex.ch in tex.ch.orig"
mv tex.ch tex.ch.orig
fi
if [ ! -f Makefile.orig ]
then
echo "Saving Makefile in Makefile.orig"
mv Makefile Makefile.orig
fi
echo "Modifying Makefile for tex9.c and tex10.c"
sed -e 's/^objs=/objs=tex9.o tex10.o /'\
-e 's/^tex0.c/tex10.c tex0.c/'\
-e 's/tex9\.o: tex8\.c/tex9.o: tex9.c/'\
-e '/^tex9\.o:/a\
tex10.o: tex10.c $(commonh)' < Makefile.orig > Makefile
cd $SISISIDIR
echo "Changing to $SISISIDIR"
echo "Uncompressing isitex.web to $TEXDIR/tex.web"
uncompress <isitex.web.Z >$TEXDIR/tex.web
echo "Copying tex.ch to $TEXDIR/tex.ch"
cp tex.ch $TEXDIR/tex.ch
cd $WEBDIR
echo "Changing to $WEBDIR"
if [ ! -f tangle.ch.orig ]
then
echo "Saving tangle.ch in tangle.ch.orig"
mv tangle.ch tangle.ch.orig
fi
echo "Modifying tangle.ch for bigger name space"
sed -e '/@!stack_size=50/i\
@!max_toks=50000; {|1/zz| times the number of bytes in compressed \\PASCAL\\ code;\
must be less than 65536}\
@y\
@!max_toks=60000; {|1/zz| times the number of bytes in compressed \\PASCAL\\ code;\
must be less than 65536}\
@z\
\
@x\
@!max_names=4000; {number of identifiers, strings, module names;\
must be less than 10240}\
@y\
@!max_names=9000; {number of identifiers, strings, module names;\
must be less than 10240}\
@z\
\
@x' < tangle.ch.orig > tangle.ch
sleep 5
touch tangleboot.p
sleep 5
touch tangleboot.c tangleboot.h
cd $WEB2CDIR
echo "Changing to $WEB2CDIR"
if [ ! -f web2c.yacc.orig ]
then
echo "Saving web2c.yacc in web2c.yacc.orig"
mv web2c.yacc web2c.yacc.orig
fi
if [ ! -f web2c.c.orig ]
then
echo "Saving web2c.c in web2c.c.orig"
mv web2c.c web2c.c.orig
fi
if [ ! -f web2c.h.orig ]
then
echo "Saving web2c.h in web2c.h.orig"
mv web2c.h web2c.h.orig
fi
echo "Modifying web2c.[ch] for bigger tables"
sed -e 's/var_list\[.00]/var_list\[500]/'\
-e 's/field_list\[.00]/field_list\[500]/' < web2c.c.orig > web2c.c
sed -e 's/var_list\[.00]/var_list\[500]/'\
-e 's/field_list\[.00]/field_list\[500]/' < web2c.h.orig > web2c.h
echo "Modifying web2c.yacc for handling of pointer variables"
tie -m web2c.yacc web2c.yacc.orig $SISISIDIR/web2c.yacc.ch
if [ $? -ne 0 ]
then
echo "*** You have not installed tie, or an error during the"
echo "*** execution of tie has occured."
echo "***"
echo "*** Installation terminated."
exit 1
fi
cd $LIBDIR
echo "Changing to $LIBDIR"
if [ ! -f common.defines.orig ]
then
echo "Saving common.defines in common.defines.orig"
mv common.defines common.defines.orig
fi
echo "Modifying common.defines for definition of malloc and sizeof"
cp common.defines.orig common.defines
echo '{Definitions for IsITeX: new(p) is translated to p := malloc(sizeof(^p)),
so we have to define malloc and sizeof for web2c.}
@define function malloc ();
@define function sizeof ();' >> common.defines
cd $MAKEDIR
echo "Changing to $MAKEDIR"
echo "Running configure"
/configure
echo "*** Now that configure has finished, you might want"
echo "*** to inspect or change the Makefiles, as suggested"
echo "*** in TeX3.141's README file."
echo "*** Press 's' to suspend the installation and start"
echo "*** an interactive shell, <cr> to continue."
read x
if [ "$x" = "s" ]
then
echo "Type 'exit' to quit the shell and continue with the installation."
${SHELL:-/bin/sh}
fi
cd $MAKEDIR
echo "Changing to $MAKEDIR"
echo "Now starting: \`make TeX'"
make TeX
cd $MAKEDIR
echo "Returning to $MAKEDIR"
echo "Continuing: \`make TeX'"
make TeX
cd $TEXDIR
if [ ! -x virtex ]
then
echo "*** There seems to be something wrong; virtex doesn't exist."
echo "*** Obviously, the installation has failed."
exit 1
fi
echo "Creating the formatfiles in $TEXDIR"
echo
echo "If siplain.tex, silplain.tex, sihyphen.tex and def_umlaut.tex are not"
echo "in one of the TEXINPUTS directories, you will now run into trouble."
echo "(You will be prompted for their pathnames and have to type in"
echo "the whole stuff.)"
mv tex.pool isitex.pool
TEXPOOL=. ./initex siplain.tex \\dump
if [ -f siplain.fmt ]
then
mv siplain.fmt isitex.fmt
echo "...isitex.fmt created"
else
echo "isiplain.fmt not created for unknown reasons."
fi
TEXPOOL=. ./initex silplain.tex \\dump
if [ -f silplain.fmt ]
then
mv silplain.fmt isilatex.fmt
echo "...isilatex.fmt created"
else
echo "isilplain.fmt not created for unknown reasons."
fi
echo "*** The installation is now complete."
echo "*** You should find the following files in $TEXDIR:"
echo "***"
echo "*** isitex.fmt, isilatex.fmt, hf3,"
echo "*** isitex.pool, virtex and initex."
echo "***"
echo "*** Now copy isitex.fmt and isilatex.fmt into a TEXFORMAT-Dir,"
echo "*** virtex and initex into a directory holding executables"
echo "*** (preferably as isivirtex and isiinitex), hf3 into"
echo "*** a TEXINPUTDIR, and isitex.pool into the TEXPOOLDIR."
echo "*** Also create links isilatex and isitex to isivirtex, and"
echo "*** a link named isiplain.fmt to isitex.fmt, all in the"
echo "*** appropriate directories. If you have SiTeX 3.141 already"
echo "*** installed, you needn't install the new hf3 again, as they"
echo "*** are identical."