summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-03-06 06:48:39 +0000
committerbde <bde@FreeBSD.org>1998-03-06 06:48:39 +0000
commit02ba4c143f5f16e1a23a60fb48340159c0d19e95 (patch)
treebfafb06a8900833a7c38c90093df426d4b0bf1f4 /share
parent54476b582e84b4588984ab56c00682dbce10f3b5 (diff)
downloadFreeBSD-src-02ba4c143f5f16e1a23a60fb48340159c0d19e95.zip
FreeBSD-src-02ba4c143f5f16e1a23a60fb48340159c0d19e95.tar.gz
Fixed dependency of ${PROG} on ${DPSRCS}. There were various races
for `make -j'. There are one-off fixes for the problem in a few Makefiles, e.g., amd/amq/Makefile.
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.prog.mk11
1 files changed, 8 insertions, 3 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk
index 2b05859..d1fe6d4 100644
--- a/share/mk/bsd.prog.mk
+++ b/share/mk/bsd.prog.mk
@@ -1,5 +1,5 @@
# from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
-# $Id: bsd.prog.mk,v 1.62 1998/02/19 14:53:29 eivind Exp $
+# $Id: bsd.prog.mk,v 1.63 1998/02/25 02:56:58 bde Exp $
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
@@ -30,7 +30,7 @@ LDFLAGS+= -static
DPSRCS+= ${SRCS:M*.h}
OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
-${PROG}: ${DPSRCS} ${OBJS}
+${PROG}: ${OBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD}
.else !defined(SRCS)
@@ -45,7 +45,7 @@ SRCS= ${PROG}.c
# - it's useful to keep objects around for crunching.
OBJS= ${PROG}.o
-${PROG}: ${DPSRCS} ${OBJS}
+${PROG}: ${OBJS}
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD}
.endif
@@ -151,4 +151,9 @@ all-man:
.endif
.include <bsd.dep.mk>
+
+.if defined(PROG) && !exists(${DEPENDFILE})
+${OBJS}: ${DPSRCS}
+.endif
+
.include <bsd.obj.mk>
OpenPOWER on IntegriCloud