From 54e6aeb25dd5e42c0162ba4f093198fa3fc6844a Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Mon, 24 Jan 2000 09:17:09 +0000 Subject: [PATCH] Simply cc_tools/Makefile by moving the parser generation to the respective backends. --- gnu/usr.bin/cc/cc1/Makefile | 19 ++++++++++++++++++- gnu/usr.bin/cc/cc1obj/Makefile | 20 ++++++++++++++++++-- gnu/usr.bin/cc/cc_tools/Makefile | 32 -------------------------------- 3 files changed, 36 insertions(+), 35 deletions(-) diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile index b22524a7ebd..1a4e72fe16c 100644 --- a/gnu/usr.bin/cc/cc1/Makefile +++ b/gnu/usr.bin/cc/cc1/Makefile @@ -5,14 +5,31 @@ .PATH: ../cc_tools ${GCCDIR} PROG= cc1 -SRCS= c-parse.c \ +SRCS= c-parse.c c-parse.h \ c-aux-info.c c-common.c c-convert.c c-decl.c c-iterate.c c-lang.c \ c-lex.c c-pragma.c c-typeck.c BINDIR= /usr/libexec NOMAN= 1 NOSHARED=yes +CFLAGS+= -I. + DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} +#----------------------------------------------------------------------- +# C parser +.ORDER: c-parse.c c-parse.h +c-parse.c c-parse.h: c-parse.in + sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ + -e "/^ifc$$/d" -e "/^end ifc$$/d" \ + ${GCCDIR}/c-parse.in > c-parse.y + ${YACC} -d -o c-parse.c c-parse.y + mv c-parse.y c-parse.y.out + +CLEANFILES+= c-parse.c c-parse.h \ + c-parse.y c-parse.y.out # insurance + +#----------------------------------------------------------------------- + .include diff --git a/gnu/usr.bin/cc/cc1obj/Makefile b/gnu/usr.bin/cc/cc1obj/Makefile index 1251e6c240c..f88f9f26c6e 100644 --- a/gnu/usr.bin/cc/cc1obj/Makefile +++ b/gnu/usr.bin/cc/cc1obj/Makefile @@ -5,7 +5,7 @@ .PATH: ../cc_tools ${GCCDIR}/objc ${GCCDIR} PROG= cc1obj -SRCS= objc-parse.c objc-act.c +SRCS= objc-parse.c objc-parse.h objc-act.c # Ugh, compiled twice... SRCS+= c-aux-info.c c-common.c c-convert.c c-decl.c c-iterate.c c-lex.c \ c-pragma.c c-typeck.c @@ -13,9 +13,25 @@ BINDIR= /usr/libexec NOMAN= 1 NOSHARED=yes -CFLAGS+= -I${GCCDIR}/objc +CFLAGS+= -I${GCCDIR}/objc -I. DPADD+= ${LIBCC_INT} LDADD+= ${LIBCC_INT} +#----------------------------------------------------------------------- +# objc parser +.ORDER: objc-parse.c objc-parse.h +objc-parse.c objc-parse.h: c-parse.in + sed -e "/^ifc$$/,/^end ifc$$/d" \ + -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \ + ${GCCDIR}/c-parse.in > objc-parse.y + ${YACC} -d -o objc-parse.c objc-parse.y + ln -sf objc-parse.h c-parse.h + mv objc-parse.y objc-parse.y.out + +CLEANFILES+= objc-parse.c objc-parse.h c-parse.h \ + objc-parse.y objc-parse.y.out # insurance + +#----------------------------------------------------------------------- + .include diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index c7f4afdbad9..ecfb6b0cfed 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -17,8 +17,6 @@ CFLAGS+= -I. .PATH: ${GCCDIR} ${GCCDIR}/cp -CFLAGS+= -I${GCCDIR}/objc - #----------------------------------------------------------------------- # insn-* gunk @@ -98,36 +96,6 @@ tree-check.h: gencheck ./gencheck > ${.TARGET} GENSRCS+= tree-check.h -#----------------------------------------------------------------------- -# C parser -.ORDER: c-parse.c c-parse.h -c-parse.c c-parse.h: c-parse.in - sed -e "/^ifobjc$$/,/^end ifobjc$$/d" \ - -e "/^ifc$$/d" -e "/^end ifc$$/d" \ - ${GCCDIR}/c-parse.in > c-parse.y - ${YACC} -d -o c-parse.c c-parse.y - mv c-parse.y c-parse.y.out - -GENSRCS+= c-parse.c c-parse.h -CLEANFILES+= c-parse.y c-parse.y.out # insurance - -#----------------------------------------------------------------------- -# objc parser -.ORDER: objc-parse.c objc-parse.h -objc-parse.c objc-parse.h: c-parse.in - sed -e "/^ifc$$/,/^end ifc$$/d" \ - -e "/^ifobjc$$/d" -e "/^end ifobjc$$/d" \ - ${GCCDIR}/c-parse.in > objc-parse.y - ${YACC} -d -o objc-parse.c objc-parse.y - mv objc-parse.y objc-parse.y.out - -GENSRCS+= objc-parse.c objc-parse.h -CLEANFILES+= objc-parse.y objc-parse.y.out # insurance - -#----------------------------------------------------------------------- -# C++ parser done in its own makefile -#----------------------------------------------------------------------- -# CPP parser done in its own makefile #----------------------------------------------------------------------- # the host/target compiler config.