Commit 753d7054 authored by Randy Dunlap's avatar Randy Dunlap Committed by Linus Torvalds
Browse files

documentation: remove smart-config.txt

As requested by Sam Ravnborg: Remove Documentation/smart-config.txt.

It is outdated and has been (functionally) replaced by
Signed-off-by: default avatarRandy Dunlap <>
Signed-off-by: default avatarLinus Torvalds <>
parent 3dd7b71c
......@@ -329,8 +329,6 @@ sgi-visws.txt
- short blurb on the SGI Visual Workstations.
- directory with info on porting Linux to a new architecture.
- description of the Smart Config makefile feature.
- directory with info on sound card support.
Smart CONFIG_* Dependencies
1 August 1999
Michael Chastain <>
Werner Almesberger <>
Martin von Loewis <>
Here is the problem:
Suppose that drivers/net/foo.c has the following lines:
#include <linux/config.h>
/* Code for auto-frobbing */
/* Manual frobbing only */
/* Code for model two */
Now suppose the user (the person building kernels) reconfigures the
kernel to change some unrelated setting. This will regenerate the
file include/linux/autoconf.h, which will cause include/linux/config.h
to be out of date, which will cause drivers/net/foo.c to be recompiled.
Most kernel sources, perhaps 80% of them, have at least one CONFIG_*
dependency somewhere. So changing _any_ CONFIG_* setting requires
almost _all_ of the kernel to be recompiled.
Here is the solution:
We've made the dependency generator, mkdep.c, smarter. Instead of
generating this dependency:
drivers/net/foo.c: include/linux/config.h
It now generates these dependencies:
drivers/net/foo.c: \
include/config/foo/autofrob.h \
So drivers/net/foo.c depends only on the CONFIG_* lines that
it actually uses.
A new program, split-include.c, runs at the beginning of
compilation (make bzImage or make zImage). split-include reads
include/linux/autoconf.h and updates the include/config/ tree,
writing one file per option. It updates only the files for options
that have changed.
Flag Dependencies
Martin Von Loewis contributed another feature to this patch:
'flag dependencies'. The idea is that a .o file depends on
the compilation flags used to build it. The file foo.o has
its flags stored in
Suppose the user changes the foo driver from resident to modular.
'make' will notice that the current foo.o was not compiled with
-DMODULE and will recompile foo.c.
All .o files made from C source have flag dependencies. So do .o
files made with ld, and .a files made with ar. However, .o files
made from assembly source do not have flag dependencies (nobody
needs this yet, but it would be good to fix).
Per-source-file Flags
Flag dependencies also work with per-source-file flags.
You can specify compilation flags for individual source files
like this:
This helps clean up drivers/net/Makefile, drivers/scsi/Makefile,
and several other Makefiles.
Werner Almesberger had the original idea and wrote the first
version of this patch.
Michael Chastain picked it up and continued development. He is
now the principal author and maintainer. Please report any bugs
to him.
Martin von Loewis wrote flag dependencies, with some modifications
by Michael Chastain.
Thanks to all of the beta testers.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment