Messages in this thread | | | From | Keith Owens <> | Subject | Re: [KBUILD] 2.x.x mkdep incorrectly handles serial.c (and probably others) | Date | Sun, 13 Jun 1999 12:22:04 +1000 |
| |
On Sat, 12 Jun 1999 10:48:54 -0400 (EDT), <hagopiar@vuser.vu.union.edu> wrote: >Doesn't the gcc dependancy generation take all the #if lines into account?
It is a long time since mkdep used gcc dependancies. Now it just does a straight text scan of the source, looking for string patterns. It makes more sense that way.
#ifdef CONFIG_option1 ... #ifdef CONFIG_option2 ... #endif ... #endif
gcc dependancy with CONFIG_option1 undefined claims that the source is only dependent on CONFIG_option1. But setting CONFIG_option1 makes it dependent on CONFIG_option2 as well. To pick that up, you would have to run make dep after *every* option change. That relies on users doing it every time, not a chance, somebody is bound to forget.
A straight text scan picks up all dependencies, no need to run make dep after changing options. The downside is that we sometimes get extra compiles, e.g. changing CONFIG_option2 while CONFIG_option1 was still undefined would recompile that source when it did not really need to. Fortunately this rarely occurs and is not much extra work when it does. Better safe than sorry.
- 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/
| |