#!/bin/sh TEXSRC="/users/heinz/src/tex/TeX-3.141/TeX3.141" MAKEDIR=$TEXSRC/web2c-5.851d TEXDIR=$MAKEDIR/tex WEBDIR=$MAKEDIR/web WEB2CDIR=$MAKEDIR/web2c LIBDIR=$MAKEDIR/lib SISISIDIR="/users/heinz/src/tex/sisisi/iSiTeX3.141" 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 "*** 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 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.in.orig ] then echo "Saving Makefile.in in Makefile.in.orig" mv Makefile.in Makefile.in.orig fi echo "Modifying Makefile.in for tex9.c and tex10.c" sed -e 's/#.*tex9_o.*9.o/tex9_o = tex9.o tex10.o/'\ < Makefile.in.orig > Makefile.in cd $SISISIDIR echo "Changing to $SISISIDIR" echo "Uncompressing isitex.web to $TEXDIR/tex.web" uncompress $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, 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 $TEXDIR echo "Now starting error correction" echo "Changing to $TEXDIR" echo "Correcting coerce.h" sed -e 's/(string80)//g' -e 's/(sperrvektor)//g' -e 's/(wort)//g'\ -e 's/(dudt)//g' -e 's/(intarr)//g' -e 's/(varr)//g'\ -e 's/(trennvektor)//g' -e 's/(hashelement)//g' -e 's/(trenn16)//g'\ -e 's/(infotype)//g' -e 's/(tableentry)//g' < coerce.h > coerce.h.new mv coerce.h.new coerce.h echo "Correcting texd.h" tie -m texd.h.new texd.h $SISISIDIR/texd.h.ch mv texd.h.new texd.h echo "Correcting tex6.c" sed -e 's/) ]/] )/g' -e 's/) ]/] )/g' -e 's/\(hashfile.*,.*\)"%ld"/\1"%4ld"/g'\ -e 's/integer vacc/long vacc/' -e 's/\(vacc = [0-9][0-9]*\)/\1L/'\ -e 's/\(indacc = [0-9][0-9]*\)/\1L/' -e 's/\(kacc = [0-9][0-9]*\)/\1L/'\ -e 's/) + 96 ]/] + 96 )/g'\ -e '/read.*(.*hashfile.*,.*htab.*\[.*i.*].*\[.*0.*].*).*;/i\ integer help;'\ -e 's/read.*(.*hashfile.*,.*htab.*\[.*i.*].*\[.*\([0-9]\).*].*).*;/\ fscanf ( hashfile, "%d", \&help );\ htab [i][\1] = (eightbits) help;/' < tex6.c > tex6.c.new mv tex6.c.new tex6.c echo "Correcting tex7.c" sed -e 's/) ]/] )/g' -e 's/) ]/] )/g'\ -e 's/read.*(.*hsmem.*l.*)/fscanf ( hsmem , "%d", \&l )/'\ -e 's/read.*(.*hsmem.*w.*\[.*i.*)/fscanf ( hsmem , "%hd", \&w [ i ] )/'\ -e 's/read.*(.*hsmem.*tr.*\[.*i.*)/fscanf ( hsmem , "%d", \&tr [ i ] )/'\ -e 's/read.*(.*hsmem.*temp.*)/fscanf ( hsmem , "%c", \&temp )/'\ < tex7.c > tex7.c.new mv tex7.c.new tex7.c echo "Correcting tex10.c" sed -e 's/) ]/] )/g' -e 's/) ]/] )/g'\ -e 's/fprintf(.*hsmem.*"%ld"/fprintf( hsmem , " %ld"/'\ -e 's/) + 96 ]/] + 96 )/' < tex10.c > tex10.c.new mv tex10.c.new tex10.c 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." exit 0