summaryrefslogtreecommitdiffstats
path: root/package/pkg-utils.mk
diff options
context:
space:
mode:
authorThomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>2013-08-02 11:05:14 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2013-09-06 23:30:27 +0200
commitf8d89f051032a8835bdb77edec518e73170006c1 (patch)
treeec2976891f2a09075b7f827db208947bddb0d354 /package/pkg-utils.mk
parent741cbccb746b4bda41c5a51bf2d9d8977c902439 (diff)
downloadbuildroot-f8d89f051032a8835bdb77edec518e73170006c1.tar.gz
buildroot-f8d89f051032a8835bdb77edec518e73170006c1.zip
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 <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/pkg-utils.mk')
-rw-r--r--package/pkg-utils.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
index 15db0969e3..5930f2cfc2 100644
--- a/package/pkg-utils.mk
+++ b/package/pkg-utils.mk
@@ -62,6 +62,8 @@ INFLATE.tbz2 = $(BZCAT)
INFLATE.tgz = $(ZCAT)
INFLATE.xz = $(XZCAT)
INFLATE.tar = cat
+# suitable-extractor(filename): returns extractor based on suffix
+suitable-extractor = $(INFLATE$(suffix $(1)))
# MESSAGE Macro -- display a message in bold type
MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(1)$(TERM_RESET)"
OpenPOWER on IntegriCloud