summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-06-08 15:48:42 +0000
committerjlam <jlam>2006-06-08 15:48:42 +0000
commit5336c201cd889a6b93ed8445478400509cbe766c (patch)
tree47840effc73ab28b8310c29986b0c36159315253 /mk
parent9733fd50dc589ba6411c8ac463de799da2204de6 (diff)
downloadpkgsrc-5336c201cd889a6b93ed8445478400509cbe766c.tar.gz
If the package cookie file exists, then we don't need to do anything.
Also, make use of a _REAL_PACKAGE_TARGETS variable just to make all of the code between the different stages more uniform.
Diffstat (limited to 'mk')
-rw-r--r--mk/package/package.mk13
1 files changed, 11 insertions, 2 deletions
diff --git a/mk/package/package.mk b/mk/package/package.mk
index 1b2feb3d804..0c799e316b3 100644
--- a/mk/package/package.mk
+++ b/mk/package/package.mk
@@ -1,4 +1,4 @@
-# $NetBSD: package.mk,v 1.4 2006/06/07 10:04:04 tron Exp $
+# $NetBSD: package.mk,v 1.5 2006/06/08 15:48:42 jlam Exp $
_PACKAGE_COOKIE= ${WRKDIR}/.package_done
@@ -22,8 +22,13 @@ package: ${_PACKAGE_TARGETS}
acquire-package-lock: acquire-lock
release-package-lock: release-lock
+.if !exists(${_PACKAGE_COOKIE})
${_PACKAGE_COOKIE}:
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-package PKG_PHASE=package
+.else
+${_PACKAGE_COOKIE}:
+ @${DO_NADA}
+.endif
######################################################################
### real-package (PRIVATE)
@@ -31,8 +36,12 @@ ${_PACKAGE_COOKIE}:
### real-package is a helper target to set the PKG_PHASE explicitly to
### "package" before running the remainder of the package targets.
###
+_REAL_PACKAGE_TARGETS+= package-message
+_REAL_PACKAGE_TARGETS+= package-all
+_REAL_PACKAGE_TARGETS+= package-cookie
+
.PHONY: real-package
-real-package: package-message package-all package-cookie
+real-package: ${_REAL_PACKAGE_TARGETS}
.PHONY: package-message
package-message: