1#!/bin/rc 2# genall - generate the APE versions of the system call C interfaces. 3# must be invoked by mk so that the right env variables are set. 4rfork e 5# ugh. sources's build process can't hack absolute path names. 6# we're in /sys/src/ape/lib/ap/syscall. 7SYSH=../../../../libc/9syscall/sys.h # /sys/src/libc/9syscall/sys.h 8 9SYS=`{sed '/^#define._/d; s/#define.([A-Z0-9_]*).*/\1/' $SYSH} 10for(I in $SYS) { 11 i=_^$I 12 n=`{sed -n '/[ ]'$I'[ ]/s/.* //p' $SYSH} 13 gencall 14} 15ar vu /$objtype/lib/ape/libap.a *.$O 16rm -f *.$O *.s 17