diff options
author | joerg <joerg> | 2010-10-15 20:22:27 +0000 |
---|---|---|
committer | joerg <joerg> | 2010-10-15 20:22:27 +0000 |
commit | ca41a87ed48acae112e0f754908462270a2b0c69 (patch) | |
tree | 613fc8ca63c86899f122c5866603119eb81a2775 /mk | |
parent | ec4944c0fcce77381dd730f597452ab71095b8f0 (diff) | |
download | pkgsrc-ca41a87ed48acae112e0f754908462270a2b0c69.tar.gz |
Allow EXTRACT_DIR to be specified independently for each file.
OK wiz@
Diffstat (limited to 'mk')
-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 66dd6b28f42..c8400f21261 100644 --- a/mk/extract/extract.mk +++ b/mk/extract/extract.mk @@ -1,4 +1,4 @@ -# $NetBSD: extract.mk,v 1.31 2010/02/07 08:00:51 obache Exp $ +# $NetBSD: extract.mk,v 1.32 2010/10/15 20:22:27 joerg Exp $ # # The following variables may be set by the package Makefile and # specify how extraction happens: @@ -8,6 +8,11 @@ # # Default value: ${WRKDIR} # +# EXTRACT_DIR.${file} +# The directory into which the file ${file} is extracted. +# +# Default: ${EXTRACT_DIR} +# # EXTRACTOR is the the the environment and path used to execute the # all-purpose extract script. # @@ -44,6 +49,9 @@ # EXTRACT_DIR?= ${WRKDIR} +.for f in ${EXTRACT_ONLY} +EXTRACT_DIR.${f}?= ${EXTRACT_DIR} +.endfor _COOKIE.extract= ${WRKDIR}/.extract_done @@ -107,6 +115,9 @@ extract-message: .PHONY: extract-dir extract-dir: ${RUN}${MKDIR} ${EXTRACT_DIR} +.for f in ${EXTRACT_ONLY} + ${RUN}${MKDIR} ${EXTRACT_DIR.${f}} +.endfor ###################################################################### ### extract-check-interactive (PRIVATE) @@ -208,7 +219,7 @@ DOWNLOADED_DISTFILE= $${extract_file} do-extract: ${WRKDIR} . for f in ${EXTRACT_ONLY} ${RUN} extract_file=${_DISTDIR:Q}/${f:Q}; export extract_file; \ - cd ${WRKDIR} && cd ${EXTRACT_DIR} && ${EXTRACT_CMD} + cd ${WRKDIR} && cd ${EXTRACT_DIR.${f}} && ${EXTRACT_CMD} . endfor .endif |