From owner-freebsd-arch Thu Jan 9 4:38:15 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 2EE0437B401 for ; Thu, 9 Jan 2003 04:38:13 -0800 (PST) Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA91F43F13 for ; Thu, 9 Jan 2003 04:38:11 -0800 (PST) (envelope-from des@ofug.org) Received: by flood.ping.uio.no (Postfix, from userid 2602) id D287F5374; Thu, 9 Jan 2003 13:38:08 +0100 (CET) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: Bruce Evans Cc: arch@FreeBSD.ORG Subject: Re: small bsd.prog.mk change References: <20030109225032.R16405-100000@gamplex.bde.org> From: Dag-Erling Smorgrav Date: Thu, 09 Jan 2003 13:38:07 +0100 In-Reply-To: <20030109225032.R16405-100000@gamplex.bde.org> (Bruce Evans's message of "Thu, 9 Jan 2003 23:29:18 +1100 (EST)") Message-ID: Lines: 17 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386--freebsd) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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 --=-=-= Bruce Evans writes: > 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. How's this? DES -- Dag-Erling Smorgrav - des@ofug.org --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=loader.diff 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 12:37:29 -0000 @@ -30,13 +30,6 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} -${PROG}: ${OBJS} -.if defined(PROG_CXX) - ${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} -.else - ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} -.endif - .else !defined(SRCS) .if !target(${PROG}) @@ -52,7 +45,9 @@ # the name of a variable temporary object. # - it's useful to keep objects around for crunching. OBJS= ${PROG}.o +.endif +.if !target(${PROG}) ${PROG}: ${OBJS} .if defined(PROG_CXX) ${CXX} ${CXXFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} --=-=-=-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message