Index: share/mk/bsd.suffixes-posix.mk =================================================================== --- share/mk/bsd.suffixes-posix.mk +++ share/mk/bsd.suffixes-posix.mk @@ -26,20 +26,17 @@ ${FC} ${FFLAGS} -c ${.IMPSRC} .y.o: - ${YACC} ${YFLAGS} ${.IMPSRC} - ${CC} ${CFLAGS} -c y.tab.c - rm -f y.tab.c - mv y.tab.o ${.TARGET} + ${YACC} ${YFLAGS} -o ${.PREFIX}.y.tab.c ${.IMPSRC} + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.PREFIX}.y.tab.c + rm -f ${.PREFIX}.y.tab.c .l.o: - ${LEX} ${LFLAGS} ${.IMPSRC} - ${CC} ${CFLAGS} -c lex.yy.c - rm -f lex.yy.c - mv lex.yy.o ${.TARGET} + ${LEX} ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.lex.yy.c + ${CC} ${CFLAGS} -c -o ${.TARGET} ${.PREFIX}.lex.yy.c + rm -f ${.PREFIX}.lex.yy.c .y.c: - ${YACC} ${YFLAGS} ${.IMPSRC} - mv y.tab.c ${.TARGET} + ${YACC} ${YFLAGS} -o ${.TARGET} ${.IMPSRC} .l.c: ${LEX} ${LFLAGS} ${.IMPSRC} Index: share/mk/bsd.suffixes.mk =================================================================== --- share/mk/bsd.suffixes.mk +++ share/mk/bsd.suffixes.mk @@ -66,11 +66,10 @@ ${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC} ${CTFCONVERT_CMD} -# XXX not -j safe .y.o: - ${YACC} ${YFLAGS} ${.IMPSRC} - ${CC} ${CFLAGS} -c y.tab.c -o ${.TARGET} - rm -f y.tab.c + ${YACC} ${YFLAGS} -o ${.PREFIX}.y.tab.c${.IMPSRC} + ${CC} ${CFLAGS} -c ${.PREFIX}.y.tab.c -o ${.TARGET} + rm -f ${.PREFIX}.y.tab.c ${CTFCONVERT_CMD} .l.o: @@ -79,10 +78,8 @@ rm -f ${.PREFIX}.tmp.c ${CTFCONVERT_CMD} -# XXX not -j safe .y.c: - ${YACC} ${YFLAGS} ${.IMPSRC} - mv y.tab.c ${.TARGET} + ${YACC} ${YFLAGS} -o ${.TARGET} ${.IMPSRC} .l.c: ${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.TARGET}