LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-29-2012, 03:12 AM   #1
darrenforster99
LQ Newbie
 
Registered: Jul 2005
Location: UK
Distribution: Fedora Core 3
Posts: 11

Rep: Reputation: 0
Question What exactly is make doing and why run it twice along with configure?


Hi,

I've done computer programming many years ago up to HND level with ye olde C++ Builder, Turbo Pascal, Delphi, etc back in 1999 on a Windows 3.1 system at Uni so I know basically how low-level programming languages have to compile the source code, and everything, however there is something that always confuses me about Linux compared to the Borland world of IDE's.

I know that most of Linux programs are available as uncompiled source code and that to run them you need to configure them for the system ( ./configure), then build them (make) and then install them (make install). But one thing I've never understood is what exactly each section is doing...

I realise configure makes the program suitable for the specific machine it's running on with the specific hardware (and I guess it checks for dependencies??). Is this the point similar to the compile command in C++ (like pressing F9).

make - what exactly does make do at this stage, is it just compiling the code (like the F9 command in C++) or is it actually compiling and creating executables (like Ctrl+F9 in C++)

make install - again what is it doing at this stage - is it creating the executables, or is it just installing them in the right places so linux can find them?

and also why is there three stages to installing a program from source code in Linux? This is one thing that seems to get a lot of newbies stumped when they come to Linux from something like Windows - Windows you run the install program, keep clicking next and eventually finish and hey presto you have a working program. Linux you have to run ./configure, then make, then make install, and then if there are any problems with dependencies your left trailing through lines of errors to try and figure out which dependencies are missing.

I know there are specific packages for certain versions of linux that automatically install like RPM and DEB, but not everything is available as a package.

So seeing as when your trying to install most programs from source code you just run ./configure then make then make install why has no-one added some kind of script file to linux that automatically does all three, and checks at each stage if there is an error with one of the stages and stops there if there is? Just an idea and it would seem to make perfect sense and remove a lot of confusion regarding installing from source code.
 
Old 12-29-2012, 04:59 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
configure discovers details of the system and adapts the code to suit it (details such as using getcwd() or getwd())
make does compilation and linking to produce executables owned by you under the current directory; and man pages and so on
make install (run as root) copies these executables and stuff to /usr/local/bin/ or wherever.
 
1 members found this post helpful.
  


Reply



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
How to check a program that was installed via configure, make and make install linuxandtsm Linux - Newbie 1 04-06-2012 02:41 PM
How to configure lilo to make my netware 6.5 run? spfdz Debian 4 01-20-2006 05:31 PM
Can't Configure Or run Make file Pretzels Linux - Software 4 01-26-2005 10:29 AM
configure, make and make install commands don't work for me Fenster Fedora 8 08-18-2004 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:05 PM.

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
Open Source Consulting | Domain Registration