@Rem Do not turn echo off so they will see what is going on
copy language\english\msgs.h msgs.h > nul
copy pc\local.djgpp local.h > nul
copy config.X config.h > nul
echo /* AUTOMATICALLY-GENERATED SYMBOLS */ >> config.h
echo #define SIGNAL_TYPE_STRING "void" >> config.h
echo #define MASKTYPE_STRING "long" >> config.h
@Rem
@Rem Use the following Goto when you only change a few source
@Rem files and do not want to recompile all of them
:: goto build
gcc -c -O2 -g buildhas.c
gcc -c -O2 -g correct.c
gcc -c -O2 -g defmt.c
gcc -c -O2 -g dump.c
gcc -c -O2 -g fields.c
gcc -c -O2 -g good.c
gcc -c -O2 -g hash.c
gcc -c -O2 -g icombine.c
gcc -c -O2 -g ijoin.c
gcc -c -O2 -g ispell.c
gcc -c -O2 -g lookup.c
gcc -c -O2 -g makedent.c
gcc -c -O2 -g sq.c
gcc -c -O2 -g term.c
gcc -c -O2 -g tgood.c
gcc -c -O2 -g tree.c
gcc -c -O2 -g unsq.c
gcc -c -O2 -g xgets.c
bison -y parse.y
gcc -c -O2 -g y_tab.c -o parse.o
if exist y_tab.c del y_tab.c
gcc -o buildhash buildhash.o hash.o makedent.o parse.o
gcc -o icombine icombine.o makedent.o parse.o
gcc -o ijoin ijoin.o fields.o
gcc -o sq sq.o
gcc -o unsq unsq.o
:build
@echo ispell.o term.o correct.o defmt.o dump.o good.o > link.lst
@echo lookup.o hash.o makedent.o tgood.o tree.o xgets.o >> link.lst
gcc -o ispell @link.lst
@del link.lst
@Rem
@Rem Strip the .exe but leave the COFF output with debug info
strip *.exe
