pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/package If the package cookie file exists, then we ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b71e2b045b26
branches:  trunk
changeset: 514177:b71e2b045b26
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Thu Jun 08 15:48:42 2006 +0000

description:
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:

 mk/package/package.mk |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (37 lines):

diff -r 87667850da2f -r b71e2b045b26 mk/package/package.mk
--- a/mk/package/package.mk     Thu Jun 08 15:47:10 2006 +0000
+++ b/mk/package/package.mk     Thu Jun 08 15:48:42 2006 +0000
@@ -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 @@
 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 @@
 ### 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:



Home | Main Index | Thread Index | Old Index