What is the objective of Configure, Make, Make Install?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
You have discovered the usual process to convert a source code tarball distribution of an application into the runnable binaries and related components. The source code is the human readable files that the programmer(s) wrote using the usual tools such as text editors. The collection of such files is packed up into one file, using tar and a compressor, for distribution. This is done to relieve you from having to download potentially thousands of files that make up a complete application package, and is compressed to conserve network bandwidth and your time.
Having unpacked the tarball, it must be made into the runtime binaries, and installed into your system in a way that everything runs properly. This is normally done by compiling the source code and linking the resulting object code to each other and to object code libraries. Before this can be done, the configure script is run, to snoop through you system and set up build-time variables that allow the compiler and related tools to create a runtime binary that is compatible with your system. This is also the step that allows you to apply customizations as desired by you. Since the Linux OS and distributions are not as standardized as, say, Windows (XP-SP2 is XP-SP2 is XP-SP2), the configure step is performed to make sure that those aspects that are likely to be inconsistent can be properly handled. It is also a good place to catch dependency issues. Part of the Unix/Linux culture is that small components that do a single thing very well are used together to create a greater whole. In order for this to work well, the configure script makes sure that the right collection of dependent components are in place.
Once the configuration phase has completed, the source components are built into the end-use form(make), and then said products are installed into the system (make install).
This is one way in which a single source tarball can be made to run on systems of significantly dissimilar architecture and vintage.
--- rod.
(1) As you know, software systems consist of many dozens of individual source-modules. When you're compiling them and linking them together, there's "only one right way to do it." A Makefile is something that an application developer can set up so that all you have to do, "to do it just-right every time," is to type the command: make.
(1a) ... and to install what you've just made, you can just type make install. (Ain't life grand?)
(2) "Aaaahh... but Linux runs on more than 21 different types of machines!" So, how do we possibly build a Makefile that works on all of them? Obviously, we can't. We need "a system for making Makefiles!" And that is called configure.
When you type configure, a process runs that figures out the various particulars of the specific machine you are using, and it builds one-or-more Makefiles accordingly. Once it's finished, you can just "make" your software ... and "It Just Works(tm)."
"Every form of advanced magic is indistinguishable from technology."
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.