Module Name: src
Committed By: christos
Date: Tue Jun 12 15:40:39 UTC 2018
Modified Files:
src/usr.bin/kdump: Makefile.ioctl-c mkioctls
Log Message:
- instead of hard-coding the include paths in mkioctls, pass them in
from the Makefile so that they are consistent.
- do more sed so that destination paths are not hard-coded inside #include
statements.
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/usr.bin/kdump/Makefile.ioctl-c
cvs rdiff -u -r1.51 -r1.52 src/usr.bin/kdump/mkioctls
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/kdump/Makefile.ioctl-c
diff -u src/usr.bin/kdump/Makefile.ioctl-c:1.35 src/usr.bin/kdump/Makefile.ioctl-c:1.36
--- src/usr.bin/kdump/Makefile.ioctl-c:1.35 Mon May 28 17:05:02 2018
+++ src/usr.bin/kdump/Makefile.ioctl-c Tue Jun 12 11:40:39 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.ioctl-c,v 1.35 2018/05/28 21:05:02 chs Exp $
+# $NetBSD: Makefile.ioctl-c,v 1.36 2018/06/12 15:40:39 christos Exp $
# NOTE: <bsd.own.mk> needs to be previously .included for NETBSDSRCDIR
@@ -35,11 +35,6 @@ DEPFILEGLOB = ${TOOL_SED} \
DEPFILES != (${DEPFILEGLOB}; echo ${EXTRAS}) | xargs egrep -l '(_IO\(|_IOR\(|_IOW\(|_IOWR\()' 2>/dev/null || :
.endif
-${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 \
- ${DEPFILES} >${.TARGET}
SRCS+= ${PROG}-ioctl.c
CLEANFILES+= ${PROG}-ioctl.c
@@ -65,4 +60,11 @@ CPPFLAGS+= -D__RADEON_DRM_H__ # Dup ioct
CPPFLAGS+= -D__MACH64_DRM_H__ # Dup ioctls
CPPFLAGS+= -D__MGA_DRM_H__ # Dup ioctls
+${PROG}-ioctl.c: mkioctls Makefile ${DEPFILES} ${SETFILES}
+ ${_MKTARGET_CREATE}
+ AWK=${TOOL_AWK:q} CC="${CC:q}" DESTDIR=${DESTDIR:q} SED=${TOOL_SED:q} \
+ NETBSDSRCDIR=${NETBSDSRCDIR:q} CPPFLAGS=${CPPFLAGS:q} \
+ ${HOST_SH} ${NETBSDSRCDIR}/usr.bin/kdump/mkioctls \
+ ${DEPFILES} >${.TARGET}
+
${DEPFILES}: .PRECIOUS
Index: src/usr.bin/kdump/mkioctls
diff -u src/usr.bin/kdump/mkioctls:1.51 src/usr.bin/kdump/mkioctls:1.52
--- src/usr.bin/kdump/mkioctls:1.51 Sat Jun 2 16:07:15 2018
+++ src/usr.bin/kdump/mkioctls Tue Jun 12 11:40:39 2018
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: mkioctls,v 1.51 2018/06/02 20:07:15 mrg Exp $
+# $NetBSD: mkioctls,v 1.52 2018/06/12 15:40:39 christos Exp $
#
# Copyright (c) 1994
# The Regents of the University of California. All rights reserved.
@@ -94,19 +94,16 @@ do
fi;;
esac
echo "#include <$i>"
-done | ${SED} -e "s,${DESTDIR}/usr/include/,,g"
+done | ${SED} -e "s,${DESTDIR}/usr/include/,,g" \
+ -e "s,${DESTDIR}/usr/X11R7/include/,,g" \
+ -e "s,${NETBSDSRCDIR}/external/cddl/osnet/dist/uts/common/,,g"
if ! $needundef; then
echo "#define bool _Bool"
fi
-${CC} -E -nostdinc -isystem ${DESTDIR}/usr/include \
- -I${DESTDIR}/usr/X11R7/include \
- -I${DESTDIR}/usr/X11R7/include/pixman-1 \
- -I${DESTDIR}/usr/X11R7/include/libdrm \
- -D_VIA_DRM_H_ \
- -dM "${@}" | \
-${AWK} '
+${CC} -E -nostdinc -isystem ${DESTDIR}/usr/include ${CPPFLAGS} -dM "${@}" | \
+ ${AWK} '
BEGIN {
keep["SLIOCGUNIT"] = 1; # Same as PPPIOCGASYNCMAP
keep["TUNSLMODE"] = 1; # Same as PPPIOCGASYNCMAP