From d1472d7f01f507c9598f309eb5e7b4fc8708b4df Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 5 Jul 2006 09:08:35 +0000 Subject: 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. --- mk/extract/extract.mk | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'mk/extract') diff --git a/mk/extract/extract.mk b/mk/extract/extract.mk index 41513acc437..257d21e2807 100644 --- a/mk/extract/extract.mk +++ b/mk/extract/extract.mk @@ -1,4 +1,4 @@ -# $NetBSD: extract.mk,v 1.7 2006/06/09 13:59:08 jlam Exp $ +# $NetBSD: extract.mk,v 1.8 2006/07/05 09:08:35 jlam Exp $ # # The following variables may be set by the package Makefile and # specify how extraction happens: @@ -42,6 +42,7 @@ _EXTRACT_COOKIE= ${WRKDIR}/.extract_done ###################################################################### ### extract is a public target to perform extraction. ### +_EXTRACT_TARGETS+= check-vulnerable _EXTRACT_TARGETS+= checksum _EXTRACT_TARGETS+= makedirs _EXTRACT_TARGETS+= depends @@ -52,19 +53,19 @@ _EXTRACT_TARGETS+= release-extract-lock .PHONY: extract .if !target(extract) +. if !exists(${_EXTRACT_COOKIE}) extract: ${_EXTRACT_TARGETS} +. else +extract: + @${DO_NADA} +. endif .endif .PHONY: acquire-extract-lock release-extract-lock acquire-extract-lock: acquire-lock release-extract-lock: release-lock -.if !exists(${_EXTRACT_COOKIE}) ${_EXTRACT_COOKIE}: real-extract -.else -${_EXTRACT_COOKIE}: - @${DO_NADA} -.endif ###################################################################### ### real-extract (PRIVATE) @@ -114,7 +115,7 @@ extract-check-interactive: .PHONY: extract-cookie extract-cookie: ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_EXTRACT_COOKIE:H} - ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} >> ${_EXTRACT_COOKIE} + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} > ${_EXTRACT_COOKIE} ###################################################################### ### pre-extract, do-extract, post-extract (PUBLIC, override) -- cgit v1.2.3