17ad596ffSDavid du Colombier#!/bin/rc 27ad596ffSDavid du Colombier# genall - generate the APE versions of the system call C interfaces. 37ad596ffSDavid du Colombier# must be invoked by mk so that the right env variables are set. 47ad596ffSDavid du Colombierrfork e 5*6b0d5c8bSDavid du Colombier# ugh. sources's build process can't hack absolute path names. 6*6b0d5c8bSDavid du Colombier# we're in /sys/src/ape/lib/ap/syscall. 7*6b0d5c8bSDavid du ColombierSYSH=../../../../libc/9syscall/sys.h # /sys/src/libc/9syscall/sys.h 87ad596ffSDavid du Colombier 97ad596ffSDavid du ColombierSYS=`{sed '/^#define._/d; s/#define.([A-Z0-9_]*).*/\1/' $SYSH} 107ad596ffSDavid du Colombierfor(I in $SYS) { 117ad596ffSDavid du Colombier i=_^$I 127ad596ffSDavid du Colombier n=`{sed -n '/[ ]'$I'[ ]/s/.* //p' $SYSH} 137ad596ffSDavid du Colombier gencall 147ad596ffSDavid du Colombier} 157ad596ffSDavid du Colombierar vu /$objtype/lib/ape/libap.a *.$O 167ad596ffSDavid du Colombierrm -f *.$O *.s 17