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?
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.
configure
scripts are designed to run 'out-of-tree'. e.g., you can make a subdirectory build
and run ../configure [options]
from there, which will (ideally) only affect the build
directory.
If you're using ./configure
, you should run make clean
prior to running configure
again - just to be safe. Otherwise, if you're worried about side-effects, a properly written autotools suite should allow for an out-of-tree build directory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With