summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2017-07-05 13:31:41 +0000
committerMarc Espie <espie@cvs.openbsd.org>2017-07-05 13:31:41 +0000
commit9747ac344faa5ecdca9f0699a1d3a2d388e719bc (patch)
treecf2dd098719e8042982e5197ed8864ad03a7dfec
parent863c550c80b957671808eab92c48cc4f69c3b5f5 (diff)
make use of (f)lex -o option to create unique temporary files, so that
make -j will be happier. okay millert@
-rw-r--r--share/mk/bsd.sys.mk15
-rw-r--r--share/mk/sys.mk19
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: