Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Aug 2003 11:18:13 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        "Daniel C. Sobral" <dcs@tcoip.com.br>
Cc:        Andre Guibert de Bruet <andy@siliconlandmark.com>
Subject:   Re: bsd.prog.mk duplicate script for target "loader"
Message-ID:  <XFMail.20030819111813.jhb@FreeBSD.org>
In-Reply-To: <3F423213.9040100@tcoip.com.br>

next in thread | previous in thread | raw e-mail | index | archive | help

On 19-Aug-2003 Daniel C. Sobral wrote:
> It has been so for ever, and it has been producing the warning (which it 
> wasn't before because of a make(1) bug) for a while now. Known issue, 
> make experts are idly scratching their heads while they ponder a 
> solution. :-)

Gross hack:

Index: bsd.prog.mk
===================================================================
RCS file: /usr/cvs/src/share/mk/bsd.prog.mk,v
retrieving revision 1.131
diff -u -r1.131 bsd.prog.mk
--- bsd.prog.mk 29 Jun 2003 18:16:26 -0000      1.131
+++ bsd.prog.mk 19 Aug 2003 14:40:28 -0000
@@ -31,11 +31,13 @@
 
 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
 
+.if !target(${PROG})
 ${PROG}: ${OBJS}
 .if defined(PROG_CXX)
        ${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
 .else
        ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
+.endif
 .endif
 
 .else !defined(SRCS)

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030819111813.jhb>