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 |
./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 |
|
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:
|
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 |
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? |
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 |
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.
|
All times are GMT -5. The time now is 04:10 PM. |