From 14e0d39582061dc0b86809aea4ed717936226485 Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 5 Jul 2017 13:31:40 +0000 Subject: [PATCH] make use of (f)lex -o option to create unique temporary files, so that make -j will be happier. okay millert@ --- share/mk/bsd.sys.mk | 15 +-------------- share/mk/sys.mk | 19 +++++++++---------- 2 files changed, 10 insertions(+), 24 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index b1af201eb65..c6be303b5a5 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.sys.mk,v 1.11 2017/07/01 14:41:54 espie Exp $ +# $OpenBSD: bsd.sys.mk,v 1.12 2017/07/05 13:31:40 espie Exp $ # $NetBSD: bsd.sys.mk,v 1.2 1995/12/13 01:25:07 cgd Exp $ # # Overrides used for OpenBSD source tree builds. @@ -11,19 +11,6 @@ CXXFLAGS+= -idirafter ${DESTDIR}/usr/include/g++ .endif .if defined(PARALLEL) -# Lex -.l: - ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC} - ${LINK.c} -o ${.TARGET} ${.TARGET:R}.yy.c ${LDLIBS} -ll - rm -f ${.TARGET:R}.yy.c -.l.c: - ${LEX.l} -o${.TARGET} ${.IMPSRC} -.l.o: - ${LEX.l} -o${.TARGET:R}.yy.c ${.IMPSRC} - ${COMPILE.c} -o ${.TARGET} ${.TARGET:R}.yy.c - rm -f ${.TARGET:R}.yy.c - if test -f ${.TARGET:R}.d; then sed -i -e 's,${.TARGET:R}.yy.c,${.IMPSRC},' ${.TARGET:R}.d; fi - # Yacc .y: ${YACC.y} -b ${.TARGET:R} ${.IMPSRC} diff --git a/share/mk/sys.mk b/share/mk/sys.mk index c72a44d8eb1..4c050241f5a 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -1,4 +1,4 @@ -# $OpenBSD: sys.mk,v 1.78 2017/07/01 14:41:54 espie Exp $ +# $OpenBSD: sys.mk,v 1.79 2017/07/05 13:31:40 espie Exp $ # $NetBSD: sys.mk,v 1.27 1996/04/10 05:47:19 mycroft Exp $ # @(#)sys.mk 5.11 (Berkeley) 3/13/91 @@ -185,17 +185,16 @@ CTAGS?= /usr/bin/ctags # Lex .l: - ${LEX.l} ${.IMPSRC} - ${LINK.c} -o ${.TARGET} lex.yy.c ${LDLIBS} -ll - rm -f lex.yy.c + ${LEX.l} -o lex.${.PREFIX}.c ${.IMPSRC} + ${LINK.c} -o ${.TARGET} lex.${.PREFIX}.c ${LDLIBS} -ll + rm -f lex.${.PREFIX}.c .l.c: - ${LEX.l} ${.IMPSRC} - mv lex.yy.c ${.TARGET} + ${LEX.l} -o ${.TARGET} ${.IMPSRC} .l.o: - ${LEX.l} ${.IMPSRC} - ${COMPILE.c} -o ${.TARGET} lex.yy.c - rm -f lex.yy.c - if test -f ${.TARGET:R}.d; then sed -i -e 's,lex.yy.c,${.IMPSRC},' ${.TARGET:R}.d; fi + ${LEX.l} -o lex.${.PREFIX}.c ${.IMPSRC} + ${COMPILE.c} -c lex.${.PREFIX}.c + rm -f lex.${.PREFIX}.c + if test -f ${.TARGET:R}.d; then sed -i -e 's,lex.${.PREFIX}.lex.c,${.IMPSRC},' ${.TARGET:R}.d; fi # Yacc .y: -- 2.20.1