Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145676
b: refs/heads/master
c: d3dd3b5
h: refs/heads/master
v: v3
  • Loading branch information
H. Peter Anvin committed May 9, 2009
1 parent b04261b commit 2196c3d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0b4eb462da10f832b28d518abffa4d77805928a0
refs/heads/master: d3dd3b5a29bb9582957451531fed461628dfc834
28 changes: 21 additions & 7 deletions trunk/scripts/Makefile.lib
Original file line number Diff line number Diff line change
Expand Up @@ -183,20 +183,34 @@ cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
# ---------------------------------------------------------------------------

quiet_cmd_gzip = GZIP $@
cmd_gzip = gzip -f -9 < $< > $@
cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \
(rm -f $@ ; false)


# Bzip2
# ---------------------------------------------------------------------------

# Bzip2 does not include size in file... so we have to fake that
size_append=$(CONFIG_SHELL) $(srctree)/scripts/bin_size

quiet_cmd_bzip2 = BZIP2 $@
cmd_bzip2 = (bzip2 -9 < $< && $(size_append) $<) > $@ || (rm -f $@ ; false)
# Bzip2 and LZMA do not include size in file... so we have to fake that;
# append the size as a 32-bit littleendian number as gzip does.
size_append = echo -ne $(shell \
dec_size=0; \
for F in $1; do \
fsize=$$(stat -c "%s" $$F); \
dec_size=$$(expr $$dec_size + $$fsize); \
done; \
printf "%08x" $$dec_size | \
sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g' \
)

quiet_cmd_bzip2 = BZIP2 $@
cmd_bzip2 = (cat $(filter-out FORCE,$^) | \
bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)

# Lzma
# ---------------------------------------------------------------------------

quiet_cmd_lzma = LZMA $@
cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
cmd_lzma = (cat $(filter-out FORCE,$^) | \
lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
(rm -f $@ ; false)
10 changes: 0 additions & 10 deletions trunk/scripts/bin_size

This file was deleted.

0 comments on commit 2196c3d

Please sign in to comment.