Re: 2.2.0-pre6: Problem with module versions since

Martijn van Oosterhout (v3100411@student.anu.edu.au)
Wed, 13 Jan 1999 05:22:25 +0000


Michael Elizabeth Chastain wrote:
>
> Hi Martin,
>
> > Also, make dep seems to recurse through _all_ subdirectories,
> > including ones I never use (like drivers/macintosh).
> > ie: One goes through $(ALL_SUB_DIRS), the other through
> > $(SUB_DIRS). Maybe it should recurse through
> > $(sort $(SUB_DIRS) $(MOD_SUB_DIRS) $(MOD_IN_SUB_DIRS))
>
> This is correct. 'make dep' needs to visit $(ALL_SUB_DIRS) so that if
> you change your configuration, the dependency files are still correct.

I disagree. All that fastdep does is generate a .depend file
in *that* directory. If that directory is not recursed through
by the main compile or module compile, that file is never used.

> scripts/mkdep is super fast, and it works properly even if the source
> file includes header files that don't exist on your architecture, like
> <asm/prom.h> in drivers/macintosh/adb.c.

Super fast huh? It takes 90 secs to do the dependancies. That
about 10% of the total compile on my machine for everything.
Since more than half of the directories it recurses are never
looked at anywhere else, it seems a bit of a waste.

> You only get a problem if you turn CONFIG_MODVERSIONS on. Then it
> tries to genksym files that aren't in your configuration and cpp
> gives error messages. But 'make' ignores the errors so 'make dep'
> staggers to completion.

genksyms? where? The output of make dep doesn't mention
the word genksyms, module or anything like that anywhere.

Just for arguments sake, I actually implemented it, and it
cut the dep time down to 38 seconds, with no ill effects.
All the .depend files that needed to exist, exist.

Here's the patch. Ofcourse MY_SUB_DIRS is a bad name, bad
I'm trying to make a point.
==========================================================================
--- Rules.make.orig Wed Jan 13 16:06:56 1999
+++ Rules.make Wed Jan 13 16:08:55 1999
@@ -104,10 +104,11 @@
#
# This make dependencies quickly
#
+MY_SUB_DIRS := $(sort $(SUB_DIRS) $(MOD_SUB_DIRS) $(MOD_IN_SUB_DIRS) )
fastdep: dummy
$(TOPDIR)/scripts/mkdep $(wildcard *.[chS] local.h.master) >
.depend
-ifdef ALL_SUB_DIRS
- $(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS))
_FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
+ifneq ($(MY_SUB_DIRS),)
+ $(MAKE) $(patsubst %,_sfdep_%,$(MY_SUB_DIRS))
_FASTDEP_ALL_SUB_DIRS="$(MY_SUB_DIRS)"
endif

ifdef _FASTDEP_ALL_SUB_DIRS
==========================================================================

Martijn van Oosterhout
Australia

-
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/