[lkml]   [2002]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: clean before or after dep?
| From: Alan Cox <>

| > Which is the right order for clean and dep?
| The "kernel-howto" has been badly broken for years. The world would
| actually be better without that document IMHO

OK, but then where is the right documentation?

The top level README mentions "clean" only one place, and it is not

The top level Makefile does not explain the semantics and constraints of
the targets in question.

A grep through Documentation leads to apparent contradictions (this is
from Red Hat LINUX 7.3's linux-2.4.18-10 source):

Files suggesting dep ; clean:

Documentation/DocBook/sis900.tmpl:476:make clean
Documentation/cdrom/cm206:59: make dep; make clean; make zImage; make modules
Documentation/filesystems/devfs/README:713:make xconfig) and then make dep; make clean and then
Documentation/filesystems/devfs/README:1546:Forgetting to run make dep; make clean after changing the
Documentation/kbuild/bug-list.txt:13: on, do a 'make dep' followed by 'make clean' before you try anything
Documentation/modules.txt:27: make clean
Documentation/networking/arcnet.txt:112: make clean
Documentation/networking/arcnet.txt:191: make clean
Documentation/networking/sis900.txt:220:make clean
Documentation/smp.txt:18: time -v sh -c 'make dep ; make clean install modules modules_install'
Documentation/telephony/ixj.txt:366: 4. make dep;make clean;make bzImage;make modules;make modules_install

Files suggesting clean ; dep:

Documentation/isdn/README.HiSax:486: make clean; make dep; make zImage; make modules; make modules_install
Documentation/moxa-smartio:256: b. make clean /* take a few minutes */
Documentation/networking/DLINK.txt:95: # make clean

What are the ordering constraints on mrproper, clean, dep, and
*config? I'd like to characterise all sequences that properly prepare
for a kernel build.

What these targets do, according to README:

mrproper: removes stale .o files and dependencies lying around
clean: ? seems to remove files built by the build process
*config: configure the kernel [build a .config]
dep: set up dependencies

The normal sequence seems to be:
mrproper && *config && dep && build
I'm not sure where clean comes in this sequence. mrproper includes
clean, so this sequence will do it once. Is it needed somewhere after
the *config too?

Is it safe to combine some or all targets in one make command, eg:
make mrproper *config dep build
I've done this for some targets, but I wonder if it is safe to
have dep combined with any following targets since it computes

These issues come up when iteratively trying a kernel build that
fails. What kinds of changes require an mrproper? a clean? a dep?

- is it safe to do an mrproper after a *config? In other words, does
mrproper affect/damage/undo anything done by *config?

- an mrproper undoes dep, so it must be followed by a dep

- is it safe to do a clean after a *config? In other words, does clean
affect/damage/undo anything done by *config? Surely it is safe:
many of us have done this for years.

- is it necessary to do a clean after a *config? (README suggests no;
many things in Documentation suggest yes.)
One reason might be that dep requires this -- is this the case?
<> suggests yes.
Experience suggests no, at least until very recently.
Or is there some other way in which dep now requires that
it be preceded by a clean, perhaps after a failed build?

- is it safe to do a clean after a dep? In other words, does clean
affect/damage/undo anything done by dep?

- is it necessary to do a clean after a dep? (README suggests no;
many things in Documentation suggest yes.) Does dep affect
subsequent cleans?

- theory: a clean should be done after a failing build so that
a subsequent build won't use the results of the failing build.

Hugh Redelmeier voice: +1 416 482-8253

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:28    [W:0.186 / U:0.584 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site