diff options
author | schwarz <schwarz@pkgsrc.org> | 2006-08-19 20:06:57 +0000 |
---|---|---|
committer | schwarz <schwarz@pkgsrc.org> | 2006-08-19 20:06:57 +0000 |
commit | 7729fc9cb2d6642c4b999ee732d1ba706d3be1c9 (patch) | |
tree | c171dbf98782f3ad2894d0fd268faf8db93e7822 /mk | |
parent | d13f8bad9b624e7e0fe1bc080527c4e32f0a13c9 (diff) | |
download | pkgsrc-7729fc9cb2d6642c4b999ee732d1ba706d3be1c9.tar.gz |
only depend on the extract tools if there are actually any files to extract
Diffstat (limited to 'mk')
-rw-r--r-- | mk/extract/bsd.extract-vars.mk | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/mk/extract/bsd.extract-vars.mk b/mk/extract/bsd.extract-vars.mk index 6cb0ace7db9..ba1e61eb475 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.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) +. 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) +. endif +. if !empty(_EXTRACT_PATTERNS:M*.zoo) USE_TOOLS+= unzoo -.endif -.if !empty(_EXTRACT_PATTERNS:M*.rar) +. endif +. if !empty(_EXTRACT_PATTERNS:M*.rar) USE_TOOLS+= unrar +. endif .endif |