summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2003-07-25 02:43:00 +0000
committergrant <grant@pkgsrc.org>2003-07-25 02:43:00 +0000
commitcb087abb95352b1cfe5c53b252b85da4078148c6 (patch)
tree047c495ba0e8052c8cac3e2fe81ead1c4c71aa4b /Makefile
parent981a376c35e9108cdb378ec82eaed05c0783ffc4 (diff)
downloadpkgsrc-cb087abb95352b1cfe5c53b252b85da4078148c6.tar.gz
index target improvements:
* rename DEPENDSDB to PKGDB * move build of PKGDB to its own target so make(1) removes it if it bombs. ok'd by dmcmahill@.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 13 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 02d18a53d5e..18611d5cc6b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.56 2003/07/23 09:41:23 dmcmahill Exp $
+# $NetBSD: Makefile,v 1.57 2003/07/25 02:43:00 grant Exp $
#
.include "mk/bsd.prefs.mk"
@@ -101,22 +101,18 @@ README.html: .PRECIOUS
_PKGSRCDIR=${.CURDIR}
.endif
-.PHONY: index
-index: ${.CURDIR}/INDEX
-
-${.CURDIR}/INDEX:
- @${RM} -f ${.CURDIR}/DEPENDSDB
+${.CURDIR}/PKGDB:
+ @${RM} -f ${.CURDIR}/PKGDB
@${ECHO_MSG} "Extracting complete dependency database. This may take a while..."
- @DB=${.CURDIR}/DEPENDSDB ; \
+ @DB=${.CURDIR}/PKGDB ; \
PKGSRCDIR=${.CURDIR} ; \
npkg=1; \
- ${RM} -fr $$DB ; \
- list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | sed 's,/Makefile.*=[[:space:]]*,/,'` ; \
+ list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'` ; \
for pkgdir in $$list ; do \
if [ ! -d $$pkgdir ]; then \
echo " " ; \
echo "WARNING: the package directory $pkgdir is listed in" > /dev/stderr ; \
- echo $pkgdir | sed 's;/.*;/Makefile;g' > /dev/stderr ; \
+ echo $pkgdir | ${SED} 's;/.*;/Makefile;g' > /dev/stderr ; \
echo "but the directory does not exist. Please fix this!" > /dev/stderr ; \
else \
cd $$pkgdir ; \
@@ -140,9 +136,14 @@ ${.CURDIR}/INDEX:
npkg=`${EXPR} $$npkg + 1` ; \
cd $$PKGSRCDIR ; \
done
+
+.PHONY: index
+index: ${.CURDIR}/INDEX
+
+${.CURDIR}/INDEX: ${.CURDIR}/PKGDB
@${RM} -f ${.CURDIR}/INDEX
- @${AWK} -f ./mk/scripts/genindex.awk PKGSRCDIR=${.CURDIR} SORT=${SORT} ${.CURDIR}/DEPENDSDB
- @${RM} -f ${.CURDIR}/DEPENDSDB
+ @${AWK} -f ./mk/scripts/genindex.awk PKGSRCDIR=${.CURDIR} SORT=${SORT} ${.CURDIR}/PKGDB
+ @${RM} -f ${.CURDIR}/PKGDB
print-index: ${.CURDIR}/INDEX
@${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\nArch:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10); }' < ${.CURDIR}/INDEX