From owner-freebsd-ports@FreeBSD.ORG Sun Jan 9 17:02:22 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 2912916A4CE for ; Sun, 9 Jan 2005 17:02:22 +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 6DFF943D5D for ; Sun, 9 Jan 2005 17:02:21 +0000 (GMT) (envelope-from simon@zaphod.nitro.dk) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id 2FAA211DC7; Sun, 9 Jan 2005 18:02:20 +0100 (CET) Date: Sun, 9 Jan 2005 18:02:20 +0100 From: "Simon L. Nielsen" To: Alexander Leidinger Message-ID: <20050109170219.GF1187@zaphod.nitro.dk> References: <20050109143903.GC1187@zaphod.nitro.dk> <20050109174945.7f0353e4@Magellan.Leidinger.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZFKeWUZP29EKQNE" Content-Disposition: inline In-Reply-To: <20050109174945.7f0353e4@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: Sun, 09 Jan 2005 17:02:22 -0000 --LZFKeWUZP29EKQNE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2005.01.09 17:49:45 +0100, Alexander Leidinger wrote: > On Sun, 9 Jan 2005 15:39:04 +0100 > "Simon L. Nielsen" wrote: >=20 > > fetchindex: > > - @cd ${.CURDIR} && ${FETCHINDEX} ${MASTER_SITE_INDEX}/${INDEXFILE}.bz2= && bunzip2 -f ${INDEXFILE}.bz2 && chmod a+r ${INDEXFILE} > > + @${FETCHINDEX} -o ${.CURDIR}/${INDEXFILE}.bz2 \ > > + ${MASTER_SITE_INDEX}${INDEXFILE}.bz2 > > + @cd ${.CURDIR} && if [ ${INDEXFILE}.bz2 -nt ${INDEXFILE} ]; then \ > > + bunzip2 < ${INDEXFILE}.bz2 > ${INDEXFILE}; \ > > + chmod a+r ${INDEXFILE}; \ > > + fi >=20 > Why do you do the work "make" is supposed to do? > > The following does what you want (and "make index" works too): 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. make index in your patch only works because you don't define ${INDEXFILE} as ${.CURDIR}/${INDEXFILE}, which it should be since there might be a object directory. At least as I read it, I could be wrong. In general I agree my way is slight silly, because it's certainly not 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). > ---snip--- > Index: Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /big/FreeBSD-CVS/ports/Makefile,v > retrieving revision 1.90 > diff -u -u -r1.90 Makefile > --- Makefile 17 Dec 2004 11:23:22 -0000 1.90 > +++ Makefile 9 Jan 2005 16:45:36 -0000 > @@ -69,8 +69,14 @@ > @rm -f ${.CURDIR}/${INDEXFILE} > @cd ${.CURDIR} && make ${.CURDIR}/${INDEXFILE} > =20 > -fetchindex: > - @cd ${.CURDIR} && ${FETCHINDEX} ${MASTER_SITE_INDEX}/${INDEXFILE}= =2Ebz2 && bunzip2 -f ${INDEXFILE}.bz2 && chmod a+r ${INDEXFILE} > +${INDEXFILE}.bz2: .PHONY > + @${FETCHINDEX} ${MASTER_SITE_INDEX}${INDEXFILE}.bz2 > + > +${INDEXFILE}: ${INDEXFILE}.bz2=20 > + @bunzip2 <${INDEXFILE}.bz2 >${INDEXFILE} > + @chmod a+r ${INDEXFILE} > + > +fetchindex: ${INDEXFILE} > =20 > MASTER_SITE_INDEX?=3D http://www.FreeBSD.org/ports/ > FETCHINDEX?=3D fetch -am > ---snip--- >=20 > 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. I would guess the problem is also related to .CURDIR, but I'm not sure. --=20 Simon L. Nielsen --LZFKeWUZP29EKQNE Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFB4WObh9pcDSc1mlERAna6AJ0c2Ck75INFcPFlpJ0Cmka7kf1iJgCeNnsc BAFW1+IlFGfcaSaDSkri9uI= =68TG -----END PGP SIGNATURE----- --LZFKeWUZP29EKQNE--