Re: bsd.prog.mk duplicate script for target "loader"

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Tue, 19 Aug 2003 11:18:13 -0400 (EDT)
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
_at__at_ -31,11 +31,13 _at__at_
 
 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_at_FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/
Received on Tue Aug 19 2003 - 06:17:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:19 UTC