Do I need to run "make clean" before. / configure during reconfiguration?

Suppose I run ./configure and make , but now I want to change the parameter in the script setup. Do I need to run make clean before ./configure , or will everything be ok even if I don’t?

+6
source share
2 answers

In many cases, everything may be OK if you do not run make clean , but you cannot assume that they will.

An example of how things can go wrong: the configure flag can add the -D option to the CFLAGS or DEFS instead of defining it via config.h . The latter will give your C files a dependency on config.h , which, in turn, will be restored when you run configure again. But in the first case, if you run configure again and change this flag, the #defined character #defined in your C files will be different, but these C files will not be recompiled.

+2
source

configure scripts are designed to run "outside the tree". for example, you can make a build subdirectory and run there ../configure [options] , which (ideally) only ../configure [options] build directory.

If you use ./configure , you must run make clean before running configure again - just to be safe. Otherwise, if you are worried about side effects, a correctly written set of autotools should include creating a create directory outside the tree.

+1
source

Source: https://habr.com/ru/post/969506/


All Articles