source: trunk/kBuild/tools/TARGZ.kmk@ 1099

Last change on this file since 1099 was 819, checked in by bird, 18 years ago

More svn:eol-style fixes.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.9 KB
Line 
1# $Id: TARGZ.kmk 819 2007-02-01 02:28:30Z bird $
2## @file
3#
4# kBuild Tool Config - tar.gz unpacker.
5#
6# Copyright (c) 2006-2007 knut st. osmundsen <bird-kBuild-spam@anduin.net>
7#
8#
9# This file is part of kBuild.
10#
11# kBuild is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# kBuild is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kBuild; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24#
25#
26
27TOOL_TARGZ := tar.gz unpacker.
28
29# Tool Specific Properties
30ifndef TOOL_TARGZ_TAR
31 TOOL_TARGZ_TAR := $(wildcard $(PATH_DEVTOOLS_BLD)/tar/v*/tar$(HOSTSUFF_EXE))
32 ifeq ($(TOOL_TARGZ_TAR),)
33 TOOL_TARGZ_TAR := $(wildcard $(PATH_DEVTOOLS_BLD)/bin/tar$(HOSTSUFF_EXE))
34 endif
35 ifeq ($(TOOL_TARGZ_TAR),)
36 TOOL_TARGZ_TAR := $(TOOL_TAR_TAR)
37 endif
38 ifeq ($(TOOL_TARGZ_TAR),)
39 TOOL_TARGZ_TAR := $(lastword $(sort $(TOOL_TARGZ_TAR)))
40 else
41 TOOL_TARGZ_TAR := tar$(HOSTSUFF_EXE)
42 endif
43else
44 TOOL_TARGZ_TAR := $(TOOL_TARGZ_TAR)
45endif
46TOOL_TARGZ_UNPACK ?= $(TOOL_TARGZ_TAR)
47
48# General Properties used by kBuild
49TOOL_TARGZ_UNPACKFLAGS ?= -z
50
51## UNPACK one file.
52# @param $(target) Normalized main target name.
53# @param $(archive) The file to unpack.
54# @param $(flags) Flags.
55# @param $(inst) Where to unpack it.
56# @param $(out) Where to write the file list.
57TOOL_TARGZ_UNPACK_OUTPUT =
58TOOL_TARGZ_UNPACK_DEPEND =
59TOOL_TARGZ_UNPACK_DEPORD =
60define TOOL_TARGZ_UNPACK_CMDS
61 $(QUIET)$(TOOL_TARGZ_UNPACK) -x $(flags) -C $(inst) -f $(archive)
62 $(QUIET)$(TOOL_TARGZ_UNPACK) -t $(flags) -f $(archive) > $(out)
63endef
64
Note: See TracBrowser for help on using the repository browser.