summaryrefslogtreecommitdiff
path: root/mk/patch
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-07-05 09:08:35 +0000
committerjlam <jlam@pkgsrc.org>2006-07-05 09:08:35 +0000
commit990d0b53771974e8526315776af82fd9b4961c14 (patch)
tree266445424a702f9333f761cfa65f977c42683645 /mk/patch
parente3b97d774b9eb87dcd011ba0aeca7f60d35eeb86 (diff)
downloadpkgsrc-990d0b53771974e8526315776af82fd9b4961c14.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)