lkml.org 
[lkml]   [1996]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: source dependencies cleanup?
Date

In linux.dev.kernel, article <199612040008.AAA00373@oboe.it.uc3m.es>,
"Peter T. Breuer" <ptb@oboe.it.uc3m.es> writes:
>
> > Not a major pain as the kernel takes a while to compile on this machine
> > anyway but I believe (after a quick perusal of the .depend files) that
> > mkdep is fast mainly because it skips stuff.
>
> Absolutely wrong (i.e. "that turns out not to be the case" :). It is

Sorry, but Linus' mkdep _does_ skip stuff.

Assume that a1.c and a2.c both include b.h which in turn includes c.h.

GCC -M output would be
a1.o: a1.c b.h c.h
a2.o: a1.c b.h c.h

Linus' mkdep instead depends on being executed on the heders too:
a1.o: a1.c b.h
a2.o: a1.c b.h
b.h: c.h
touch b.h

This all works out perfectly well. Well... almost. The big advantage of the
latter is that you scan b.h only once; gcc scans it twice. The big
disadvantage is that you can't keep your kernel sources on a readonly
partition.

--
It were not best that we should all think alike; it is the difference
of opinion that makes horse races.
--
Matthias Urlichs \ noris network GmbH / Xlink-POP Nürnberg
Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de
90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing
PGP: 1024/4F578875 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE
Click <A HREF="http://info.noris.de/~smurf/finger">here</A>. 42

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