Clean up mkioctls a bit, and fix cross-building by checking ${MACHINE}
instead of $(uname -m). Pointed out by: nyan@
This commit is contained in:
parent
5f81660285
commit
51b6c61f98
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226344
@ -21,7 +21,8 @@ NO_WERROR?= YES
|
||||
CLEANFILES= ioctl.c kdump_subr.c kdump_subr.h linux_syscalls.c
|
||||
|
||||
ioctl.c: mkioctls
|
||||
sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
|
||||
env MACHINE=${MACHINE} \
|
||||
sh ${.CURDIR}/mkioctls ${DESTDIR}/usr/include > ${.TARGET}
|
||||
|
||||
kdump_subr.h: mksubr
|
||||
sh ${.CURDIR}/mksubr ${DESTDIR}/usr/include | \
|
||||
|
@ -13,15 +13,16 @@ LC_ALL=C; export LC_ALL
|
||||
|
||||
# Build a list of headers that have ioctls in them.
|
||||
# XXX should we use an ANSI cpp?
|
||||
ioctl_includes=`
|
||||
ioctl_includes=$(
|
||||
cd $1
|
||||
find -H -s * -name '*.h' | grep -v '.*disk.*\.h' | \
|
||||
xargs egrep -l \
|
||||
'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' |
|
||||
awk '{printf("#include <%s>\\\\n", $1)}'
|
||||
`
|
||||
awk '{printf("#include <%s>\\n", $1)}'
|
||||
)
|
||||
|
||||
case "`uname -m`" in
|
||||
: ${MACHINE=$(uname -m)}
|
||||
case "${MACHINE}" in
|
||||
*pc98*)
|
||||
ioctl_includes="$ioctl_includes#include <sys/diskpc98.h>\\n"
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user