2013-04-05 02:35:28 +04:00
|
|
|
# $NetBSD: Makefile.ioctl-c,v 1.24 2013/04/04 22:35:28 dsl Exp $
|
2002-09-19 15:31:21 +04:00
|
|
|
|
|
|
|
# NOTE: <bsd.own.mk> needs to be previously .included for NETBSDSRCDIR
|
1999-07-12 08:13:34 +04:00
|
|
|
|
2013-04-05 02:35:28 +04:00
|
|
|
# We are trying to get the list of .h files that define all ioctls
|
|
|
|
# This version grabs the non-obsolete .h files from the set lists
|
|
|
|
# and silently ignores any that don't exist in ${DESTDIR}.
|
|
|
|
# NB: The compiler uses the .h files in ${NETBSDSRCDIR}.
|
|
|
|
|
|
|
|
SETBASE=${NETBSDSRCDIR}/distrib/sets/lists/comp
|
|
|
|
SETFILES:=${SETBASE}/mi
|
|
|
|
.for md in md.${MACHINE} /md.${MACHINE}.${MACHINE_ARCH}
|
|
|
|
.if exists(${SETBASE}/${md})
|
|
|
|
SETFILES:= ${SETFILES} ${SETBASE}/${md}
|
|
|
|
.endif
|
|
|
|
.endfor
|
2003-08-28 00:35:42 +04:00
|
|
|
|
2004-07-07 18:28:17 +04:00
|
|
|
.if !make(cleandir) && !make(obj) && !make(includes)
|
2013-04-05 02:35:28 +04:00
|
|
|
DEPFILEGLOB != ${TOOL_SED} -ne '/\/usr\/include\/.*\.h[ ]/{s/[ ]obsolete$$//;t' -e 's/xenio//;t' -e 's,\.\([^ ]*\).*,${DESTDIR}\1,;p;}' ${SETFILES}
|
|
|
|
DEPFILES != egrep -l '(_IO\(|_IOR\(|_IOW\(|_IOWR\()' ${DEPFILEGLOB} 2>/dev/null || :
|
2003-04-18 18:43:49 +04:00
|
|
|
.endif
|
2003-04-13 09:04:00 +04:00
|
|
|
|
2013-04-05 02:35:28 +04:00
|
|
|
${PROG}-ioctl.c: mkioctls Makefile ${DEPFILES} ${SETFILES}
|
2003-10-21 14:01:19 +04:00
|
|
|
${_MKTARGET_CREATE}
|
2008-10-26 02:23:55 +04:00
|
|
|
AWK=${TOOL_AWK:Q} CC="${CC}" DESTDIR="${DESTDIR}" SED=${TOOL_SED:Q} \
|
2003-10-19 08:25:00 +04:00
|
|
|
${HOST_SH} ${NETBSDSRCDIR}/usr.bin/kdump/mkioctls \
|
2004-07-10 16:12:49 +04:00
|
|
|
${DEPFILES} >${.TARGET}
|
|
|
|
|
|
|
|
SRCS+= ${PROG}-ioctl.c
|
|
|
|
CLEANFILES+= ${PROG}-ioctl.c
|
2008-02-16 10:17:58 +03:00
|
|
|
DPSRCS+= ${PROG}-ioctl.c
|
2000-07-27 15:51:14 +04:00
|
|
|
|
2003-04-13 09:04:00 +04:00
|
|
|
${DEPFILES}: .PRECIOUS
|