Date: Sun, 9 Jan 2005 18:02:20 +0100 From: "Simon L. Nielsen" <simon@FreeBSD.org> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: freebsd-ports@freebsd.org Subject: Re: Makeing fetchindex really mirror INDEX Message-ID: <20050109170219.GF1187@zaphod.nitro.dk> In-Reply-To: <20050109174945.7f0353e4@Magellan.Leidinger.net> References: <20050109143903.GC1187@zaphod.nitro.dk> <20050109174945.7f0353e4@Magellan.Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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" <simon@freebsd.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050109170219.GF1187>