From 987afe2a2faf1ffef6088a3697f2dd65ebef09ea Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Fri, 6 Mar 1998 06:48:39 +0000 Subject: [PATCH] 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. --- share/mk/bsd.prog.mk | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 2b05859e3cc3..d1fe6d4317a8 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 + +.if defined(PROG) && !exists(${DEPENDFILE}) +${OBJS}: ${DPSRCS} +.endif + .include