Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Because each step does different things</p> <h2>Prepare(setup) environment for building</h2> <pre><code>./configure </code></pre> <p>This script has lots of options that you should change. Like <code>--prefix</code> or <code>--with-dir=/foo</code>. That means every system has a different configuration. Also <code>./configure</code> checks for missing libraries that should be installed. Anything wrong here <strong>causes not to build your application</strong>. That's why distros have packages that are installed on different places, because every distro thinks it's better to install certain libraries and files to certain directories. It is said to run <code>./configure</code>, but in fact you should change it always. </p> <p>For example have a look at <a href="http://www.archlinux.org/packages/">the Arch Linux packages site</a>. Here you'll see that any package uses a different configure parameter (assume they are using autotools for the build system). </p> <h2>Building the system</h2> <pre><code>make </code></pre> <p>This is actually <code>make all</code> by default. And every make has different actions to do. Some do building, some do tests after building, some do checkout from external SCM repositories. Usually you don't have to give any parameters, but again some packages execute them differently. </p> <h2>Install to the system</h2> <pre><code>make install </code></pre> <p>This installs the package in the place specified with configure. If you want you can specify <code>./configure</code> to point to your home directory. However, lots of configure options are pointing to <code>/usr</code> or <code>/usr/local</code>. That means then you have to use actually <code>sudo make install</code> because only root can copy files to /usr and /usr/local.</p> <hr> <p>Now you see that each step is a pre-requirement for next step. Each step is a preparation to make things work in a problemless flow. Distros use this metaphor to build packages (like RPM, deb, etc.). </p> <p>Here you'll see that each step is actually a different state. That's why package managers have different wrappers. Below is an example of a wrapper that lets you build the whole package in one step. But remember that each application has a different wrapper (actually these wrappers have a name like spec, PKGBUILD, etc.):</p> <pre><code>def setup: ... #use ./configure if autotools is used def build: ... #use make if autotools is used def install: ... #use make all if autotools is used </code></pre> <p>Here one can use autotools, that means <code>./configure</code>, <code>make</code> and <code>make install</code>. But another one can use SCons, Python related setup or something different. </p> <p>As you see splitting each state makes things much easier for maintaining and deployment, especially for package maintainers and distros.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload