git: dc39a3346e7d - main - Make #if and #endif do what people expect in *_if.m
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Oct 2022 13:35:44 UTC
The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=dc39a3346e7d492114e94ddec7049e720579d6f3 commit dc39a3346e7d492114e94ddec7049e720579d6f3 Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2022-09-30 16:02:36 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2022-10-06 13:35:31 +0000 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 --- sys/tools/makeobjops.awk | 5 +++++ 1 file changed, 5 insertions(+) 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 ...