Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-03-2009, 10:24 AM   #1
LQ Newbie
Registered: Dec 2008
Posts: 15

Rep: Reputation: 0
What is the objective of Configure, Make, Make Install?

Hi Sir/Mam,

I installed the gcc and other softwares wlth .tar extension. We have to do a step by step procedure while installing the sofware which have .tar extension.

1) First, we have to unzip the file and give ./configure
2) Second, we have to give make
3) Third, we logon to root and give make install.

My question is, why we are doing the above steps sequentially and what is actually happend at the each and every steps(configure,make,make install). What is the objective of Configure, Make, Make Install? I request u to give elloborate explanation, because i m new to Linux. Waiting for ur valuable reply.

Thanks and Regards,
Old 02-03-2009, 10:44 AM   #2
Senior Member
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
./configure is optional but sometimes used to make a make file. Then make is used to build any modules then make install install the modules.
most people just run the commands like this running make and make install on the same line.
make && make install
Old 02-03-2009, 10:44 AM   #3
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Old 02-03-2009, 10:45 AM   #4
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The configure script is, as the name suggests, used to configure the built software. You can pass options to it to specify where the software should be installed, what features it is built with and so on. The exact options available are different depending on the software. make usually builds the software (which usually means compiling the source code) and make install installs it, i.e. copies the executables, shared libraries, documentation, etc to the right places. There's more to it than I've described here, but this is about as much as I know.

Originally Posted by rkarthi2k5
We have to do a step by step procedure while installing the sofware which have .tar extension.
This is somewhat pedantic, but please be aware that tar files don't necessarily need to contain software - they're just used to collect files together. So yes, putting source code for software is one use for them, but not the only one.
Old 02-03-2009, 10:52 AM   #5
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
What your are describing is called "compiling". Compiling is turning source code, a set of instructions written and understood by humans into a language that is understood by computers. The instructions are written in a computer language and the most common one is called "C".

If you have the source code you can turn it into a program that can be understood and executed by your computer even if you have no knowledge of programming (writing instructions in a computer language).

You usually do this by executing three commands at your terminal:
1. configure
This allows the computer to see what kind of set up you have on your computer and to be sure you have all the necessary tools to do the job.
2. make
This does the real work - the translation from the source code to the machine code which the computer will use to actually do what the program is intended for.
3 make install
This simply takes the machine code and puts it in the correct place so that the computer knows where to find all the various parts necessary to do the job.

In most distros you don't really need to ever compile anything. You can usually get pre-compiled programs for your distro without having to go through all these steps. Some programs are only available in source code and if you want to use them then you will have to go through these steps.

Compiling is done not just in Gnu/Linux and you can use Gnu/Linux without ever having to do it yourself. Just about every program that you use on any computer has been compiled. Usually it's not done by the end user but it is done.

I hope that's simple and clear enough.
Old 02-03-2009, 11:32 AM   #6
LQ Newbie
Registered: Dec 2008
Posts: 16

Rep: Reputation: 0
the linked page is a great read. Thanks a lot! I bookmarked it.

There are somethings that are not totally clear to me.
I understand it this way: configure is a shell script (and NOT an executable), that can be interpreted by bash for example). Because not everyone has the current working directory in their search path you have to write ./configure to make sure you execute the script in the current dir.
In contrast make IS an executable and by typing make you execute it. When make starts it first looks in the CURRENT DIRECTORY for a file called Makefile and then buils the app according to it. ...make install installs the app.

Do I understand all this correctly? What was not totally clear to me was what 'configure' and 'make' really are (script, app, interpreted by what?)
Can anyone please confirm or correct my way of understanding the process?
Old 02-03-2009, 11:59 AM   #7
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
configure is a script interpreted by bash (or some other similar shell)
Makefile is a script created by the configure script and is used by the program make
Old 02-04-2009, 07:30 AM   #8
Registered: Oct 2002
Location: Houston
Distribution: Arch, PCLinuxOS, Mint
Posts: 257

Rep: Reputation: 34
I believe there are some recommendations for using the make stuff. You should run ./configure and make as a normal user in a subdirectory you have access to. Then if you want your program to be run by other users, switch to the root user before running make install. That will put the compiled stuff into system wide directories accessible to anyone. Otherwise it will put it into your home directory, like /home/<you>/bin.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
what actually happens under the hood when I type ./configure, make and make install? Unregistered Slackware 12 11-19-2007 04:50 PM
these commands are not working on my server (./configure, make, make install) Anil Kumar K Linux - Software 3 07-02-2007 07:23 AM
configure, make and make install commands don't work for me Fenster Fedora 8 08-18-2004 10:58 AM
Installed using ./configure, make, make install, how to remove? EnVoy Mandriva 4 03-10-2004 07:05 PM
Can I automate the tar, ./configure, make, and make install of about 50 packages? JoeLinux Linux - General 2 04-13-2002 03:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration