We all know that
$./configure --prefix=$SOME_DIR
$ make
$ sudo make installcan install bin, lib to $SOME_DIR. However, I wonder whether I can change the prefix of installation directory after running configure and make, without the need to run make again?
1 Answer
When you run configure script, the Makefile is generated, which can help you to compile your source code, which is usually done by invoking make, and provide you with a command to install it, which is usually done by invoking make install.
You can always manually change the makefiles by hand, and change the prefix. Sometimes it is easy, when you have a simple project. You can simply change the prefix variable in the single generated makefile and that should work. But this is not always the case. So, unless you know what's happening under the hood, I suggest you to reconfigure and recompile and avoid unnecessary headaches.