1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-17 15:27:36 +00:00

Restore some of the implementation from the Bmake gcc 2.95 bits.

In the end, I can do things more like the previous Bmake bits than was
apparent in the middle of the gcc31 WIP.
This commit is contained in:
David E. O'Brien 2002-05-13 03:27:03 +00:00
parent 26a9c7b7e1
commit 6677f3e022
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96488
6 changed files with 59 additions and 51 deletions

View File

@ -2,10 +2,10 @@
.include "../Makefile.inc"
.PATH: ../cc_tools ${GCCDIR}
.PATH: ${GCCDIR}
PROG= cc1
SRCS= main.c c-parse.c c-lang.c c-decl.c
SRCS= main.c c-parse+%DIKED.c c-lang.c c-decl.c
BINDIR= /usr/libexec
NOMAN= 1
NOSHARED?=yes
@ -17,17 +17,18 @@ LDADD+= ${LIBCC_INT}
#-----------------------------------------------------------------------
# C parser
.ORDER: c-parse.c
c-parse.c: c-parse.in
c-parse+%DIKED.c: c-parse.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
c-parse.y: c-parse.in
sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
-e "/^ifc$$/d" \
-e "/^end ifc$$/d" \
${GCCDIR}/c-parse.in > c-parse.y
${YACC} -o c-parse.c.in c-parse.y
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
c-parse.c.in >c-parse.c
${.ALLSRC} > ${.TARGET}
CLEANFILES= c-parse.c c-parse.y
CLEANFILES= c-parse+%DIKED.c c-parse.c c-parse.y
CLEANFILES+= y.tab.h # we don't use it, but the system YACC rules are naive
.include <bsd.prog.mk>

View File

@ -2,10 +2,10 @@
.include "../Makefile.inc"
.PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR}
.PATH: ${GCCDIR}/objc ${GCCDIR}
PROG= cc1obj
SRCS= objc-parse.c objc-act.c objc-lang.c main.c c-decl.c
SRCS= objc-parse+DIKED.c objc-act.c objc-lang.c main.c c-decl.c
BINDIR= /usr/libexec
NOMAN= 1
NOSHARED?=yes
@ -17,18 +17,19 @@ LDADD+= ${LIBCC_INT}
#-----------------------------------------------------------------------
# objc parser
.ORDER: objc-parse.c
objc-parse.c: c-parse.in
objc-parse+DIKED.c: objc-parse.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
objc-parse.y: c-parse.in
sed -e "/^ifc$$/,/^end ifc$$/d" \
-e "/^ifobjc$$/d" \
-e "/^end ifobjc$$/d" \
${GCCDIR}/c-parse.in > objc-parse.y
${YACC} -o objc-parse.c.in objc-parse.y
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
objc-parse.c.in >objc-parse.c
${.ALLSRC} > ${.TARGET}
CLEANFILES= objc-parse.c objc-parse.y
CLEANFILES= objc-parse+DIKED.c objc-parse.c objc-parse.y
CLEANFILES+= y.tab.h # we don't use it, but the system YACC rules are naive
#-----------------------------------------------------------------------

View File

@ -5,11 +5,11 @@
.PATH: ${GCCDIR}/cp ${GCCDIR}
PROG= cc1plus
SRCS= parse-%DIKED.c parse.h 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 \
search.c semantics.c spew.c tree.c typeck.c typeck2.c dump.c optimize.c
SRCS= parse+%DIKED.c parse.h cfns.h
SRCS+= main.c cp-lang.c \
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 search.c \
semantics.c spew.c tree.c typeck.c typeck2.c dump.c optimize.c
BINDIR= /usr/libexec
NOMAN= 1
@ -20,9 +20,10 @@ CFLAGS+= -I${GCCDIR}/cp -I.
DPADD+= ${LIBCC_INT}
LDADD+= ${LIBCC_INT}
CLEANFILES= parse-%DIKED.c parse.c parse.h y.tab.h cfns.h
#-----------------------------------------------------------------------
# C++ parser
parse-%DIKED.c y.tab.h: parse.c
parse+%DIKED.c y.tab.h: parse.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC:M*c} > ${.TARGET}
@ -35,4 +36,6 @@ cfns.h: cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' \
${.ALLSRC} > ${.TARGET}
CLEANFILES= parse+%DIKED.c parse.c parse.h y.tab.h cfns.h
.include <bsd.prog.mk>

