pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/extract only depend on the extract tools if there a...
details: https://anonhg.NetBSD.org/pkgsrc/rev/868709d9ab06
branches: trunk
changeset: 517697:868709d9ab06
user: schwarz <schwarz%pkgsrc.org@localhost>
date: Sat Aug 19 20:06:57 2006 +0000
description:
only depend on the extract tools if there are actually any files to extract
diffstat:
mk/extract/bsd.extract-vars.mk | 70 ++++++++++++++++++++++-------------------
1 files changed, 37 insertions(+), 33 deletions(-)
diffs (99 lines):
diff -r b4a20274a164 -r 868709d9ab06 mk/extract/bsd.extract-vars.mk
--- a/mk/extract/bsd.extract-vars.mk Sat Aug 19 18:43:02 2006 +0000
+++ b/mk/extract/bsd.extract-vars.mk Sat Aug 19 20:06:57 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.extract-vars.mk,v 1.2 2006/06/06 15:28:52 jlam Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.3 2006/08/19 20:06:57 schwarz Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -11,53 +11,57 @@
# extract and defaults to ${DISTFILES}.
#
# EXTRACT_SUFX is the suffix for the default distfile to be
-# extracted. The default suffix is ".tar.gz".
+# extracted. The default suffix is ".tar.gz".
#
+
EXTRACT_ONLY?= ${DISTFILES}
EXTRACT_SUFX?= .tar.gz
+.if !empty(EXTRACT_ONLY)
+
###
### Discover which tools we need based on the file extensions of the
### distfiles.
###
_EXTRACT_PATTERNS= ${EXTRACT_ONLY} ${EXTRACT_SUFX}
-.if !empty(_EXTRACT_PATTERNS:M*.tar) || \
- !empty(_EXTRACT_PATTERNS:M*.tar.*) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz2) || \
- !empty(_EXTRACT_PATTERNS:M*.tgz) || \
- !empty(_EXTRACT_PATTERNS:M*-tar.gz) || \
- !empty(_EXTRACT_PATTERNS:M*_tar.gz)
-. if !empty(EXTRACT_USING:Mgtar)
+. if !empty(_EXTRACT_PATTERNS:M*.tar) || \
+ !empty(_EXTRACT_PATTERNS:M*.tar.*) || \
+ !empty(_EXTRACT_PATTERNS:M*.tbz) || \
+ !empty(_EXTRACT_PATTERNS:M*.tbz2) || \
+ !empty(_EXTRACT_PATTERNS:M*.tgz) || \
+ !empty(_EXTRACT_PATTERNS:M*-tar.gz) || \
+ !empty(_EXTRACT_PATTERNS:M*_tar.gz)
+. if !empty(EXTRACT_USING:Mgtar)
USE_TOOLS+= gtar
-. elif !empty(EXTRACT_USING:Mnbtar)
+. elif !empty(EXTRACT_USING:Mnbtar)
USE_TOOLS+= tar
-. else
+. else
USE_TOOLS+= pax
-. endif
-.endif
-.if !empty(_EXTRACT_PATTERNS:M*.bz2) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz) || \
- !empty(_EXTRACT_PATTERNS:M*.tbz2)
+. endif
+. endif
+. if !empty(_EXTRACT_PATTERNS:M*.bz2) || \
+ !empty(_EXTRACT_PATTERNS:M*.tbz) || \
+ !empty(_EXTRACT_PATTERNS:M*.tbz2)
USE_TOOLS+= bzcat
-.endif
-.if !empty(_EXTRACT_PATTERNS:M*.zip)
+. endif
+. if !empty(_EXTRACT_PATTERNS:M*.zip)
USE_TOOLS+= unzip
-.endif
-.if !empty(_EXTRACT_PATTERNS:M*.lzh) || \
- !empty(_EXTRACT_PATTERNS:M*.lha)
+. endif
+. if !empty(_EXTRACT_PATTERNS:M*.lzh) || \
+ !empty(_EXTRACT_PATTERNS:M*.lha)
USE_TOOLS+= lha
+. endif
+. if !empty(_EXTRACT_PATTERNS:M*.gz) || \
+ !empty(_EXTRACT_PATTERNS:M*.tgz) || \
+ !empty(_EXTRACT_PATTERNS:M*.Z)
+USE_TOOLS+= gzcat
+. endif
+. if !empty(_EXTRACT_PATTERNS:M*.zoo)
+USE_TOOLS+= unzoo
+. endif
+. if !empty(_EXTRACT_PATTERNS:M*.rar)
+USE_TOOLS+= unrar
+. endif
.endif
-.if !empty(_EXTRACT_PATTERNS:M*.gz) || \
- !empty(_EXTRACT_PATTERNS:M*.tgz) || \
- !empty(_EXTRACT_PATTERNS:M*.Z)
-USE_TOOLS+= gzcat
-.endif
-.if !empty(_EXTRACT_PATTERNS:M*.zoo)
-USE_TOOLS+= unzoo
-.endif
-.if !empty(_EXTRACT_PATTERNS:M*.rar)
-USE_TOOLS+= unrar
-.endif
Home |
Main Index |
Thread Index |
Old Index