Re: [KBUILD] 2.x.x mkdep incorrectly handles serial.c (and probably others)

Michael Elizabeth Chastain (mec@shout.net)
Fri, 11 Jun 1999 23:02:50 -0500


Hi Keith,

> Changing CONFIG_SERIAL_SHARE_IRQ with no other changes does *not*
> recompile serial.c but it should.

Good bug report. Ok, I believe I see the problem. Here is the structure
of drivers/char/serial.c:

#if 0
#define CONFIG_SERIAL_MANY_PORTS
...
#endif

... uses of CONFIG_SERIAL_MANY_PORTS ...

mkdep.c sees the definition of CONFIG_SERIAL_MANY_PORTS and says "oh
this is not an autoconfig variable; serial.c explicitly defines it".
This is why your patch to serial.c avoids the problem. It's really a
bug in mkdep.c: it doesn't understand the effects of #if lines.

Would you like to fool around with mkdep.c? Right around here:

pound_define_undef_CONFIG_word:
GETNEXT
if (isalnum(current) || current == '_')
goto pound_define_undef_CONFIG_word;
define_config(1, map_dot, next - map_dot - 1);
goto __start;

... try ripping out the call to define_config.

Then make a copy of the include/config directory before and after the
patch, and see how different they are. This should fix the bug, and
also introduce lots of ugly extra lines that don't actually hurt
anything. If it works, that's the route I would like to go.

Michael

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/