From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/5] make: Add wildcard rules for compressed files
Date: Wed, 19 Feb 2014 11:50:45 +0100 [thread overview]
Message-ID: <1392807047-32080-4-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1392807047-32080-1-git-send-email-s.hauer@pengutronix.de>
To simplify generating compressed files.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
scripts/Makefile.lib | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 73a433d..e87e401 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -193,6 +193,9 @@ quiet_cmd_gzip = GZIP $@
cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
(rm -f $@ ; false)
+%.gz: %
+ $(call if_changed,gzip)
+
# DTC
# ---------------------------------------------------------------------------
@@ -251,6 +254,9 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
+%.bz2: %
+ $(call if_changed,bzip2)
+
# Lzma
# ---------------------------------------------------------------------------
@@ -259,11 +265,17 @@ cmd_lzma = (cat $(filter-out FORCE,$^) | \
lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
+%.lzma: %
+ $(call if_changed,lzma)
+
quiet_cmd_lzo = LZO $@
cmd_lzo = (cat $(filter-out FORCE,$^) | \
lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
+%.lzo: %
+ $(call if_changed,lzo)
+
# XZ
# ---------------------------------------------------------------------------
# Use xzkern to compress the kernel image and xzmisc to compress other things.
@@ -292,11 +304,17 @@ cmd_xzmisc = (cat $(filter-out FORCE,$^) | \
xz --check=crc32 --lzma2=dict=1MiB) > $@ || \
(rm -f $@ ; false)
+# lz4
+# ---------------------------------------------------------------------------
+
quiet_cmd_lz4 = LZ4 $@
cmd_lz4 = (cat $(filter-out FORCE,$^) | \
lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
+%.lz4: %
+ $(call if_changed,lz4)
+
quiet_cmd_disasm = DISASM $@
cmd_disasm = $(OBJDUMP) -d $< > $@
--
1.8.5.3
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-02-19 10:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-19 10:50 Cleanup environment dependencies and compressed file generation Sascha Hauer
2014-02-19 10:50 ` [PATCH 1/5] common/Makefile: reorder targets Sascha Hauer
2014-02-19 10:50 ` [PATCH 2/5] defaultenv: simplify env dependencies Sascha Hauer
2014-02-19 10:50 ` Sascha Hauer [this message]
2014-02-19 10:50 ` [PATCH 4/5] defaultenv: use wildcard compression rules Sascha Hauer
2014-02-19 10:50 ` [PATCH 5/5] Kconfig: Select default compression type Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1392807047-32080-4-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox