pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/extract Added the EXTRACT_DIR variable, which can b...
details: https://anonhg.NetBSD.org/pkgsrc/rev/64e292d1f7cd
branches: trunk
changeset: 519749:64e292d1f7cd
user: rillig <rillig%pkgsrc.org@localhost>
date: Mon Oct 09 02:31:57 2006 +0000
description:
Added the EXTRACT_DIR variable, which can be used if the distfiles should
not be extracted into ${WRKDIR}.
diffstat:
mk/extract/extract.mk | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (47 lines):
diff -r 9272c1c41ed7 -r 64e292d1f7cd mk/extract/extract.mk
--- a/mk/extract/extract.mk Mon Oct 09 02:06:58 2006 +0000
+++ b/mk/extract/extract.mk Mon Oct 09 02:31:57 2006 +0000
@@ -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 @@
_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 @@
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 @@
. 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
Home |
Main Index |
Thread Index |
Old Index