diff options
author | rillig <rillig> | 2006-10-09 02:31:57 +0000 |
---|---|---|
committer | rillig <rillig> | 2006-10-09 02:31:57 +0000 |
commit | 2d1e146f5e2623aaf93da70264e77f5a47014259 (patch) | |
tree | bf8d8d573665c9971ac160383d5da38b556e85d2 /mk/extract | |
parent | 5dc1820390970dc00b08ce0bad72450d834a0ba0 (diff) | |
download | pkgsrc-2d1e146f5e2623aaf93da70264e77f5a47014259.tar.gz |
Added the EXTRACT_DIR variable, which can be used if the distfiles should
not be extracted into ${WRKDIR}.
Diffstat (limited to 'mk/extract')
-rw-r--r-- | mk/extract/extract.mk | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mk/extract/extract.mk b/mk/extract/extract.mk index 098c660f6b4..453df0f531a 100644 --- a/mk/extract/extract.mk +++ b/mk/extract/extract.mk @@ -1,8 +1,13 @@ -# $NetBSD: extract.mk,v 1.15 2006/07/27 13:47:29 jlam Exp $ +# $NetBSD: extract.mk,v 1.16 2006/10/09 02:31:57 rillig Exp $ # # The following variables may be set by the package Makefile and # specify how extraction happens: # +# EXTRACT_DIR +# The directory into which the files are extracted. +# +# Default value: ${WRKSRC} +# # EXTRACT_CMD is a shell command list that extracts the contents of # an archive named by the variable ${DOWNLOADED_DISTFILE} to the # current working directory. The default is ${EXTRACT_CMD_DEFAULT}. @@ -80,6 +85,7 @@ ${_COOKIE.extract}: real-extract _REAL_EXTRACT_TARGETS+= extract-check-interactive _REAL_EXTRACT_TARGETS+= extract-message _REAL_EXTRACT_TARGETS+= extract-vars +_REAL_EXTRACT_TARGETS+= extract-dir _REAL_EXTRACT_TARGETS+= pre-extract _REAL_EXTRACT_TARGETS+= do-extract _REAL_EXTRACT_TARGETS+= post-extract @@ -93,6 +99,11 @@ real-extract: ${_REAL_EXTRACT_TARGETS} extract-message: @${PHASE_MSG} "Extracting for ${PKGNAME}" +.PHONY: extract-dir +extract-dir: + ${_PKG_SILENT}${_PKG_DEBUG} \ + mkdir -p ${EXTRACT_DIR} + ###################################################################### ### extract-check-interactive (PRIVATE) ###################################################################### @@ -184,7 +195,7 @@ do-extract: ${WRKDIR} . for __file__ in ${EXTRACT_ONLY} ${_PKG_SILENT}${_PKG_DEBUG} \ extract_file=${_DISTDIR:Q}/${__file__:Q}; export extract_file; \ - cd ${WRKDIR} && ${EXTRACT_CMD} + cd ${EXTRACT_DIR} && ${EXTRACT_CMD} . endfor .endif |