#!/bin/sh -f

# Make the first pass (XPP) of the SPP language compiler.

find xpp.l -newer lexyy.c -exec rm lexyy.c \;
if test -f lexyy.c; then\
    $CC -c -g $HSI_CF lexyy.c;\
else\
    lex	-l xpp.l;\
    sed -f lex.sed lex.yy.c > lexyy.c;  rm lex.yy.c;\
    $CC -c -g $HSI_CF lexyy.c;\
fi

$CC -c -g $HSI_CF	xppmain.c xppcode.c decl.c
$CC $HSI_LF	-g xppmain.o lexyy.o xppcode.o decl.o $HSI_LIBS /iraf/iraf/unix/bin/libf2c.a -o xpp.e -lm
cp		xpp.e /iraf/iraf/unix/bin.macintel/
#mv -f		xpp.e ../../../hlib
#rm		*.o
