aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cc/cc1/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/cc/cc1/Makefile')
-rw-r--r--gnu/usr.bin/cc/cc1/Makefile21
1 files changed, 11 insertions, 10 deletions
diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile
index 2dc48a0f5f20c..09a89b59a6d9e 100644
--- a/gnu/usr.bin/cc/cc1/Makefile
+++ b/gnu/usr.bin/cc/cc1/Makefile
@@ -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>