#!/bin/bash

# You may want to edit following lines.
CFLAGS="-DHAVE_CONFIG_H  -I. -I.. -I../.. -I../.. -O2 -s"
LDFLAGS=
CC=gcc

./configure EUC
patch -p0 < ptex756.diff
# If ``make ptex' here, we will get pTeX-3.1.10
make ptex.ch

#Compile of e-pTeX.
#We have already etex-sysdep.ch.
cp ../etexdir/etex.ch .
patch -p0 < etex.diff
patch -p0 < ep1.diff
patch -p0 < pconvert.diff
../tie -m eptex.web ptex.web ptex.ch etex.ch etex-sysdep.ch fp-mpfr.ch
../tangle eptex
./pconvert eptex
$CC $LDFLAGS $CFLAGS -o eptex texini.c tex0.c tex1.c tex2.c tex3.c \
ptexextra.c kanji.c eptex-fp.c version.c usage.c  ../lib/lib.a \
../../kpathsea/.libs/libkpathsea.a -lm -lmpfr 

ls -l eptex
