Concept behind Configure and Make?

Status
Not open for further replies.

paragkalra

The Linux Man !
Hi everyone,
Installing rpms in linux is pretty simple.........all you need to do:
#rpm -ivh <file-name>.rpm
At times we may be required to use further more options like --force and --nodeps. Buts that okay.

However if the software is tape archived, we generally do:
#tar -xvf <file-name>.tar
cd <file-name>
./configure
make
make install

Although its not hard and fast.

Can anyone please explain what exactly happens when we fire:
./configure
make
make install

Some times we just need to fire:
make

So how to decide what to fire and what not to fire?
 

mehulved

18 Till I Die............
*en.wikipedia.org/wiki/Make should explain you a bit.
Well the commands are pretty much explanatory
configure - check whether the 'environment' has all the required factors. If not, you will get the error message on what is missing.
make - compiles the program.
make install - finishes the installation of program.
 

GNUrag

FooBar Guy
paragkalra said:
Can anyone please explain what exactly happens when we fire:
./configure
./configure is a shell script that searches for development files(headers) in your system, and throws errors if your system lacks it. ./configure script is also selectively used to turn on/off certain features you might want in your newly build program.

If the ./configure script was run successfully, you should see a new file Makefile in your source directories.

paragkalra said:
make is a utility that does that actual compilation, and linking using that compiler you specify. make will by default search for a file named Makefile in your current directory to continue.

paragkalra said:
make install
This will install your newly build package to your systems, using the options (directory locations) you specified while doing ./configure.
paragkalra said:
Some times we just need to fire:
make
Because, those times a Makefile is already present. This is the case with smaller packages which do not have development header dependencies.
paragkalra said:
So how to decide what to fire and what not to fire?
Simple. Every good package comes with a README, INSTALL file. Follow those instructions.
 

montylee

Journeyman
I would like to add to the explanation of the 'configure' script.

When you run the configure script, it searches for the header files, compilers, linkers and all the other dependencies required to build your source. For e.g.: On GNU/Linux, u have the gcc compiler, so configure will set the compiler to gcc. Similarly on Solaris or other *nix systems, it will set the compiler to 'cc'. It also checks for all the dependencies of the package. For e.g.: If u want to build a game from a source which uses SDL, then configure will search ur system for the SDL libraries and only if it is able to find the SDL libraries, it will succeed and create the appropriate makefiles otherwise it will fail.

I hope this little explanation helps...
 
OP
paragkalra

paragkalra

The Linux Man !
Thanx GNUarg for ur awesome tutor........it was just sweet........thanx for taking all the trouble.................i would also like to thank tech_your_future and montylee for their support and feedback........DIGIT FORUM ROCKS......
 

praka123

left this forum longback
if u have the original source directory there,u can have a terminal opened in the dir and try `make uninstall`or rarely in some cases 'make deinstall';meAn time check usage of checkinstall really useful.
About:
CheckInstall keeps track of all files installed by a "make install" or equivalent, creates a Slackware, RPM, or Debian package with those files, and adds it to the installed packages database, allowing for easy package removal or distribution.
also g00gle is yo frnd.
*www.google.com/linux?hl=en&lr=&q=uninstalling+source&btnG=Search
 
Last edited:
Status
Not open for further replies.
Top Bottom