why “make” before “make install”

When you run make, you’re instructing it to essentially follow a set of build steps for a particular target. When make is called with no parameters, it runs the first target, which usually simply compiles the project. make install maps to the install target, which usually does nothing more than copy binaries into their destinations. … Read more

what does –enable-optimizations do while compiling python?

This flag enables Profile guided optimization (PGO) and Link Time Optimization (LTO). Both are expensive optimizations that slow down the build process but yield a significant speed boost (around 10-20% from what I remember reading). The discussion of what these exactly do is beyond my knowledge and probably too broad for a single question. Either … Read more

How do I create a configure script?

To create the standard “configure” script you need GNU autoconf. You may need GNU automake and libtool too. There are tons of documentation and howtos. Google for something like “autoconf automake howto”. The good documentation is in the official manual pages: Autoconf: http://www.gnu.org/software/autoconf/ Automake: http://www.gnu.org/software/automake/automake.html Libtool: http://www.gnu.org/software/libtool/libtool.html Autoconf will create your configure script starting from … Read more

How to add include and lib paths to configure/make cycle?

You want a config.site file. Try: $ mkdir -p ~/local/share $ cat << EOF > ~/local/share/config.site CPPFLAGS=-I$HOME/local/include LDFLAGS=-L$HOME/local/lib … EOF Whenever you invoke an autoconf generated configure script with –prefix=$HOME/local, the config.site will be read and all the assignments will be made for you. CPPFLAGS and LDFLAGS should be all you need, but you can … Read more

Why always ./configure; make; make install; as 3 separate steps?

Because each step does different things Prepare(setup) environment for building ./configure This script has lots of options that you should change. Like –prefix or –with-dir=/foo. That means every system has a different configuration. Also ./configure checks for missing libraries that should be installed. Anything wrong here causes not to build your application. That’s why distros … Read more