aboutsummaryrefslogtreecommitdiff
path: root/sys/tools
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2022-09-30 16:02:36 +0000
committerAndrew Turner <andrew@FreeBSD.org>2022-10-06 13:35:31 +0000
commitdc39a3346e7d492114e94ddec7049e720579d6f3 (patch)
tree63a43966a5bfadfbe4c9a52715a1d31b871cec3b /sys/tools
parent232323a531f42b7ecd60e8b67934c0225a1651ab (diff)
downloadsrc-dc39a3346e7d492114e94ddec7049e720579d6f3.tar.gz
src-dc39a3346e7d492114e94ddec7049e720579d6f3.zip
Make #if and #endif do what people expect in *_if.m
These are used in a few places. Pass them to the generated .c and .h files to allow us to build the parts of the interface the kernel config supports. Reviewed by: imp, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D36882
Diffstat (limited to 'sys/tools')
-rw-r--r--sys/tools/makeobjops.awk5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/tools/makeobjops.awk b/sys/tools/makeobjops.awk
index 5a4ccf759960..4d764064d6b1 100644
--- a/sys/tools/makeobjops.awk
+++ b/sys/tools/makeobjops.awk
@@ -466,6 +466,11 @@ for (file_i = 0; file_i < num_files; file_i++) {
debug("Included file: " incld);
printc("#include " incld);
}
+ else if (/^#[ ]*if/ || /^#[ ]*else/ || /^#[ ]*elif/ ||
+ /^#[ ]*endif/) {
+ printh($0);
+ printc($0);
+ }
sub(/#.*/, ""); # remove comments
sub(/^[ ]+/, ""); # remove leading ...