- Timestamp:
- May 22, 2020 2:23:56 PM (5 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/kBuild/tools/7ZIP.kmk
r3332 r3345 1 1 # $Id$ 2 2 ## @file 3 # kBuild Tool Config - tarunpacker.3 # kBuild Tool Config - 7-Zip unpacker. 4 4 # 5 5 6 6 # 7 # Copyright (c) 2006-20 17knut st. osmundsen <[email protected]>7 # Copyright (c) 2006-2020 knut st. osmundsen <[email protected]> 8 8 # 9 9 # This file is part of kBuild. … … 32 32 # 33 33 34 TOOL_ TAR := tarunpacker.34 TOOL_7ZIP := 7-Zip unpacker. 35 35 36 36 # Tool Specific Properties 37 ifndef TOOL_ TAR_TAR38 TOOL_ TAR_TAR := $(wildcard $(KBUILD_DEVTOOLS_HST)/tar/v*/tar$(HOSTSUFF_EXE))39 ifeq ($(TOOL_ TAR_TAR),)40 TOOL_ TAR_TAR := $(wildcard $(KBUILD_DEVTOOLS_HST)/bin/tar$(HOSTSUFF_EXE))37 ifndef TOOL_7ZIP_7Z 38 TOOL_7ZIP_7Z := $(wildcard $(KBUILD_DEVTOOLS_HST)/7zip/v*/7z$(HOSTSUFF_EXE)) 39 ifeq ($(TOOL_7ZIP_7Z),) 40 TOOL_7ZIP_7Z := $(wildcard $(KBUILD_DEVTOOLS_HST)/bin/7z$(HOSTSUFF_EXE)) 41 41 endif 42 ifneq ($(TOOL_ TAR_TAR),)43 TOOL_ TAR_TAR := $(lastword $(sort $(TOOL_TAR_TAR)))42 ifneq ($(TOOL_7ZIP_7Z),) 43 TOOL_7ZIP_7Z := $(lastword $(sort $(TOOL_7ZIP_7Z))) 44 44 else 45 TOOL_ TAR_TAR := tar$(HOSTSUFF_EXE)45 TOOL_7ZIP_7Z := 7z$(HOSTSUFF_EXE) 46 46 endif 47 47 else 48 TOOL_ TAR_TAR := $(TOOL_TAR_TAR)48 TOOL_7ZIP_7Z := $(TOOL_7ZIP_7Z) 49 49 endif 50 TOOL_ TAR_UNPACK ?= $(TOOL_TAR_TAR)50 TOOL_7ZIP_UNPACK ?= $(TOOL_7ZIP_7Z) 51 51 52 52 # General Properties used by kBuild 53 TOOL_ TAR_UNPACKFLAGS ?=53 TOOL_7ZIP_UNPACKFLAGS ?= 54 54 55 55 ## UNPACK one file. … … 59 59 # @param $(inst) Where to unpack it. 60 60 # @param $(out) Where to write the file list. 61 TOOL_TAR_UNPACK_OUTPUT = 62 TOOL_TAR_UNPACK_DEPEND = 63 TOOL_TAR_UNPACK_DEPORD = 64 ifeq ($(KBUILD_HOST),win) # hacking with buggy unxutils on windows. it doesn't like driver letters. 65 define TOOL_TAR_UNPACK_CMDS 66 $(QUIET)$(TOOL_TAR_UNPACK) -x $(flags) -C $(subst G:,,$(inst)) -f $(archive) 67 $(QUIET)$(TOOL_TAR_UNPACK) -t $(filter-out -v --verbose,$(flags)) -f $(archive) > $(out) 61 TOOL_7ZIP_UNPACK_OUTPUT = 62 TOOL_7ZIP_UNPACK_DEPEND = 63 TOOL_7ZIP_UNPACK_DEPORD = 64 define TOOL_7ZIP_UNPACK_CMDS 65 $(QUIET)$(TOOL_7ZIP_UNPACK) x $(flags) -o"$(inst)" "$(archive)" 66 $(QUIET)$(TOOL_7ZIP_UNPACK) l $(filter-out -bb%,$(flags)) "$(archive)" \ 67 | $(SED) \ 68 -e '1,/-------------------/d' \ 69 -e '/-------------------/,$$(DOLLAR)d' \ 70 -e '/^[^ ]* [^ ]* D/d' \ 71 -e 's/^.................................................... *//' \ 72 -e 's,\\,/,g' \ 73 --output $(out) 68 74 endef 69 else70 define TOOL_TAR_UNPACK_CMDS71 $(QUIET)$(TOOL_TAR_UNPACK) -x $(flags) -C $(inst) -f $(archive)72 $(QUIET)$(TOOL_TAR_UNPACK) -t $(filter-out -v --verbose,$(flags)) -f $(archive) > $(out)73 endef74 endif75 75
Note:
See TracChangeset
for help on using the changeset viewer.