Prevent ``make search'' from being building index?
Xin LI
delphij at frontfree.net
Thu Nov 25 23:36:22 PST 2004
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= echo
.endif
-${.CURDIR}/${INDEXFILE}:
+.if ${.TARGETS} == search
+GETINDEX= fetchindex
+.else
+.undef FETCHINDEX
+.endif
+
+${.CURDIR}/${INDEXFILE}: ${GETINDEX}
+.if !defined(GETINDEX)
@${INDEX_ECHO_1ST} "Generating ${INDEXFILE} - please wait.."; \
if [ "${INDEX_PRISTINE}" != "" ]; then \
export LOCALBASE=/nonexistentlocal; \
@@ -127,6 +134,7 @@
fi; \
rm -rf $${tmpdir}; \
echo " Done."
+.endif
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,
--
Xin LI <delphij frontfree net> http://www.delphij.net/
See complete headers for GPG key and other information.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20041126/e07cc1bf/attachment.bin
More information about the freebsd-ports
mailing list