fix thinko: test for the existance of the target before we define it...

This commit is contained in:
christos 2001-01-14 09:53:57 +00:00
parent 6695531e85
commit c4a3a5ddb2
1 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.prog.mk,v 1.125 2001/01/14 09:40:35 christos Exp $
# $NetBSD: bsd.prog.mk,v 1.126 2001/01/14 09:53:57 christos Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.if !target(__initialized__)
@ -119,17 +119,20 @@ LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
.if defined(OBJS) && !empty(OBJS)
.NOPATH: ${OBJS}
.if !target(${PROG})
__addcmds=yes
.endif
.if defined(DESTDIR)
${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
.if !target(${PROG})
.if defined(__addcmds)
${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -Wl,-rpath-link,${DESTDIR}/usr/lib ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -L${DESTDIR}/usr/lib -lgcc -lc -lgcc ${LIBCRTEND}
.endif
.else
${PROG}: ${LIBCRT0} ${DPSRCS} ${OBJS} ${LIBC} ${LIBCRTBEGIN} ${LIBCRTEND} ${DPADD}
.if !target(${PROG})
.if defined(__addcmds)
${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
.endif