AUTOGEN (1119B)
1 #!/bin/sh 2 3 # Most of the library files come in virtually unchanged. 4 # Rather than maintain the few changes by hand, we keep a set 5 # of ed scripts that we can run on the originals to produce 6 # the versions we need. 7 # 8 # Note that the headers are in ../a 9 10 autofiles=" 11 /sys/src/libsec/port/aes.c 12 /sys/src/libsec/port/des.c 13 /sys/src/libsec/port/des3CBC.c 14 /sys/src/libsec/port/desmodes.c 15 /sys/src/libsec/port/hmac.c 16 /sys/src/libsec/port/md4.c 17 /sys/src/libsec/port/md5.c 18 /sys/src/libsec/port/md5block.c 19 /sys/src/libsec/port/rc4.c 20 /sys/src/libsec/port/sha1.c 21 /sys/src/libsec/port/sha1block.c 22 " 23 24 case "$#" in 25 0) 26 ;; 27 *) 28 autofiles="$*" 29 esac 30 31 plan9=/home/rsc/plan9/4e 32 33 for f in $autofiles 34 do 35 ed=`echo $f | sed 's;.*/;;; s;\.[ch]$;;; s;$;.ed;'` 36 out=`echo $f | sed 's;.*/;;;'` 37 echo $f '->' $out 38 test -f $out && chmod +w $out 39 ( 40 echo ',s;"../port/;";g' 41 echo ',s;#include.*<;#include ";g' 42 echo ',s;#include.*>;&FIXINCLUDEME;g' 43 echo ',s;>FIXINCLUDEME;";g' 44 echo ',s;"libc.h";"lib.h";g' 45 echo 'g/#pragma/d' 46 test -f $ed && cat $ed 47 echo w $out 48 echo q 49 ) | ed $plan9/$f 2>&1 | egrep -v '^[0-9?]+$' 50 chmod -w $out 51 done