source: trunk/kBuild/tools/TAR.kmk@ 665

Last change on this file since 665 was 665, checked in by bird, 19 years ago

svn:keyword=Id

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1# $Id: TAR.kmk 665 2006-12-06 02:15:46Z bird $
2## @file
3#
4# kBuild Tool Config - tar unpacker.
5#
6# Copyright (c) 2006 knut st. osmundsen <bird-srcspam@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_TAR := tar unpacker.
28
29TOOL_TAR_UNPACK ?= tar$(HOSTSUFF_EXE)
30TOOL_TAR_UNPACKFLAGS ?=
31
32## UNPACK one file.
33# @param $(target) Normalized main target name.
34# @param $(archive) The file to unpack.
35# @param $(flags) Flags.
36# @param $(inst) Where to unpack it.
37# @param $(out) Where to write the file list.
38TOOL_TAR_UNPACK_OUTPUT =
39TOOL_TAR_UNPACK_DEPEND =
40TOOL_TAR_UNPACK_DEPORD =
41ifeq ($(BUILD_PLATFORM),win) # hacking with buggy unxutils on windows. it doesn't like driver letters.
42define TOOL_TAR_UNPACK_CMDS
43 $(TOOL_TAR_UNPACK) -x $(flags) -C $(subst G:,,$(inst)) -f $(archive)
44 $(TOOL_TAR_UNPACK) -t $(flags) -f $(archive)| $(SED) -e 's|^|$(inst)|g' > $(out)
45endef
46else
47define TOOL_TAR_UNPACK_CMDS
48 $(TOOL_TAR_UNPACK) -x $(flags) -C $(inst) -f $(archive)
49 $(TOOL_TAR_UNPACK) -t $(flags) -f $(archive)| $(SED) -e 's|^|$(inst)|g' > $(out)
50endef
51endif
52
Note: See TracBrowser for help on using the repository browser.