summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cc/cpp0
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2002-05-13 03:27:03 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2002-05-13 03:27:03 +0000
commit6677f3e022fdb01b8e13baf1705ab3024684c91e (patch)
tree6eea9fac75fc54638a3a34609d1dc66e991cd2a2 /gnu/usr.bin/cc/cpp0
parent26a9c7b7e1e82804f3da47e90ec13ac67f727a27 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/cc/cpp0')
-rw-r--r--gnu/usr.bin/cc/cpp0/Makefile20
1 files changed, 11 insertions, 9 deletions
diff --git a/gnu/usr.bin/cc/cpp0/Makefile b/gnu/usr.bin/cc/cpp0/Makefile
index a63467d8ac0e..eb0bc72b28b1 100644
--- a/gnu/usr.bin/cc/cpp0/Makefile
+++ b/gnu/usr.bin/cc/cpp0/Makefile
@@ -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
#-----------------------------------------------------------------------