Do I need to run "make clean" before ./configure when reconfiguring?

autotools

Solution

In many cases things might be OK if you don't run `make clean`, but you can't assume they will.

An example of how things might go wrong: a configure flag might add a `-D` parameter to a `CFLAGS` variable or `DEFS`, instead of defining it through `config.h`. The latter would give your C files a dependency on `config.h` which in turn gets regenerated when you re-run `configure`. But in the former case, if you run `configure` again and change that flag, the set of `#defined` symbols in your C files will be different, but those C files will not be recompiled.

Problem

Suppose I've ran `./configure` and `make`, but now I want to change a parameter in the configure script. Do I need to run `make clean` before `./configure`, or will everything be OK even if I don't?

Original source