1
2
3
4
5
6
7
8
9
|
<h1 class="section">Installation Names</h1> <p>By default, ‘<samp>make install</samp>’ will install into <samp>/usr/local/bin</samp>, <samp>/usr/local/man</samp>, etc.; that is, the <em>installation prefix</em> defaults to <samp>/usr/local</samp>. You can specify an installation prefix other than <samp>/usr/local</samp> by giving <code>configure</code> the option <samp>--prefix=<var>PATH</var></samp>, or by specifying a value for the <code>prefix</code> ‘<samp>make</samp>’ variable when running ‘<samp>make install</samp>’ (e.g., ‘<samp>make install prefix=<var>PATH</var></samp>’). The <code>prefix</code> variable provides a default for <code>exec_prefix</code> and other variables used when installing bash. </p> <p>You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give <code>configure</code> the option <samp>--exec-prefix=<var>PATH</var></samp>, ‘<samp>make install</samp>’ will use <var>PATH</var> as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. </p> <p>If you would like to change the installation locations for a single run, you can specify these variables as arguments to <code>make</code>: ‘<samp>make install exec_prefix=/</samp>’ will install <code>bash</code> and <code>bashbug</code> into <samp>/bin</samp> instead of the default <samp>/usr/local/bin</samp>. </p> <p>If you want to see the files bash will install and where it will install them without changing anything on your system, specify the variable <code>DESTDIR</code> as an argument to <code>make</code>. Its value should be the absolute directory path you’d like to use as the root of your sample installation tree. For example, </p> <div class="example"> <pre class="example">mkdir /fs1/bash-install
make install DESTDIR=/fs1/bash-install
</pre>
</div> <p>will install <code>bash</code> into <samp>/fs1/bash-install/usr/local/bin/bash</samp>, the documentation into directories within <samp>/fs1/bash-install/usr/local/share</samp>, the example loadable builtins into <samp>/fs1/bash-install/usr/local/lib/bash</samp>, and so on. You can use the usual <code>exec_prefix</code> and <code>prefix</code> variables to alter the directory paths beneath the value of <code>DESTDIR</code>. </p> <p>The GNU Makefile standards provide a more complete description of these variables and their effects. </p><div class="_attribution">
<p class="_attribution-p">
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.<br>Licensed under the GNU Free Documentation License.<br>
<a href="https://www.gnu.org/software/bash/manual/html_node/Installation-Names.html" class="_attribution-link">https://www.gnu.org/software/bash/manual/html_node/Installation-Names.html</a>
</p>
</div>
|