aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/generic/mkpkg.sh
blob: 5ab35c4d587c6a4144edf41efea9573c737e7630 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Bootstrap the generic preprocessor.  The -lln library is not used to avoid
# the enternal dependency.  The sed script is used to edit certain nonportable
# constructs in the LEX code, and the filename lex.yy.c is changed to lexyy.c
# for portability reasons.

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

$CC -c $HSI_CF	generic.c chario.c yywrap.c
$CC $HSI_LF	generic.o lexyy.o chario.o yywrap.o $HSI_LIBS -o generic.e
mv -f		generic.e ../../hlib
rm		*.o