[PATCH 05/14] kbuild: allow compressors (gzip, bzip2, lzma) to take multiple inputs

H. Peter Anvin hpa at linux.intel.com
Fri May 8 16:18:56 EDT 2009


Sam Ravnborg wrote:
>> diff --git a/scripts/bin_size b/scripts/bin_size
>> index 43e1b36..55f2161 100644
>> --- a/scripts/bin_size
>> +++ b/scripts/bin_size
>> @@ -1,10 +1,14 @@
>>  #!/bin/sh
>>  
>>  if [ $# = 0 ] ; then
>> -   echo Usage: $0 file
>> +   echo Usage: $0 file...
>>  fi
>>  
>> -size_dec=`stat -c "%s" $1`
>> +size_dec=0
>> +for file; do
>> +  fsize=`stat -c "%s" $file`
>> +  size_dec=`expr $size_dec + $fsize`
>> +done
>>  size_hex_echo_string=`printf "%08x" $size_dec |
>>       sed 's/\(..\)\(..\)\(..\)\(..\)/\\\\x\4\\\\x\3\\\\x\2\\\\x\1/g'`
>>  /bin/echo -ne $size_hex_echo_string
> 
> But I would rather have had this inside makefile.lib...
> 

It's messy enough as a shell script... it seems like baking it into 
Makefile syntax would make it even worse.

	-hpa




More information about the kexec mailing list