libk  Diff

Differences From Artifact [5f22a34160]:

To Artifact [520c125701]:


187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
mkdir -p $gen
$cc -D_emit_m4_include arch/typesize.c -o $gen/typesize 
$gen/typesize > gen/typesize.m

# generate syscall tables
if test $posix = yes; then
	# on posix, we simply abuse CPP to garner a list of syscalls;
	# the file arch/posix_syscalls contains a list of syscalls
	# we wish to import; we use sed to transform this into a form
	# that cpp will fill out for us, producing a table that the
	# awk scripts can handle and turn into a list of constants.
	echo '#include <sys/syscall.h>' > $gen/system_calls.t.1 # this is the magic part
	cat arch/posix_syscalls > $gen/system_calls.t.2
	sed -e 's;^\(.*\)$;\1 SYS_\1;' -i $gen/system_calls.t.2
	cat $gen/system_calls.t.1 $gen/system_calls.t.2 | cpp -P >$gen/system_calls.tbl
else
	case $os in
		# lin) grep -h "#define __NR_" $p_headers_syscall | sed 's;^#define __NR_;;' > $gen/system_calls.tbl;;
		# fbsd) grep -h "#define	SYS_" $p_headers_syscall | sed 's;^#define	SYS_;;' | sed 's;[\t ]\+; ;' > $gen/system_calls.tbl;;
		*) noimpl 'system call table generation';;







|




|







187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
mkdir -p $gen
$cc -D_emit_m4_include arch/typesize.c -o $gen/typesize 
$gen/typesize > gen/typesize.m

# generate syscall tables
if test $posix = yes; then
	# on posix, we simply abuse CPP to garner a list of syscalls;
	# the file arch/posix/syscalls contains a list of syscalls
	# we wish to import; we use sed to transform this into a form
	# that cpp will fill out for us, producing a table that the
	# awk scripts can handle and turn into a list of constants.
	echo '#include <sys/syscall.h>' > $gen/system_calls.t.1 # this is the magic part
	cat arch/posix/syscalls > $gen/system_calls.t.2
	sed -e 's;^\(.*\)$;\1 SYS_\1;' -i $gen/system_calls.t.2
	cat $gen/system_calls.t.1 $gen/system_calls.t.2 | cpp -P >$gen/system_calls.tbl
else
	case $os in
		# lin) grep -h "#define __NR_" $p_headers_syscall | sed 's;^#define __NR_;;' > $gen/system_calls.tbl;;
		# fbsd) grep -h "#define	SYS_" $p_headers_syscall | sed 's;^#define	SYS_;;' | sed 's;[\t ]\+; ;' > $gen/system_calls.tbl;;
		*) noimpl 'system call table generation';;