libk  Diff

Differences From Artifact [15fc50281c]:

To Artifact [81c1265d8b]:


215
216
217
218
219
220
221

222

223
224
225
226
227
228
229
230
# generate syscall tables
case $os in
	lin) grep -h "#define __NR_" $p_headers_syscall | sed 's;^#define __NR_;;' > $gen/calls.tbl;;
	fbsd) grep -h "#define	SYS_" $p_headers_syscall | sed 's;^#define	SYS_;;' | sed 's;[\t ]\+; ;' > $gen/calls.tbl;;
	*) noimpl 'system call table generation';;
esac


awk -f arch/syscall.awk -v out=s <$gen/calls.tbl >$gen/system_calls.s

awk -f arch/syscall.awk -v out=h <$gen/calls.tbl >$gen/system_calls.h

# generate errno tables
grep -h "#[ 	]*define[ 	]\+E" $p_headers_errno | sed 's;^#[\t ]*define[\t ]\+\(E[A-Z0-9]\+\).*$;k_platform_error_\1 \1;' > $gen/error_names.tbl
cat $p_headers_errno $gen/error_names.tbl | cpp -P >$gen/error_numbers.tbl
awk -f arch/errtbl.awk <$gen/error_numbers.tbl >$gen/error_table.h

# generate symbol tables for error handling functions







>
|
>
|







215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# generate syscall tables
case $os in
	lin) grep -h "#define __NR_" $p_headers_syscall | sed 's;^#define __NR_;;' > $gen/calls.tbl;;
	fbsd) grep -h "#define	SYS_" $p_headers_syscall | sed 's;^#define	SYS_;;' | sed 's;[\t ]\+; ;' > $gen/calls.tbl;;
	*) noimpl 'system call table generation';;
esac

cat $p_headers_syscall $gen/calls.tbl | cpp -P |
	awk -f arch/syscall.awk -v out=s >$gen/system_calls.s
cat $p_headers_syscall $gen/calls.tbl | cpp -P |
	awk -f arch/syscall.awk -v out=h >$gen/system_calls.h

# generate errno tables
grep -h "#[ 	]*define[ 	]\+E" $p_headers_errno | sed 's;^#[\t ]*define[\t ]\+\(E[A-Z0-9]\+\).*$;k_platform_error_\1 \1;' > $gen/error_names.tbl
cat $p_headers_errno $gen/error_names.tbl | cpp -P >$gen/error_numbers.tbl
awk -f arch/errtbl.awk <$gen/error_numbers.tbl >$gen/error_table.h

# generate symbol tables for error handling functions