View File

@ -5,7 +5,7 @@
.PATH: ${GCCDIR}
PROG= cpp0
SRCS= cppmain.c c-parse.c c-lang.c c-decl.c
SRCS= cppmain.c c-parse+%DIKED.c c-lang.c c-decl.c
BINDIR= /usr/libexec
NOMAN= 1
@ -16,18 +16,20 @@ LDADD+= ${LIBCC_INT}
#-----------------------------------------------------------------------
# C parser
.ORDER: c-parse.c
c-parse.c: c-parse.in
c-parse+%DIKED.c: c-parse.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
c-parse.y: c-parse.in
sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
-e "/^ifc$$/d" \
-e "/^end ifc$$/d" \
${GCCDIR}/c-parse.in > c-parse.y
${YACC} -o c-parse.c.in c-parse.y
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
c-parse.c.in >c-parse.c
${.ALLSRC} > ${.TARGET}
CLEANFILES= c-parse.c c-parse.y
CLEANFILES= c-parse+%DIKED.c c-parse.c c-parse.y
CLEANFILES+= y.tab.h # we don't use it, but the system YACC rules are naive
#-----------------------------------------------------------------------

View File

@ -5,7 +5,7 @@
.PATH: ${GCCDIR}
PROG= cpp0
SRCS= cppmain.c c-parse.c c-lang.c c-decl.c
SRCS= cppmain.c c-parse+%DIKED.c c-lang.c c-decl.c
BINDIR= /usr/libexec
NOMAN= 1
@ -16,18 +16,20 @@ LDADD+= ${LIBCC_INT}
#-----------------------------------------------------------------------
# C parser
.ORDER: c-parse.c
c-parse.c: c-parse.in
c-parse+%DIKED.c: c-parse.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
${.ALLSRC} > ${.TARGET}
c-parse.y: c-parse.in
sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
-e "/^ifc$$/d" \
-e "/^end ifc$$/d" \
${GCCDIR}/c-parse.in > c-parse.y
${YACC} -o c-parse.c.in c-parse.y
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
c-parse.c.in >c-parse.c
${.ALLSRC} > ${.TARGET}
CLEANFILES= c-parse.c c-parse.y
CLEANFILES= c-parse+%DIKED.c c-parse.c c-parse.y
CLEANFILES+= y.tab.h # we don't use it, but the system YACC rules are naive
#-----------------------------------------------------------------------

View File

@ -5,20 +5,19 @@
.PATH: ${GCCDIR}
PROG= tradcpp0
SRCS= tradcpp.c tradcif.c
SRCS= tradcpp.c tradcif+%DIKED.c
BINDIR= /usr/libexec
NOMAN= 1
DPADD+= ${LIBCC_INT}
LDADD+= ${LIBCC_INT}
# ${YACC} ${GCCDIR}/tradcif.y
tradcif.c: tradcif.y
${YACC} ${.ALLSRC}
tradcif+%DIKED.c: tradcif.c
sed -e "s/malloc/xmalloc/g" \
-e "s/realloc/xrealloc/g" \
y.tab.c >${.TARGET}
${.ALLSRC} >${.TARGET}
CLEANFILES= y.tab.c tradcif.c
CLEANFILES= tradcif+%DIKED.c tradcif.c
CLEANFILES+= y.tab.h # we don't use it, but the system YACC rules are naive
.include <bsd.prog.mk>