diff options
author | joerg <joerg@pkgsrc.org> | 2010-10-15 20:22:27 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2010-10-15 20:22:27 +0000 |
commit | 5cde18fc0531998a1b8026c288d9c010a89b4587 (patch) | |
tree | 613fc8ca63c86899f122c5866603119eb81a2775 /mk | |
parent | 70855b7f213fd4f1fa2172239b2974d3f6e10df5 (diff) | |
download | pkgsrc-5cde18fc0531998a1b8026c288d9c010a89b4587.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 |