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.
|