2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Adjust faq entry about targets in site-config.jam

[SVN r39160]
This commit is contained in:
Vladimir Prus
2007-09-07 21:34:27 +00:00
parent 840201ae89
commit 42bc94fdc5

View File

@@ -331,18 +331,16 @@ stage installed : application : <dll-path>/usr/lib/snake
<para>It is desirable to declare standard libraries available on a
given system. Putting target declaration in Jamfile is not really
good, since locations of the libraries can vary. The solution is
to put the following to site-config.jam.</para>
to declare the targets in site-config.jam:</para>
<programlisting>
import project ;
project.initialize $(__name__) ;
project site-config ;
lib zlib : : &lt;name&gt;z ;
</programlisting>
<para>The second line allows this module to act as project. The
third line gives id to this project &#x2014; it really has no location
and cannot be used otherwise. The fourth line just declares a
target. Now, one can write:
<para>Recall that both <filename>site-config.jam</filename> and
<filename>user-config.jam</filename> are projects, and everything
you can do in a Jamfile you can do in those files. So, you declare
a project id and a target. Now, one can write:
<programlisting>
exe hello : hello.cpp /site-config//zlib ;
</programlisting>