summaryrefslogtreecommitdiff
path: root/mk/extract
diff options
context:
space:
mode:
authorjoerg <joerg>2007-12-30 13:37:18 +0000
committerjoerg <joerg>2007-12-30 13:37:18 +0000
commita6c402527cfd3142fa60b4caa01fbdcdf3e03a79 (patch)
tree9852d2eca5ad86f7d04604e6ab9d3990ec1443fb /mk/extract
parent4c01a4d3ebb9cad7eb41b22df3fe040284014a80 (diff)
downloadpkgsrc-a6c402527cfd3142fa60b4caa01fbdcdf3e03a79.tar.gz
EXTRACT_USING is always set, even when the necessary tools are not
depended on because it is not used. Work around it for now by checking that the target is actually non-empty explicitly. This is still simpler than the original code. After the branch, this will be reordered so that it only gets set to non-default values when it will be used.
Diffstat (limited to 'mk/extract')
-rw-r--r--mk/extract/bsd.extract-vars.mk4
-rw-r--r--mk/extract/extract.mk14
2 files changed, 12 insertions, 6 deletions
diff --git a/mk/extract/bsd.extract-vars.mk b/mk/extract/bsd.extract-vars.mk
index 4234e0c4714..0a2fa715061 100644
--- a/mk/extract/bsd.extract-vars.mk
+++ b/mk/extract/bsd.extract-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.extract-vars.mk,v 1.8 2007/11/07 09:52:58 rillig Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.9 2007/12/30 13:37:18 joerg Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -37,7 +37,7 @@ EXTRACT_SUFX?= .tar.gz
USE_TOOLS+= gtar
. elif !empty(EXTRACT_USING:Mnbtar)
USE_TOOLS+= tar
-. else
+. elif !empty(EXTRACT_USING:Mpax)
USE_TOOLS+= pax
. endif
.endif
diff --git a/mk/extract/extract.mk b/mk/extract/extract.mk
index 61285aebe30..c34cdc5a7b4 100644
--- a/mk/extract/extract.mk
+++ b/mk/extract/extract.mk
@@ -1,4 +1,4 @@
-# $NetBSD: extract.mk,v 1.22 2007/12/29 20:08:16 joerg Exp $
+# $NetBSD: extract.mk,v 1.23 2007/12/30 13:37:18 joerg Exp $
#
# The following variables may be set by the package Makefile and
# specify how extraction happens:
@@ -176,11 +176,17 @@ _EXTRACT_ENV+= ${TOOLS_UNZOO:D UNZOO=${TOOLS_UNZOO:Q}}
_EXTRACT_ENV+= ${EXTRACT_ENV}
.if !empty(EXTRACT_USING:Mgtar)
-EXTRACT_OPTS+= -t ${TOOLS_PATH.gtar}
+_EXTRACT_TAR= ${TOOLS_PATH.gtar}
.elif !empty(EXTRACT_USING:Mnbtar)
-EXTRACT_OPTS+= -t ${TOOLS_TAR}
+_EXTRACT_TAR= ${TOOLS_TAR}
+.elif !empty(EXTRACT_USING:Mpax)
+_EXTRACT_TAR= ${TOOLS_PAX}
.else
-EXTRACT_OPTS+= -t ${TOOLS_PAX}
+_EXTRACT_TAR=
+.endif
+
+.if !empty(_EXTRACT_TAR)
+EXTRACT_OPTS+= -t ${_EXTRACT_TAR}
.endif
EXTRACT_CMD_DEFAULT= \