mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Simply cc_tools/Makefile by moving the parser generation to the respective
backends.
This commit is contained in:
parent
e7ecd20e12
commit
54e6aeb25d
3 changed files with 36 additions and 35 deletions
|
|
@ -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 <bsd.prog.mk>
|
||||
|
|
|
|||
|
|
@ -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 <bsd.prog.mk>
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue