What does ‘make install’ do

installationmake

Moving from Windows to Linux, I am unable to understand the process of installing software in Linux. In Windows, when we run an installation file, it asks where you wish to install the program, most probably in program files folder only. Later, it edits the registry. This is called installation in Windows. What does 'installing software' in Linux mean exactly?

Suppose I downloaded source code, configure it, and then build the binary using make. Now it is just a binary, not a usable program yet. How is it going get 'installed' ? By make install ? And what does this command do, exactly?

Best Answer

Make is a general purpose workflow program, usually used for compilation. But it can be used for anything.

When you do something like "make all", the make program executes a rule named "all" from a file in current directory named "Makefile". This rule usually calls the compiler to compile some source code into binaries.

When you do "make install", the make program takes the binaries from the previous step and copies them into some appropriate locations so that they can be accessed. Unlike on Windows, installation just requires copying some libraries and executables and there is no registry requirement as such. In short, "make install" just copies compiled files into appropriate locations.

Related Question