mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-18 22:33:39 +00:00
Make the YACC'ing more bullet proof.
This commit is contained in:
parent
baef823236
commit
672528fa3d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/cvs2svn/branches/WIP_GCC31/; revision=96142
|
@ -5,7 +5,7 @@
|
|||
.PATH: ${GCCDIR}/cp ${GCCDIR}
|
||||
|
||||
PROG= cc1plus
|
||||
SRCS= parse.c cfns.h
|
||||
SRCS= parse.y cfns.h
|
||||
SRCS+= main.c cp-lang.c
|
||||
SRCS+= call.c class.c cvt.c decl.c decl2.c error.c except.c expr.c \
|
||||
friend.c init.c lex.c mangle.c method.c pt.c ptree.c repo.c rtti.c \
|
||||
|
@ -20,14 +20,18 @@ CFLAGS+= -I${GCCDIR}/cp -I.
|
|||
DPADD+= ${LIBCC_INT}
|
||||
LDADD+= ${LIBCC_INT}
|
||||
|
||||
.ORDER: parse.c
|
||||
CLEANFILES+= parse.c parse.h y.tab.c y.tab.h cfns.h
|
||||
|
||||
.ORDER: parse.c parse.h
|
||||
parse.c: parse.y
|
||||
${YACC} -o parse.c.in ${.ALLSRC}
|
||||
${YACC} ${YFLAGS} ${GCCDIR}/cp/${.TARGET:S/c$/y/}
|
||||
sed -e "s/malloc/xmalloc/g" \
|
||||
-e "s/realloc/xrealloc/g" \
|
||||
parse.c.in >parse.c
|
||||
y.tab.c >${.TARGET}
|
||||
|
||||
CLEANFILES+= parse.c cfns.h
|
||||
parse.h: parse.c y.tab.h
|
||||
cp -pf y.tab.h ${.TARGET}
|
||||
grep '^#define[ ]*YYEMPTY' ${.TARGET:S/h$/c/} >>${.TARGET}
|
||||
|
||||
cfns.h:
|
||||
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \
|
||||
|
|
Loading…
Reference in a new issue