From owner-freebsd-current@FreeBSD.ORG Thu Aug 7 16:27:21 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6EA537B401 for ; Thu, 7 Aug 2003 16:27:21 -0700 (PDT) Received: from protov.plain.co.nz (protov.plain.co.nz [202.36.174.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id B712843FCB for ; Thu, 7 Aug 2003 16:27:18 -0700 (PDT) (envelope-from zombie@i4free.co.nz) Received: from i4free.co.nz (unknown [202.49.65.161]) by protov.plain.co.nz (Postfix) with ESMTP id C06A13C80B; Fri, 8 Aug 2003 11:27:13 +1200 (NZST) Message-ID: <3F32DFFD.4060402@i4free.co.nz> Date: Fri, 08 Aug 2003 11:25:49 +1200 From: Andrew Turner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <20030807074557.S75796@root.org> In-Reply-To: <20030807074557.S75796@root.org> Content-Type: multipart/mixed; boundary="------------020603080107050407080003" cc: current@freebsd.org Subject: Re: Warning with loader Makefile? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2003 23:27:22 -0000 This is a multi-part message in MIME format. --------------020603080107050407080003 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Nate Lawson wrote: > I get this: > ===> i386/cdboot > ===> i386/kgzldr > ===> i386/libi386 > ===> i386/loader > "/usr/share/mk/bsd.prog.mk", line 38: warning: duplicate script for target "loader" ignored > cc -nostdlib -static -Ttext 0x0 -o loader.sym > /home/obj/home/src/sys/boot/i386/loader/../btx/lib/crt0.o main.o conf.o > bcache.o boot.o commands.o console.o devopen.o interp.o interp_backslash.o > interp_parse.o ls.o misc.o module.o panic.o load_elf32.o load_elf64.o > isapnp.o pnp.o interp_forth.o vers.o > > Why is there a duplicate script? I found this patch worked by removing the secound ${PROG} target if there was already one there. Andrew --------------020603080107050407080003 Content-Type: text/plain; name="bsd.prog.mk.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="bsd.prog.mk.diff" --- /usr/src/share/mk/bsd.prog.mk Mon Jun 30 06:16:26 2003 +++ /usr/share/mk/bsd.prog.mk Mon Aug 4 17:54:22 2003 @@ -31,11 +31,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) --------------020603080107050407080003--