aboutsummaryrefslogtreecommitdiff
path: root/lib/libsysdecode
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2017-07-22 12:51:19 +0000
committerKristof Provost <kp@FreeBSD.org>2017-07-22 12:51:19 +0000
commita342f43571b9d96776d35c94c3f98c5f64096c48 (patch)
tree1ff20207be13b8ec51baf1fd297a89974890d194 /lib/libsysdecode
parent03f9f6aa0d519229c4e8c73723abd603ec78cf75 (diff)
Notes
Diffstat (limited to 'lib/libsysdecode')
-rw-r--r--lib/libsysdecode/Makefile2
-rw-r--r--lib/libsysdecode/mkioctls8
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/libsysdecode/Makefile b/lib/libsysdecode/Makefile
index 9ce166c88641..073cb7ad804a 100644
--- a/lib/libsysdecode/Makefile
+++ b/lib/libsysdecode/Makefile
@@ -122,7 +122,7 @@ tables.h: mktables
ioctl.c: .PHONY
.endif
ioctl.c: mkioctls .META
- env CPP="${CPP}" \
+ env CPP="${CPP}" MK_PF="${MK_PF}" \
/bin/sh ${.CURDIR}/mkioctls ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} > ${.TARGET}
beforedepend: ioctl.c tables.h
diff --git a/lib/libsysdecode/mkioctls b/lib/libsysdecode/mkioctls
index 743029a24f20..03f53ead642e 100644
--- a/lib/libsysdecode/mkioctls
+++ b/lib/libsysdecode/mkioctls
@@ -17,8 +17,14 @@ LC_ALL=C; export LC_ALL
# XXX should we use an ANSI cpp?
ioctl_includes=$(
cd $includedir
+
+ filter='tee'
+ if [ "${MK_PF}" == "no" ]; then
+ filter='egrep -v (net/pfvar|net/if_pfsync)\.h'
+ fi
+
find -H -s * -name '*.h' | \
- egrep -v '(net/pfvar|net/if_pfsync)\.h' | \
+ $filter | \
xargs egrep -l \
'^#[ ]*define[ ]+[A-Za-z_][A-Za-z0-9_]*[ ]+_IO[^a-z0-9_]' |
awk '{printf("#include <%s>\\n", $1)}'