Clean up the YACCing. I don't know why we cannot leave the .y's as .y's.
So lets see if doing so causes anyone trouble. Also use make(1)'s assistance in using the right file. It knows the dependency, so lets just ask it.
This commit is contained in:
parent
a4eb3368ee
commit
cbe6bf4aef
@ -23,12 +23,10 @@ LDADD+= ${LIBCC_INT}
|
||||
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
|
||||
${.ALLSRC} > 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
|
||||
CLEANFILES+= c-parse.c c-parse.h c-parse.y # insurance
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
|
@ -23,13 +23,11 @@ LDADD+= ${LIBCC_INT}
|
||||
objc-parse.c c-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
|
||||
${.ALLSRC} > objc-parse.y
|
||||
${YACC} -d -o objc-parse.c objc-parse.y
|
||||
mv objc-parse.h c-parse.h
|
||||
mv objc-parse.y objc-parse.y.out
|
||||
|
||||
CLEANFILES+= objc-parse.c c-parse.h \
|
||||
objc-parse.y objc-parse.y.out # insurance
|
||||
CLEANFILES+= objc-parse.c c-parse.h objc-parse.y # insurance
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
|
@ -20,7 +20,7 @@ LDADD+= ${LIBCC_INT}
|
||||
|
||||
.ORDER: parse.c parse.h
|
||||
parse.c parse.h: parse.y
|
||||
${YACC} -d -o parse.c ${GCCDIR}/cp/parse.y
|
||||
${YACC} -d -o parse.c ${.ALLSRC}
|
||||
grep '^#define[ ]*YYEMPTY' parse.c >>parse.h
|
||||
|
||||
CLEANFILES+= parse.c parse.h
|
||||
|
Loading…
Reference in New Issue
Block a user