lkml.org 
[lkml]   [1999]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [KBUILD] 2.x.x mkdep incorrectly handles serial.c (and probably others)
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [from the cache]
©2003-2011 Jasper Spaans