[xubuntu-users] make

Radomir Dopieralski xubuntu at sheep.art.pl
Fri Feb 19 08:46:18 UTC 2010


On Fri, Feb 19, 2010 at 6:08 AM, Lee Gold <leegold at operamail.com> wrote:
> Hi,
>
> I have some very "newbie" questions about installing a program via "make".
>
> Say I have a folder with the program source. Does it make a difference whether I have the folder on my desktop, home folder or wherever? Is it like a .deb package, where I run the package and all the programs components/files are put in the correct and secure place in the file system...So does installing from source require me to initially place the install folder in a particular location? Esp. for best security?
>
>  What does $ ./configure do? According to the instructions I do this first. The make, then make install.
>
> Sure a config file would be installed in my home but I'm sure the compiled code should not be installed in my home. I'm afraid of the make not doing the optimum things because i don't know enough about. Synaptic made my transitions to Linux easier from "that other OS" but I would like to understand make now. Thanks, Lee G.

It goes like this:

You can download and unpack the source of your application anywhere
you want, it doesn't matter. It is, however, recommended to do the
"configure" and "make" steps as normal (non-root) user.

The "configure" script detects what versions of libraries you have,
and also whether all required utility programs are installed, then it
creates a script called "Makefile" that is used to compile the program
using the found libraries and utilities. You can pass additional
options to configure, like "--prefix", to tell it how the program
should be build and where it should be installed. The default prefix
is usually /usr/local

The "make" command builds the program using the generated Makefile.
Usually it runs the compiler for all the files that need to be
compiled, and runs various utilities as needed. This step can take
some time.

The "make install" command copies all the necessary files to their
locations on your computer. This will overwrite any existing files,
and it's impossible to automatically uninstall. I would recommend
using the "checkinstall" command instead, which will create a .deb
package and install that -- then it can be easily uninstalled. Both
those commands usually need to be run as root (unless you set the
--prefix in configure to somewhere where normal user has writing
rights).
-- 
Radomir Dopieralski, http://sheep.art.pl




More information about the xubuntu-users mailing list