From f8d89f051032a8835bdb77edec518e73170006c1 Mon Sep 17 00:00:00 2001 From: Thomas De Schampheleire Date: Fri, 2 Aug 2013 11:05:14 +0200 Subject: infra: introduce suitable-extractor helper function In order to simplify determining the right extractor tool for a given file type, this patch introduces a make function 'suitable-extractor'. Its usage is $(call suitable-extractor,filename), and it returns the path to the suitable extractor. Signed-off-by: Thomas De Schampheleire Signed-off-by: Peter Korsgaard --- toolchain/toolchain-external/ext-tool.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'toolchain') diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk index e92afbd40..d5023cfc1 100644 --- a/toolchain/toolchain-external/ext-tool.mk +++ b/toolchain/toolchain-external/ext-tool.mk @@ -340,9 +340,9 @@ $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2): $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2) mkdir -p $(@D) - $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE_1))) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) | \ + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE_1)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_1) | \ $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - - $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE_2))) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2) | \ + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE_2)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE_2) | \ $(TAR) $(TAR_STRIP_COMPONENTS)=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - $(Q)touch $@ else @@ -352,7 +352,7 @@ $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE): $(TOOLCHAIN_EXTERNAL_DIR)/.extracted: $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) mkdir -p $(@D) - $(INFLATE$(suffix $(TOOLCHAIN_EXTERNAL_SOURCE))) $^ | \ + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_SOURCE)) $^ | \ $(TAR) $(TAR_STRIP_COMPONENTS)=1 --exclude='usr/lib/locale/*' -C $(@D) $(TAR_OPTIONS) - $(TOOLCHAIN_EXTERNAL_FIXUP_CMDS) $(Q)touch $@ -- cgit v1.2.3-70-g09d2