mkblob (358B)
1 #!/bin/sh 2 3 set -e 4 trap 'rm -f $$.tmp' EXIT HUP INT QUIT TERM 5 rm -f blobs.mk 6 7 ./section blob $@ | 8 awk -v type=${type=k} ' 9 NF==1 {blobfil[$1] = 1} 10 END {mkrules()} 11 12 function mkrules() 13 { 14 print "BLOBS = \\" 15 for (i in blobfil) 16 printf "\t%s\\\n", i 17 print "" 18 19 printf "blobfil.h: $(BLOBS)\n" 20 printf "\t./mkblobfil $(BLOBS)\n" 21 } 22 '> $$.tmp && mv $$.tmp blobs.mk