From owner-freebsd-ports@FreeBSD.ORG Tue Jan 18 00:18:26 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CDFC216A4CE for ; Tue, 18 Jan 2005 00:18:26 +0000 (GMT) Received: from zaphod.nitro.dk (port324.ds1-khk.adsl.cybercity.dk [212.242.113.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E29243D31 for ; Tue, 18 Jan 2005 00:18:26 +0000 (GMT) (envelope-from simon@zaphod.nitro.dk) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id 66F9711E15; Tue, 18 Jan 2005 01:18:24 +0100 (CET) Date: Tue, 18 Jan 2005 01:18:24 +0100 From: "Simon L. Nielsen" To: Alexander Leidinger Message-ID: <20050118001824.GM41278@zaphod.nitro.dk> References: <20050109143903.GC1187@zaphod.nitro.dk> <20050109174945.7f0353e4@Magellan.Leidinger.net> <20050109170219.GF1187@zaphod.nitro.dk> <20050109185948.4470a02d@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Z9t8O/5YJLB6LEUl" Content-Disposition: inline In-Reply-To: <20050109185948.4470a02d@Magellan.Leidinger.net> User-Agent: Mutt/1.5.6i cc: freebsd-ports@FreeBSD.org Subject: Re: Makeing fetchindex really mirror INDEX X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jan 2005 00:18:26 -0000 --Z9t8O/5YJLB6LEUl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Sorry for the delay] On 2005.01.09 18:59:48 +0100, Alexander Leidinger wrote: > On Sun, 9 Jan 2005 18:02:20 +0100 > "Simon L. Nielsen" wrote: >=20 > > Mainly because we already have a ${INDEXFILE} target, and the two > > would conflict, so I thought it would be simpler to keep the simple > > target. > >=20 > > make index in your patch only works because you don't define > > ${INDEXFILE} as ${.CURDIR}/${INDEXFILE}, which it should be since >=20 > Correct. >=20 > > there might be a object directory. At least as I read it, I could be > > wrong. >=20 > At the time I wrote the first implementation of "fetchindex" it was > supposed to be run at the time as "update". So the PORTSDIR has to be > writable (except I've overlooked something). If this hasn't changed, > there's no need for .CURDIR. You could (in theory) have a object directory and still use a writeable "source" directory (ie. writeable /usr/ports). This scenario is rather common in src/ and would be (if it wasn't broken :-) ) in doc/. I now got around to looking a bit more on ports/Makefile and found out that it has no "make obj", so it's probably very unlikely that anybody actually has a object directory for ports, though the normal index target is made to handle the case anyway. > > the right way, I just don't see a really clean way to implement it the > > right way (well, ${INDEXFILE}.bz2) could probably be used but it would > > still only be half way there). >=20 > Without changing the index target, I don't see a cleaner way. The only somewhat cleaner way I can think of is: fetchindex: ${.CURDIR}/${INDEXFILE} =2Eifmake fetchindex ${.CURDIR}/${INDEXFILE}: ${INDEXFILE}.bz2 =2Eelse ${.CURDIR}/${INDEXFILE}: # Current "real" index target =2Eendif But I'm not really sure if that has other implications I can't see. Thinking more about it, I don't really care much how "correct" the solution is, just that it works :-). So it's fine by me just to use your version. > > > BTW.: if I do it the right way (".PHONY: ${INDEXFILE}.bz2" instead of > > > adding " .PHONY" to "${INDEXFILE}.bz2:"), it doesn't work here > > > (6-current) as expected. > >=20 > > I would guess the problem is also related to .CURDIR, but I'm not > > sure. >=20 > I don't see where .CURDIR is supposed to change the behavior here. We're > talking about targets, and I've specified them the same at both places. I guess your right, that should not really matter for this. --=20 Simon L. Nielsen --Z9t8O/5YJLB6LEUl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFB7FXQh9pcDSc1mlERAgomAJ44NtVPvPUYCAtXZgwTwx4vtSmx4ACeNMxd PwNkoXIJHI8d4Vk+AerxSPA= =wPys -----END PGP SIGNATURE----- --Z9t8O/5YJLB6LEUl--