Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/kdump Extract a base list of .h files from the set l...
details: https://anonhg.NetBSD.org/src/rev/fc144c336ada
branches: trunk
changeset: 785893:fc144c336ada
user: dsl <dsl%NetBSD.org@localhost>
date: Thu Apr 04 22:35:28 2013 +0000
description:
Extract a base list of .h files from the set lists instead of looking
at the current contents of ${DESTDIR}.
Ignore missing files and also depend on the set lists themselves.
Should stop the build breaking here if there are extra files in DESTDIR (etc).
NB: The order of the .h files matters somewhat. Probably works by luck.
diffstat:
usr.bin/kdump/Makefile.ioctl-c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diffs (34 lines):
diff -r 21950fa0f310 -r fc144c336ada usr.bin/kdump/Makefile.ioctl-c
--- a/usr.bin/kdump/Makefile.ioctl-c Thu Apr 04 22:32:12 2013 +0000
+++ b/usr.bin/kdump/Makefile.ioctl-c Thu Apr 04 22:35:28 2013 +0000
@@ -1,14 +1,26 @@
-# $NetBSD: Makefile.ioctl-c,v 1.23 2008/10/25 22:23:55 apb Exp $
+# $NetBSD: Makefile.ioctl-c,v 1.24 2013/04/04 22:35:28 dsl Exp $
# NOTE: <bsd.own.mk> needs to be previously .included for NETBSDSRCDIR
-DEPFILEGLOB= ${DESTDIR}/usr/include/*/*.h ${DESTDIR}/usr/include/*/*/*.h
+# 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
.if !make(cleandir) && !make(obj) && !make(includes)
-DEPFILES != egrep -l '(_IO\(|_IOR\(|_IOW\(|_IOWR\()' ${DEPFILEGLOB} | fgrep -v xenio
+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 || :
.endif
-${PROG}-ioctl.c: mkioctls Makefile ${DEPFILES}
+${PROG}-ioctl.c: mkioctls Makefile ${DEPFILES} ${SETFILES}
${_MKTARGET_CREATE}
AWK=${TOOL_AWK:Q} CC="${CC}" DESTDIR="${DESTDIR}" SED=${TOOL_SED:Q} \
${HOST_SH} ${NETBSDSRCDIR}/usr.bin/kdump/mkioctls \
Home |
Main Index |
Thread Index |
Old Index