On Sun, May 10, 2015 at 12:08 PM, Paul Goyette <[email protected]> wrote: > The man page for config(9) says the syntax for including source files is > > file pathname [attributes [flags]] [rule] > > It doesn't actually describe the syntax for [rule] but examples seem to > indicate that we can do at least rudimentary boolean expressions, ie > > x & y > x | y | z > x & !w > > Just how complex can these expressions be? For example, can I use > > (a | b) & (x | y | z) > > with parentheses?
That should be possible ... but I would strongly discourage those expressions. In the ideally modular world, one *.c file belongs to one module. That expression was necessary because in the old days kernel was considered to be a single module (== monolithic). > Question 2: does config(1) support '\' at the end of a physical line to > indicate line continuation? (If the complex boolean expression above is > supported, I'm likely to have a longer-than-80-char command!) According to usr.bin/config/scan.l [1], you can simply continue a line by putting a non-whitespace just after '\n'. (If this is wrong, write a test and add it to tests/usr.bin/config. :) [1] http://nxr.netbsd.org/xref/src/usr.bin/config/scan.l#349
