summaryrefslogtreecommitdiff
path: root/mk/package
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-06-14 07:51:47 +0000
committerjlam <jlam@pkgsrc.org>2006-06-14 07:51:47 +0000
commit773389471a5ecd9d31cdd5fab34d4b2f93c164ec (patch)
treef6172fa5e33311007dee229b2d6f8a26dd1116d5 /mk/package
parenta1701c2271261fd8a276981dc84b6ebddb0c9306 (diff)
downloadpkgsrc-773389471a5ecd9d31cdd5fab34d4b2f93c164ec.tar.gz
Insert cookie checks into the "real-install" and "real-package" targets,
which are invoked in recursive make calls for the "install" and "package" targets respectvely. These recursive make calls prevent the top-level make from seeing all of the targets and computing a full dependency graph, so it becomes possible for some targets to be invoked more than once. This change passes enough information along to the recursive make calls and ensures that the source targets for the real-* targets are only invoked once.
Diffstat (limited to 'mk/package')
-rw-r--r--mk/package/package.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/package/package.mk b/mk/package/package.mk
index 7bee1207ca5..c09973ccd9d 100644
--- a/mk/package/package.mk
+++ b/mk/package/package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.7 2006/06/10 03:23:46 jlam Exp $
+# $NetBSD: package.mk,v 1.8 2006/06/14 07:51:47 jlam Exp $
_PACKAGE_COOKIE= ${WRKDIR}/.package_done
@@ -36,9 +36,11 @@ ${_PACKAGE_COOKIE}:
### real-package is a helper target to set the PKG_PHASE explicitly to
### "package" before running the remainder of the package targets.
###
+.if !exists(${_PACKAGE_COOKIE})
_REAL_PACKAGE_TARGETS+= package-message
_REAL_PACKAGE_TARGETS+= package-all
_REAL_PACKAGE_TARGETS+= package-cookie
+.endif
.PHONY: real-package
real-package: ${_REAL_PACKAGE_TARGETS}