summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-04-10 01:48:47 +0000
committerobrien <obrien@FreeBSD.org>2002-04-10 01:48:47 +0000
commit64abb46d2e248eda42bb3af71d4f02eb6cae14f0 (patch)
treea8ca62a3ca38c0f1319ce986179eaf68efd8f398 /gnu/usr.bin
parentc321804c50290463e606adfa0ddc83596b6f2490 (diff)
downloadFreeBSD-src-64abb46d2e248eda42bb3af71d4f02eb6cae14f0.zip
FreeBSD-src-64abb46d2e248eda42bb3af71d4f02eb6cae14f0.tar.gz
Change YACCing.
Submited by: ru
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cc/cc1/Makefile13
-rw-r--r--gnu/usr.bin/cc/cc1obj/Makefile14
-rw-r--r--gnu/usr.bin/cc/cc1plus/Makefile11
3 files changed, 16 insertions, 22 deletions
diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile
index 3da1a6b..210cf15 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= c-parse.c c-parse.h c-lang.c
+SRCS= c-parse.y c-lang.c
# Ugh, compiled twice...
SRCS+= c-decl.c c-lex.c
BINDIR= /usr/libexec
@@ -19,16 +19,13 @@ LDADD+= ${LIBCC_INT}
#-----------------------------------------------------------------------
# C parser
-.ORDER: c-parse.c c-parse.h
-c-parse.c c-parse.h: c-parse.in
+c-parse.y: c-parse.in
sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \
-e "/^ifc$$/d" \
-e "/^end ifc$$/d" \
- ${.ALLSRC} > c-parse.y
- ${YACC} -d -o c-parse.c c-parse.y
-
-CLEANFILES+= c-parse.c c-parse.h c-parse.y # insurance
+ ${.ALLSRC} > ${.TARGET}
+CLEANFILES+= c-parse.y
#-----------------------------------------------------------------------
.include <bsd.prog.mk>
diff --git a/gnu/usr.bin/cc/cc1obj/Makefile b/gnu/usr.bin/cc/cc1obj/Makefile
index 9ffbd03..567b566 100644
--- a/gnu/usr.bin/cc/cc1obj/Makefile
+++ b/gnu/usr.bin/cc/cc1obj/Makefile
@@ -2,10 +2,10 @@
.include "../Makefile.inc"
-.PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR}
+.PATH: ${GCCDIR}/objc ${GCCDIR}
PROG= cc1obj
-SRCS= objc-parse.c c-parse.h objc-act.c
+SRCS= c-parse.y objc-act.c
# Ugh, compiled twice...
SRCS+= c-decl.c c-lex.c
BINDIR= /usr/libexec
@@ -19,16 +19,14 @@ LDADD+= ${LIBCC_INT}
#-----------------------------------------------------------------------
# objc parser
-.ORDER: objc-parse.c c-parse.h
-objc-parse.c c-parse.h: c-parse.in
+
+c-parse.y: c-parse.in
sed -e "/^ifc$$/,/^end ifc$$/d" \
-e "/^ifobjc$$/d" \
-e "/^end ifobjc$$/d" \
- ${.ALLSRC} > objc-parse.y
- ${YACC} -d -o objc-parse.c objc-parse.y
- mv objc-parse.h c-parse.h
+ ${.ALLSRC} > ${.TARGET}
-CLEANFILES+= objc-parse.c c-parse.h objc-parse.y # insurance
+CLEANFILES+= c-parse.y
#-----------------------------------------------------------------------
diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile
index 7b95f4d..30ab06e 100644
--- a/gnu/usr.bin/cc/cc1plus/Makefile
+++ b/gnu/usr.bin/cc/cc1plus/Makefile
@@ -5,7 +5,7 @@
.PATH: ${GCCDIR}/cp
PROG= cc1plus
-SRCS= parse.c parse.h
+SRCS= parse.y y.tab.h parse.h
SRCS+= call.c class.c cvt.c decl.c decl2.c errfn.c error.c except.c expr.c \
friend.c init.c lex.c method.c pt.c ptree.c repo.c rtti.c \
search.c semantics.c sig.c spew.c tree.c typeck.c typeck2.c xref.c
@@ -18,12 +18,11 @@ CFLAGS+= -I${GCCDIR}/cp -I.
DPADD+= ${LIBCC_INT}
LDADD+= ${LIBCC_INT}
-.ORDER: parse.c parse.h
-parse.c parse.h: parse.y
- ${YACC} -d -o parse.c ${.ALLSRC}
- grep '^#define[ ]*YYEMPTY' parse.c >>parse.h
+parse.h: y.tab.h parse.c
+ cp -p y.tab.h ${.TARGET}
+ grep '^#define[ ]*YYEMPTY' parse.c >>${.TARGET}
-CLEANFILES+= parse.c parse.h
+CLEANFILES+= parse.h
CPPHDRS= exception new new.h typeinfo
OpenPOWER on IntegriCloud