On Thu, Jan 09, 2003 at 11:33:32PM +0100, Petr Vandrovec wrote:
> So I'd like to ask whether current kernel build system is supposed
> to track changes in include files automagically, or whether I'm supposed
> to run 'make dep' from time to time?
Hi Petr,
First of all:
1) kbuild track changes in referenced include files
2) kbuild track changes in relevant CONFIG options
2) is done using the executable split-include.
When run split-include creates a tree of files in:
include/config/*
CONFIG_SND_PCM_OSS creates a file named include/config/snd/pcm, with the
name oss.h. oss.h contains
#define CONFIG_SND_PCM_OSS 1
split-include uses this to determine if the config option in question
has changed such that only files containing changes are touched.
split-include is run when include/linux/autoconf.h has changed.
And autoconf.h has .config as the prerequisite, so each time the
configuration has changed autoconf.h is generated, and all relevant
files in include/config/* is updated.
1) When a .c/.S file is compiled the option
-Wp,-MD,arch/i386/kernel/.mpparse.o.d
is used to generate a file containing dependencies as gcc sees it.
Now the binary fixdep is used to generate dependencies including references
to all include/config/* files corresponding to all cONfig options used
in a given file.
Try to view a .*.o.cmd file in kernel/ ar similar.
Until now I'm only aware of one set of problems that kbuild does not
handle correct. That is when the timestamp of the files goes backward.
This happens at least in the following situations:
1) A file is saved, and mv is used to restore the original
2) CVS is configured to preserve original timestamp when files are 'dumped'
3) NFS mounted filesystems where the clock is wrong. Timezone
inconsistency for eaxmple.
I assume you were hit by some flavour of 1) ???
kbuild-2.5 by Keith Ownes included timestamp checks, so that would have
catched the three cases described above.
I do not see any clean way to introduce this in existing kbuild,
and neither do i see a big need for it.
Anyway this belongs to the make problem domain - not kbuild core.
Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:33 EST