From owner-freebsd-arch Thu Jan 9 4:28:57 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 414DF37B401 for ; Thu, 9 Jan 2003 04:28:56 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FB0943ED8 for ; Thu, 9 Jan 2003 04:28:55 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id XAA03119; Thu, 9 Jan 2003 23:28:39 +1100 Date: Thu, 9 Jan 2003 23:29:18 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Dag-Erling Smorgrav Cc: arch@FreeBSD.ORG Subject: Re: small bsd.prog.mk change In-Reply-To: Message-ID: <20030109225032.R16405-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 9 Jan 2003, Dag-Erling Smorgrav wrote: > The attached patch prevents the following warning which occurs when > building the loader: > > "/usr/share/mk/bsd.prog.mk", line 37: warning: duplicate script for target "loader" ignored % Index: bsd.prog.mk % =================================================================== % RCS file: /home/ncvs/src/share/mk/bsd.prog.mk,v % retrieving revision 1.129 % diff -u -r1.129 bsd.prog.mk % --- bsd.prog.mk 17 Oct 2002 13:48:13 -0000 1.129 % +++ bsd.prog.mk 9 Jan 2003 10:54:47 -0000 % @@ -30,11 +30,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) Seomthing like this has been tried before, but apparently not finished. See revs.1.109-1.110. The above has a smaller scope than rev.1.109 so I think it doesn't have the problems of rev.1.109, but it leaves revs.1-109-1.110 unfinished and creates a style bug by not removing vestiges of rev.1.110. To fix the style bug, back out revs.1.109-1.110 before adding the ifdef as above, so that there is only 1 copy of the rule. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message