LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-03-2009, 11:24 AM   #1
rkarthi2k5
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,
Karthikeyan.R
 
Old 02-03-2009, 11:44 AM   #2
jstephens84
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.
Code:
./configure 
make && make install
 
Old 02-03-2009, 11:44 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
http://tldp.org/LDP/LG/current/smith.html
 
Old 02-03-2009, 11:45 AM   #4
Nylex
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.

Quote:
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, 11:52 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Hi,
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.
cheers,
jdk
 
Old 02-03-2009, 12:32 PM   #6
gmic
LQ Newbie
 
Registered: Dec 2008
Posts: 16

Rep: Reputation: 0
repo,
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, 12:59 PM   #7
jdkaye
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
cheers,
jdk
 
Old 02-04-2009, 08:30 AM   #8
dickgregory
Member
 
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.
 
  


Reply


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 05:50 PM
these commands are not working on my server (./configure, make, make install) Anil Kumar K Linux - Software 3 07-02-2007 08:23 AM
configure, make and make install commands don't work for me Fenster Fedora 8 08-18-2004 11:58 AM
Installed using ./configure, make, make install, how to remove? EnVoy Mandriva 4 03-10-2004 08:05 PM
Can I automate the tar, ./configure, make, and make install of about 50 packages? JoeLinux Linux - General 2 04-13-2002 04:35 AM


All times are GMT -5. The time now is 09:05 AM.

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