diff options
| author | christos <christos@NetBSD.org> | 2004-04-22 22:31:18 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2004-04-22 22:31:18 +0000 |
| commit | 19e4b9c5ad74da38e9744ecaecdade999f00a3d9 (patch) | |
| tree | f24f63f8569659f338dd4abf0778d15b0370015b /usr.bin/kdump | |
| parent | fcce1f91ebf7a541be37b3a1f0553595bb6bd76e (diff) | |
Instead of pussy-footing around and grabbing a few of the ioctl's here and
there randomly, grab all the ioctls from the include files.
Read the XXX's in mkioctls about problems with our header files.
Diffstat (limited to 'usr.bin/kdump')
| -rw-r--r-- | usr.bin/kdump/Makefile.ioctl-c | 19 | ||||
| -rw-r--r-- | usr.bin/kdump/mkioctls | 40 |
2 files changed, 32 insertions, 27 deletions
diff --git a/usr.bin/kdump/Makefile.ioctl-c b/usr.bin/kdump/Makefile.ioctl-c index 663fdacf37f..e2e5ace900e 100644 --- a/usr.bin/kdump/Makefile.ioctl-c +++ b/usr.bin/kdump/Makefile.ioctl-c @@ -1,24 +1,17 @@ -# $NetBSD: Makefile.ioctl-c,v 1.10 2003/10/21 10:01:22 lukem Exp $ +# $NetBSD: Makefile.ioctl-c,v 1.11 2004/04/22 22:31:18 christos Exp $ # NOTE: <bsd.own.mk> needs to be previously .included for NETBSDSRCDIR -DEPFILEGLOB= ${DESTDIR}/usr/include/sys/*.h \ - ${DESTDIR}/usr/include/net/*.h \ - ${DESTDIR}/usr/include/netinet/*.h \ - ${DESTDIR}/usr/include/crypto/*.h +DEPFILEGLOB= ${DESTDIR}/usr/include/*/*.h -SEARCHFILES= ${DESTDIR}/usr/include/sys/ioctl.h \ - ${DESTDIR}/usr/include/sys/ioctl_compat.h \ - ${DESTDIR}/usr/include/crypto/cryptodev.h - -.if !target(cleandir) && !target(obj) -DEPFILES != grep -l '_IO.*(' ${DEPFILEGLOB} +.if !target(obj) && !target(clean) +DEPFILES != egrep -l '(_IO\(|_IOR\(|_IOW\(|_IORW\()' ${DEPFILEGLOB} .endif -ioctl.c: mkioctls ${DEPFILES} +ioctl.c: mkioctls Makefile ${DEPFILES} ${_MKTARGET_CREATE} CC="${CC}" DESTDIR=${DESTDIR} \ ${HOST_SH} ${NETBSDSRCDIR}/usr.bin/kdump/mkioctls \ - ${SEARCHFILES} > ioctl.c + ${DEPFILES} > ioctl.c ${DEPFILES}: .PRECIOUS diff --git a/usr.bin/kdump/mkioctls b/usr.bin/kdump/mkioctls index ee40bb9fe34..818484036c8 100644 --- a/usr.bin/kdump/mkioctls +++ b/usr.bin/kdump/mkioctls @@ -1,5 +1,5 @@ -#!/bin/sh - -# $NetBSD: mkioctls,v 1.13 2003/08/27 20:35:42 thorpej Exp $ +#!/bin/sh +# $NetBSD: mkioctls,v 1.14 2004/04/22 22:31:18 christos Exp $ # # Copyright (c) 1994 # The Regents of the University of California. All rights reserved. @@ -34,20 +34,32 @@ # # @(#)mkioctls 8.2 (Berkeley) 4/28/95 # +echo "#define const" # XXX: timepps lossage +echo "struct ap_control { int _xxx; };" # XXX: ip_nat.h lossage +echo "#define COMPAT_43" +echo "struct lwp;" +echo "#include <sys/types.h>" +echo "#include <sys/param.h>" +echo "#include <sys/disk.h>" +echo "#include <sys/mount.h>" +echo "#include <sys/termios.h>" +echo "#include <net/if.h>" +echo "#include <net/route.h>" +echo "#include <net/ppp_defs.h>" +echo "#include <netinet/in.h>" +echo "#include <netinet/in_systm.h>" +echo "#include <netinet/ip.h>" +echo "#include <netinet/ip_mroute.h>" +echo "#include <netinet/ip_compat.h>" +echo "#include <net80211/ieee80211.h>" +echo "#include <netiso/iso.h>" +for i +do + echo "#include <$i>" +done | sed -e "s,${DESTDIR}/usr/include/,,g" + ${CC:-cc} -E -nostdinc -idirafter $DESTDIR/usr/include -dM ${1+"$@"} | awk ' BEGIN { - print "#include <sys/param.h>" - print "#include <sys/socket.h>" - print "#include <sys/sockio.h>" - print "#include <sys/socketvar.h>" - print "#include <net/route.h>" - print "#include <net/if.h>" - print "#include <netinet/in.h>" - print "#include <netinet/ip_mroute.h>" - print "#include <sys/termios.h>" - print "#define COMPAT_43" - print "#include <sys/ioctl.h>" - print "#include <crypto/cryptodev.h>" print "" print "char *ioctlname __P((long));" print "" |
