Plan 9 from Bell Labs’s /usr/web/sources/plan9/sys/src/ape/lib/ap/syscall/genall

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc
# genall - generate the APE versions of the system call C interfaces.
#	must be invoked by mk so that the right env variables are set.
rfork e
# ugh. sources's build process can't hack absolute path names.
# we're in /sys/src/ape/lib/ap/syscall.
SYSH=../../../../libc/9syscall/sys.h	# /sys/src/libc/9syscall/sys.h

SYS=`{sed '/^#define._/d; s/#define.([A-Z0-9_]*).*/\1/' $SYSH}
for(I in $SYS) {
	i=_^$I
	n=`{sed -n '/[ 	]'$I'[ 	]/s/.*	//p' $SYSH}
	gencall
}
ar vu /$objtype/lib/ape/libap.a *.$O
rm -f *.$O *.s

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].