Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Jan 2003 23:29:18 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Dag-Erling Smorgrav <des@ofug.org>
Cc:        arch@FreeBSD.ORG
Subject:   Re: small bsd.prog.mk change
Message-ID:  <20030109225032.R16405-100000@gamplex.bde.org>
In-Reply-To: <xzpn0mah9qq.fsf@flood.ping.uio.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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