Changeset View
Changeset View
Standalone View
Standalone View
head/lib/libsysdecode/mkioctls
Show All 11 Lines | |||||
includedir="$1" | includedir="$1" | ||||
LC_ALL=C; export LC_ALL | LC_ALL=C; export LC_ALL | ||||
# Build a list of headers that have ioctls in them. | # Build a list of headers that have ioctls in them. | ||||
# XXX should we use an ANSI cpp? | # XXX should we use an ANSI cpp? | ||||
ioctl_includes=$( | ioctl_includes=$( | ||||
cd $includedir | cd $includedir | ||||
filter='tee' | |||||
if [ "${MK_PF}" == "no" ]; then | |||||
filter='egrep -v (net/pfvar|net/if_pfsync)\.h' | |||||
fi | |||||
find -H -s * -name '*.h' | \ | find -H -s * -name '*.h' | \ | ||||
egrep -v '(net/pfvar|net/if_pfsync)\.h' | \ | $filter | \ | ||||
xargs egrep -l \ | xargs egrep -l \ | ||||
'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | | '^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' | | ||||
awk '{printf("#include <%s>\\n", $1)}' | awk '{printf("#include <%s>\\n", $1)}' | ||||
) | ) | ||||
awk -v x="$ioctl_includes" 'BEGIN {print x}' | | awk -v x="$ioctl_includes" 'BEGIN {print x}' | | ||||
$CPP -nostdinc -I$includedir -dM -DCOMPAT_43TTY - | | $CPP -nostdinc -I$includedir -dM -DCOMPAT_43TTY - | | ||||
awk -v ioctl_includes="$ioctl_includes" ' | awk -v ioctl_includes="$ioctl_includes" ' | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |