Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Jan 2003 13:38:07 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        arch@FreeBSD.ORG
Subject:   Re: small bsd.prog.mk change
Message-ID:  <xzpd6n6h51s.fsf@flood.ping.uio.no>
In-Reply-To: <20030109225032.R16405-100000@gamplex.bde.org> (Bruce Evans's message of "Thu, 9 Jan 2003 23:29:18 %2B1100 (EST)")
References:  <20030109225032.R16405-100000@gamplex.bde.org>

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

Bruce Evans <bde@zeta.org.au> 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




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