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
d5c0a67c82
commit
c9a3d28e97
@ -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…
x
Reference in New Issue
Block a user