Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/kdump - instead of hard-coding the include paths in ...



details:   https://anonhg.NetBSD.org/src/rev/2e1fb119435c
branches:  trunk
changeset: 323358:2e1fb119435c
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jun 12 15:40:39 2018 +0000

description:
- 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.

diffstat:

 usr.bin/kdump/Makefile.ioctl-c |  14 ++++++++------
 usr.bin/kdump/mkioctls         |  15 ++++++---------
 2 files changed, 14 insertions(+), 15 deletions(-)

diffs (68 lines):

diff -r 4526e26905c0 -r 2e1fb119435c usr.bin/kdump/Makefile.ioctl-c
--- a/usr.bin/kdump/Makefile.ioctl-c    Tue Jun 12 14:13:55 2018 +0000
+++ b/usr.bin/kdump/Makefile.ioctl-c    Tue Jun 12 15:40:39 2018 +0000
@@ -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 @@
 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__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
diff -r 4526e26905c0 -r 2e1fb119435c usr.bin/kdump/mkioctls
--- a/usr.bin/kdump/mkioctls    Tue Jun 12 14:13:55 2018 +0000
+++ b/usr.bin/kdump/mkioctls    Tue Jun 12 15:40:39 2018 +0000
@@ -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 @@
                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



Home | Main Index | Thread Index | Old Index