summaryrefslogtreecommitdiff
path: root/mk/patch
diff options
context:
space:
mode:
authorjlam <jlam>2006-07-05 09:08:35 +0000
committerjlam <jlam>2006-07-05 09:08:35 +0000
commit6155b7d53ace0c43ed30ad4c84dc968f54f07928 (patch)
tree266445424a702f9333f761cfa65f977c42683645 /mk/patch
parente6513ebe2f990e84c543967ef55cf8ec88ca0e00 (diff)
downloadpkgsrc-6155b7d53ace0c43ed30ad4c84dc968f54f07928.tar.gz
Make the check-vulnerable target more self-sufficient, by moving some
of the logic from fetch/fetch.mk into flavor/pkg/check.mk, so that check-vulnerable can be used as a source target. Make check-vulnerable a source target for every phase of the build workflow, which ensures that it is always run if the user starts a new phase from the command line. Fix the cookie-generation targets so that they don't append, only overwrite to the cookie file. This works around potential problems due to recursive makes. Move the cookie checks so that they surround the corresponding phase target. The presence of the cookie should now inform the make process to avoid doing any processing of phases that occur before the phase corresponding to the cookie.
Diffstat (limited to 'mk/patch')
-rw-r--r--mk/patch/patch.mk15
1 files changed, 9 insertions, 6 deletions
diff --git a/mk/patch/patch.mk b/mk/patch/patch.mk
index cea306ce9fc..c47dbfc4306 100644
--- a/mk/patch/patch.mk
+++ b/mk/patch/patch.mk
@@ -1,4 +1,4 @@
-# $NetBSD: patch.mk,v 1.4 2006/06/09 13:59:08 jlam Exp $
+# $NetBSD: patch.mk,v 1.5 2006/07/05 09:08:35 jlam Exp $
#
# The following variables may be set in a package Makefile and control
# how pkgsrc patches are applied.
@@ -52,24 +52,27 @@ _PATCH_COOKIE= ${WRKDIR}/.patch_done
### patch is a public target to apply the distribution and pkgsrc
### patches to the extracted sources for the package.
###
+_PATCH_TARGETS+= check-vulnerable
_PATCH_TARGETS+= extract
_PATCH_TARGETS+= acquire-patch-lock
_PATCH_TARGETS+= ${_PATCH_COOKIE}
_PATCH_TARGETS+= release-patch-lock
.PHONY: patch
+.if !target(patch)
+. if !exists(${_PATCH_COOKIE})
patch: ${_PATCH_TARGETS}
+. else
+patch:
+ @${DO_NADA}
+. endif
+.endif
.PHONY: acquire-patch-lock release-patch-lock
acquire-patch-lock: acquire-lock
release-patch-lock: release-lock
-.if !exists(${_PATCH_COOKIE})
${_PATCH_COOKIE}: real-patch
-.else
-${_PATCH_COOKIE}:
- @${DO_NADA}
-.endif
######################################################################
### real-patch (PRIVATE)