Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Nov 2004 15:36:05 +0800
From:      Xin LI <delphij@frontfree.net>
To:        freebsd-ports@FreeBSD.org
Subject:   Prevent ``make search'' from being building index?
Message-ID:  <20041126073605.GA2220@frontfree.net>

next in thread | raw e-mail | index | archive | help

--k1lZvvs/B4yU6o8G
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Dear folks,

I think it might be reasonable to use fetchindex rather than to build a
new INDEX file when using ``make search''.

A ugly hack for this is as follows:

--- Makefile.old	Wed Nov 17 18:44:45 2004
+++ Makefile	Fri Nov 26 19:27:06 2004
@@ -84,7 +84,14 @@
 INDEX_ECHO_1ST=3D		echo
 .endif
=20
-${.CURDIR}/${INDEXFILE}:
+.if ${.TARGETS} =3D=3D search
+GETINDEX=3D		fetchindex
+.else
+.undef FETCHINDEX
+.endif
+
+${.CURDIR}/${INDEXFILE}: ${GETINDEX}
+.if !defined(GETINDEX)
 	@${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
 	if [ "${INDEX_PRISTINE}" !=3D "" ]; then \
 		export LOCALBASE=3D/nonexistentlocal; \
@@ -127,6 +134,7 @@
 	fi; \
 	rm -rf $${tmpdir}; \
 	echo " Done."
+.endif
=20
 print-index:	${.CURDIR}/${INDEXFILE}
 	@awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\=
t%s\nB-deps:\t%s\nR-deps:\t%s\nE-deps:\t%s\nP-deps:\t%s\nF-deps:\t%s\nWWW:\=
t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$11, $$12, $$13, $$10); }' < =
${.CURDIR}/${INDEXFILE}

Cheers,
--=20
Xin LI <delphij frontfree net>	http://www.delphij.net/
See complete headers for GPG key and other information.


--k1lZvvs/B4yU6o8G
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)

iD8DBQFBptzl/cVsHxFZiIoRAky7AJ9Rz6vsgmOkoA4puOQgiLILGl3brACdH2WF
jk20Wfy8Xx1M0ur/pfrBXB0=
=BfY0
-----END PGP SIGNATURE-----

--k1lZvvs/B4yU6o8G--



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