Offset 1, 1 lines modified | Offset 1, 1 lines modified | ||
1 | {"name":"buildtool-doc","origin":"devel/buildtool-doc","version":"0.16_1","comment":"Buildtool·User's·and·Developer's·manuals","maintainer":"ports@FreeBSD.org","www":"http://buildtool.sourceforge.net/","abi":"FreeBSD:11:amd64","arch":"freebsd:11:x86:64","prefix":"/usr/local","flatsize":254698,"licenselogic":"single","desc":"This·package·includes·the·Buildtool·User's·and·Developer's·manual.\nYou·will·need·Buildtool·itself·to·generate·and·install·end·user\ndocuments.\n\nWWW:·http://buildtool.sourceforge.net/","categories":["devel"],"options":{"DOCS":"on"},"files":{"/usr/local/share/doc/buildtool-doc/CHANGES":"1$6248e532f7f1a61e1046ba3856df90253e59aed388673f6ec88005b1080a12e5","/usr/local/share/doc/buildtool-doc/COPYING":"1$9f4f50f1796099351f5a6920f02f2b3d88dd708b5546f3c37c2da996064ea910","/usr/local/share/doc/buildtool-doc/PEOPLE":"1$49125093de38de52ea07fcb62a013ecbd06539caca16314de1821feba92e069b","/usr/local/share/doc/buildtool-doc/README":"1$3a970ec645efde6632c5c5f3f4d584fffb2109a356202ac900b9ebd8f42011bd","·✂ | 1 | {"name":"buildtool-doc","origin":"devel/buildtool-doc","version":"0.16_1","comment":"Buildtool·User's·and·Developer's·manuals","maintainer":"ports@FreeBSD.org","www":"http://buildtool.sourceforge.net/","abi":"FreeBSD:11:amd64","arch":"freebsd:11:x86:64","prefix":"/usr/local","flatsize":254698,"licenselogic":"single","desc":"This·package·includes·the·Buildtool·User's·and·Developer's·manual.\nYou·will·need·Buildtool·itself·to·generate·and·install·end·user\ndocuments.\n\nWWW:·http://buildtool.sourceforge.net/","categories":["devel"],"options":{"DOCS":"on"},"files":{"/usr/local/share/doc/buildtool-doc/CHANGES":"1$6248e532f7f1a61e1046ba3856df90253e59aed388673f6ec88005b1080a12e5","/usr/local/share/doc/buildtool-doc/COPYING":"1$9f4f50f1796099351f5a6920f02f2b3d88dd708b5546f3c37c2da996064ea910","/usr/local/share/doc/buildtool-doc/PEOPLE":"1$49125093de38de52ea07fcb62a013ecbd06539caca16314de1821feba92e069b","/usr/local/share/doc/buildtool-doc/README":"1$3a970ec645efde6632c5c5f3f4d584fffb2109a356202ac900b9ebd8f42011bd","·✂ |
Offset 25, 20 lines modified | Offset 25, 20 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 4. Automatic·package·configuration"> | 26 | <div·class="chapter"·title="Chapter 4. Automatic·package·configuration"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="bt_config"></a>Chapter 4. Automatic·package·configuration</h2></div></div></div> | 28 | <a·name="bt_config"></a>Chapter 4. Automatic·package·configuration</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="bt_config.html#idp6 | 32 | <dt><span·class="sect1"><a·href="bt_config.html#idp64041144">4.1.·The·bt_config·module</a></span></dt> |
33 | <dd><dl> | 33 | <dd><dl> |
34 | <dt><span·class="sect2"><a·href="bt_config.html#stddir">4.1.1.·Standard·directories</a></span></dt> | 34 | <dt><span·class="sect2"><a·href="bt_config.html#stddir">4.1.1.·Standard·directories</a></span></dt> |
35 | <dt><span·class="sect2"><a·href="bt_config.html#stdfeat">4.1.2.·Standard·features</a></span></dt> | 35 | <dt><span·class="sect2"><a·href="bt_config.html#stdfeat">4.1.2.·Standard·features</a></span></dt> |
36 | </dl></dd> | 36 | </dl></dd> |
37 | <dt><span·class="sect1"><a·href="bt_config.html#idp6 | 37 | <dt><span·class="sect1"><a·href="bt_config.html#idp64160312">4.2.·Examples</a></span></dt> |
38 | </dl> | 38 | </dl> |
39 | </div> | 39 | </div> |
40 | <p>Source·code·packages·usually·need·to·gather·specific·information | 40 | <p>Source·code·packages·usually·need·to·gather·specific·information |
41 | from·the·system·where·they·are·going·to·be·built.··This·includes·the | 41 | from·the·system·where·they·are·going·to·be·built.··This·includes·the |
42 | presence·and·location·of·required·programs,·header·files,·functions, | 42 | presence·and·location·of·required·programs,·header·files,·functions, |
43 | libraries,·compiler·features,·etc.··Based·on·check·results,·the | 43 | libraries,·compiler·features,·etc.··Based·on·check·results,·the |
44 | package·modifies·program·sources·to·ensure·they·will·build·in·the | 44 | package·modifies·program·sources·to·ensure·they·will·build·in·the |
Offset 46, 15 lines modified | Offset 46, 15 lines modified | ||
46 | the·problems.··This·process·is·called·automatic·configuration,·and·is | 46 | the·problems.··This·process·is·called·automatic·configuration,·and·is |
47 | done·without·user·interaction,·though·he·may·provide·configuration | 47 | done·without·user·interaction,·though·he·may·provide·configuration |
48 | details·through·the·command·line.</p> | 48 | details·through·the·command·line.</p> |
49 | <p>In·Buildtool,·this·process·is·issued·by·the | 49 | <p>In·Buildtool,·this·process·is·issued·by·the |
50 | <span·class="command"><strong>bt_config</strong></span>·module.··See·next·section.</p> | 50 | <span·class="command"><strong>bt_config</strong></span>·module.··See·next·section.</p> |
51 | <div·class="sect1"·title="4.1. The·bt_config·module"> | 51 | <div·class="sect1"·title="4.1. The·bt_config·module"> |
52 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 52 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
53 | <a·name="idp6 | 53 | <a·name="idp64041144"></a>4.1. The·bt_config·module</h2></div></div></div> |
54 | <div·class="cmdsynopsis"><p><code·class="command">buildtool·config</code>··[·-d·<em·class="replaceable"><code>dirname</code></em>=<em·class="replaceable"><code>value</code></em>··|···--dir-<em·class="replaceable"><code>dirname</code></em>=<em·class="replaceable"><code>value</code></em>·]·[--disable-<em·class="replaceable"><code>name</code></em>]·[·-f·<em·class="replaceable"><code>featname</code></em>=<em·class="replaceable"><code>value</code></em>··|···--feature-<em·class="replaceable"><code>featname</code></em>=<em·class="replaceable"><code>value</code></em>·]·[--enable-<em·class="replaceable"><code>name</code></em>]·[·-h··|···--help·]·[--ignore-sw-config]·[·-p·value··|···--prefix=<em·class="replaceable"><code>value</code></em>·]·[·-w·dir··|···--workdir=<em·class="replaceable"><code>dir</code></em>·]</p></div> | 54 | <div·class="cmdsynopsis"><p><code·class="command">buildtool·config</code>··[·-d·<em·class="replaceable"><code>dirname</code></em>=<em·class="replaceable"><code>value</code></em>··|···--dir-<em·class="replaceable"><code>dirname</code></em>=<em·class="replaceable"><code>value</code></em>·]·[--disable-<em·class="replaceable"><code>name</code></em>]·[·-f·<em·class="replaceable"><code>featname</code></em>=<em·class="replaceable"><code>value</code></em>··|···--feature-<em·class="replaceable"><code>featname</code></em>=<em·class="replaceable"><code>value</code></em>·]·[--enable-<em·class="replaceable"><code>name</code></em>]·[·-h··|···--help·]·[--ignore-sw-config]·[·-p·value··|···--prefix=<em·class="replaceable"><code>value</code></em>·]·[·-w·dir··|···--workdir=<em·class="replaceable"><code>dir</code></em>·]</p></div> |
55 | <p>The·<span·class="command"><strong>bt_config</strong></span>·module·is·used·to·automatically | 55 | <p>The·<span·class="command"><strong>bt_config</strong></span>·module·is·used·to·automatically |
56 | configure·buildtoolized·packages.··It·can·be·executed·without·extra | 56 | configure·buildtoolized·packages.··It·can·be·executed·without·extra |
57 | arguments,·taking·defaults·for·most·values,·though·it·is·often·used | 57 | arguments,·taking·defaults·for·most·values,·though·it·is·often·used |
58 | with·modifiers.</p> | 58 | with·modifiers.</p> |
59 | <p>The·following·options·are·recognized:</p> | 59 | <p>The·following·options·are·recognized:</p> |
60 | <div·class="variablelist"><dl> | 60 | <div·class="variablelist"><dl> |
Offset 97, 15 lines modified | Offset 97, 15 lines modified | ||
97 | ······<div·class="cmdsynopsis"><p>··-w·<em·class="replaceable"><code>dir</code></em>··|···--workdir=<em·class="replaceable"><code>dir</code></em>··</p></div> | 97 | ······<div·class="cmdsynopsis"><p>··-w·<em·class="replaceable"><code>dir</code></em>··|···--workdir=<em·class="replaceable"><code>dir</code></em>··</p></div> |
98 | ····</span></dt> | 98 | ····</span></dt> |
99 | <dd> | 99 | <dd> |
100 | <p>Sets·the·work·directory·to·<code·class="literal">dir</code>.··This·is | 100 | <p>Sets·the·work·directory·to·<code·class="literal">dir</code>.··This·is |
101 | ······used·to·tell·the·build·system·where·to·store·temporary·files,·like | 101 | ······used·to·tell·the·build·system·where·to·store·temporary·files,·like |
102 | ······objects,·executables,·libraries,·etc.·so·that·the·source·tree·is·not | 102 | ······objects,·executables,·libraries,·etc.·so·that·the·source·tree·is·not |
103 | ······polluted·in·any·way.</p> | 103 | ······polluted·in·any·way.</p> |
104 | <p>This·defaults·to·nothing<sup>[<a·name="idp6 | 104 | <p>This·defaults·to·nothing<sup>[<a·name="idp64109368"·href="#ftn.idp64109368"·class="footnote">5</a>]</sup>,·meaning·that·all·files·are·placed·in·the |
105 | ······current·directory.··There·is·an·special·case,·though.··If·you·set | 105 | ······current·directory.··There·is·an·special·case,·though.··If·you·set |
106 | ······the·environment·variable·<code·class="varname">BT_USE_WORKDIR</code>·to | 106 | ······the·environment·variable·<code·class="varname">BT_USE_WORKDIR</code>·to |
107 | ······<code·class="literal">yes</code>,·the·work·directory·will·be·automatically·set | 107 | ······<code·class="literal">yes</code>,·the·work·directory·will·be·automatically·set |
108 | ······to·<code·class="literal">$(pwd)/work.bt</code>;·this·is·very·useful·in·case·you | 108 | ······to·<code·class="literal">$(pwd)/work.bt</code>;·this·is·very·useful·in·case·you |
109 | ······want·to·build·all·your·packages·using·work·directories,·because·it | 109 | ······want·to·build·all·your·packages·using·work·directories,·because·it |
110 | ······can·be·set·in·<code·class="filename">bt_logic.conf</code>.</p> | 110 | ······can·be·set·in·<code·class="filename">bt_logic.conf</code>.</p> |
111 | </dd> | 111 | </dd> |
Offset 220, 15 lines modified | Offset 220, 15 lines modified | ||
220 | ··supports.··If·shared·libraries·are·enabled,·these·are·turned·off·if | 220 | ··supports.··If·shared·libraries·are·enabled,·these·are·turned·off·if |
221 | ··set·to·automatic.</p></dd> | 221 | ··set·to·automatic.</p></dd> |
222 | </dl></div> | 222 | </dl></div> |
223 | </div> | 223 | </div> |
224 | </div> | 224 | </div> |
225 | <div·class="sect1"·title="4.2. Examples"> | 225 | <div·class="sect1"·title="4.2. Examples"> |
226 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 226 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
227 | <a·name="idp6 | 227 | <a·name="idp64160312"></a>4.2. Examples</h2></div></div></div> |
228 | <p>This·section·shows·several·examples·to·configure·a·source | 228 | <p>This·section·shows·several·examples·to·configure·a·source |
229 | package.··It·is·assumed·that·all·commands·are·executed·from·package's | 229 | package.··It·is·assumed·that·all·commands·are·executed·from·package's |
230 | top·directory;·if·not,·Buildtool·will·simply·abort.··We·will·be·using | 230 | top·directory;·if·not,·Buildtool·will·simply·abort.··We·will·be·using |
231 | both·long·and·short·options·for·the·samples;·if·multiple·commands·are | 231 | both·long·and·short·options·for·the·samples;·if·multiple·commands·are |
232 | shown,·they·are·all·equivalent.</p> | 232 | shown,·they·are·all·equivalent.</p> |
233 | <p>First,·a·very·simple·but·useful·example.··We·are·going·to | 233 | <p>First,·a·very·simple·but·useful·example.··We·are·going·to |
234 | configure·a·package·as·a·regular·user·who·does·not·have·write·access | 234 | configure·a·package·as·a·regular·user·who·does·not·have·write·access |
Offset 250, 15 lines modified | Offset 250, 15 lines modified | ||
250 | see:</p> | 250 | see:</p> |
251 | <pre·class="screen"><code·class="prompt">$</code>·buildtool·config·-f·developer=yes | 251 | <pre·class="screen"><code·class="prompt">$</code>·buildtool·config·-f·developer=yes |
252 | <code·class="prompt">$</code>·buildtool·config·--feature-developer=yes | 252 | <code·class="prompt">$</code>·buildtool·config·--feature-developer=yes |
253 | <code·class="prompt">$</code>·buildtool·config·--enable-developer</pre> | 253 | <code·class="prompt">$</code>·buildtool·config·--enable-developer</pre> |
254 | </div> | 254 | </div> |
255 | <div·class="footnotes"> | 255 | <div·class="footnotes"> |
256 | <br><hr·width="100"·align="left"> | 256 | <br><hr·width="100"·align="left"> |
257 | <div·class="footnote"><p><sup>[<a·id="ftn.idp6 | 257 | <div·class="footnote"><p><sup>[<a·id="ftn.idp64109368"·href="#idp64109368"·class="para">5</a>]·</sup>I·expect·to·change·this |
258 | ······at·some·point,·when·work·directory·support·has·proven·to·be | 258 | ······at·some·point,·when·work·directory·support·has·proven·to·be |
259 | ······stable.</p></div> | 259 | ······stable.</p></div> |
260 | </div> | 260 | </div> |
261 | </div> | 261 | </div> |
262 | <div·class="navfooter"> | 262 | <div·class="navfooter"> |
263 | <hr> | 263 | <hr> |
264 | <table·width="100%"·summary="Navigation·footer"> | 264 | <table·width="100%"·summary="Navigation·footer"> |
Offset 24, 31 lines modified | Offset 24, 31 lines modified | ||
24 | <hr> | 24 | <hr> |
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 14. Creating·distribution·files"> | 26 | <div·class="chapter"·title="Chapter 14. Creating·distribution·files"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="bt_dist"></a>Chapter 14. Creating·distribution·files</h2></div></div></div> | 28 | <a·name="bt_dist"></a>Chapter 14. Creating·distribution·files</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl><dt><span·class="sect1"><a·href="bt_dist.html#idp6 | 31 | <dl><dt><span·class="sect1"><a·href="bt_dist.html#idp66284984">14.1.·Supported·formats</a></span></dt></dl> |
32 | </div> | 32 | </div> |
33 | <p>During·the·development·of·your·project,·you·will·want·to·release | 33 | <p>During·the·development·of·your·project,·you·will·want·to·release |
34 | versions·periodically.··The·package·will·be·(usually)·distributed·in | 34 | versions·periodically.··The·package·will·be·(usually)·distributed·in |
35 | the·form·of·a·distribution·file,·which·is·a·compressed·archive | 35 | the·form·of·a·distribution·file,·which·is·a·compressed·archive |
36 | containing·the·sources<sup>[<a·name="idp6 | 36 | containing·the·sources<sup>[<a·name="idp66281400"·href="#ftn.idp66281400"·class="footnote">12</a>]</sup>.</p> |
37 | <p>To·create·a·distribution·file,·simply·execute·the | 37 | <p>To·create·a·distribution·file,·simply·execute·the |
38 | <span·class="command"><strong>buildtool·dist</strong></span>·command·from·the·top·level·directory | 38 | <span·class="command"><strong>buildtool·dist</strong></span>·command·from·the·top·level·directory |
39 | of·your·source·package.··A·distribution·file·will·be·created·in·the | 39 | of·your·source·package.··A·distribution·file·will·be·created·in·the |
40 | parent·directory.</p> | 40 | parent·directory.</p> |
41 | <p>The·format·of·the·distribution·file·is·mandated·by·the | 41 | <p>The·format·of·the·distribution·file·is·mandated·by·the |
42 | <code·class="varname">BT_PKG_DISTFMTS</code>·variable,·which·may·be·present·in | 42 | <code·class="varname">BT_PKG_DISTFMTS</code>·variable,·which·may·be·present·in |
43 | the·definitions·file·(see·<a·class="xref"·href="defs.html"·title="Chapter 9. The·definitions·script">Chapter 9,·<i>The·definitions·script</i></a>).··If·no·value·is | 43 | the·definitions·file·(see·<a·class="xref"·href="defs.html"·title="Chapter 9. The·definitions·script">Chapter 9,·<i>The·definitions·script</i></a>).··If·no·value·is |
44 | given,·then·the·default·is·taken,·<code·class="literal">tar.gz</code>.</p> | 44 | given,·then·the·default·is·taken,·<code·class="literal">tar.gz</code>.</p> |
45 | <div·class="sect1"·title="14.1. Supported·formats"> | 45 | <div·class="sect1"·title="14.1. Supported·formats"> |
46 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 46 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
47 | <a·name="idp6 | 47 | <a·name="idp66284984"></a>14.1. Supported·formats</h2></div></div></div> |
48 | <p>Several·formats·may·be·given·in·the | 48 | <p>Several·formats·may·be·given·in·the |
49 | <code·class="varname">BT_PKG_DISTFMTS</code>·variable,·separated·by·whitespaces. | 49 | <code·class="varname">BT_PKG_DISTFMTS</code>·variable,·separated·by·whitespaces. |
50 | The·following·list·shows·all·of·them,·together·with·their | 50 | The·following·list·shows·all·of·them,·together·with·their |
51 | identificative·string:</p> | 51 | identificative·string:</p> |
52 | <div·class="variablelist"><dl> | 52 | <div·class="variablelist"><dl> |
53 | <dt><span·class="term"><code·class="literal">tar.bz2</code>·or | 53 | <dt><span·class="term"><code·class="literal">tar.bz2</code>·or |
54 | <code·class="literal">tbz</code></span></dt> | 54 | <code·class="literal">tbz</code></span></dt> |
Offset 61, 15 lines modified | Offset 61, 15 lines modified | ||
61 | <dt><span·class="term"><code·class="literal">zip</code></span></dt> | 61 | <dt><span·class="term"><code·class="literal">zip</code></span></dt> |
62 | <dd><p>A·<span·class="command"><strong>zip</strong></span>·compressed | 62 | <dd><p>A·<span·class="command"><strong>zip</strong></span>·compressed |
63 | archive.</p></dd> | 63 | archive.</p></dd> |
64 | </dl></div> | 64 | </dl></div> |
65 | </div> | 65 | </div> |
66 | <div·class="footnotes"> | 66 | <div·class="footnotes"> |
67 | <br><hr·width="100"·align="left"> | 67 | <br><hr·width="100"·align="left"> |
68 | <div·class="footnote"><p><sup>[<a·id="ftn.idp6 | 68 | <div·class="footnote"><p><sup>[<a·id="ftn.idp66281400"·href="#idp66281400"·class="para">12</a>]·</sup>Support·for·binary·archives·may |
69 | be·added·in·a·future.</p></div> | 69 | be·added·in·a·future.</p></div> |
70 | </div> | 70 | </div> |
71 | </div> | 71 | </div> |
72 | <div·class="navfooter"> | 72 | <div·class="navfooter"> |
73 | <hr> | 73 | <hr> |
74 | <table·width="100%"·summary="Navigation·footer"> | 74 | <table·width="100%"·summary="Navigation·footer"> |
75 | <tr> | 75 | <tr> |
Offset 25, 16 lines modified | Offset 25, 16 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 13. Verifying·a·package"> | 26 | <div·class="chapter"·title="Chapter 13. Verifying·a·package"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="bt_lint"></a>Chapter 13. Verifying·a·package</h2></div></div></div> | 28 | <a·name="bt_lint"></a>Chapter 13. Verifying·a·package</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="bt_lint.html#idp6 | 32 | <dt><span·class="sect1"><a·href="bt_lint.html#idp66230712">13.1.·Buildtool·standards</a></span></dt> |
33 | <dd><dl><dt><span·class="sect2"><a·href="bt_lint.html#idp6 | 33 | <dd><dl><dt><span·class="sect2"><a·href="bt_lint.html#idp66231736">13.1.1.·Standard·documents</a></span></dt></dl></dd> |
34 | </dl> | 34 | </dl> |
35 | </div> | 35 | </div> |
36 | <p>It·is·a·fact·that·Buildtool·is·complex.··Making·a·package·which | 36 | <p>It·is·a·fact·that·Buildtool·is·complex.··Making·a·package·which |
37 | conforms·to·all·its·features·is·a·hard·task,·specially·if·you·are·a | 37 | conforms·to·all·its·features·is·a·hard·task,·specially·if·you·are·a |
38 | new·developer·who·is·starting·to·use·it.··Luckily·for·you,·the | 38 | new·developer·who·is·starting·to·use·it.··Luckily·for·you,·the |
39 | <span·class="command"><strong>bt_lint</strong></span>·module·verifies·your·package·against·common | 39 | <span·class="command"><strong>bt_lint</strong></span>·module·verifies·your·package·against·common |
40 | standards·and·warns·you·about·wrong·things.</p> | 40 | standards·and·warns·you·about·wrong·things.</p> |
Offset 62, 23 lines modified | Offset 62, 23 lines modified | ||
62 | <dt><span·class="term">Ok</span></dt> | 62 | <dt><span·class="term">Ok</span></dt> |
63 | <dd><p>Your·package·is·perfect,·according·to·your·Buildtool | 63 | <dd><p>Your·package·is·perfect,·according·to·your·Buildtool |
64 | version.··It·should·keep·this·status·even·if·you·update·Buildtool·to | 64 | version.··It·should·keep·this·status·even·if·you·update·Buildtool·to |
65 | another·version·inside·the·same·branch·(major·number).··See·<a·class="xref"·href="intro.html#versioning"·title="1.3. Versioning">Section 1.3,·“Versioning”</a>·for·more·details.</p></dd> | 65 | another·version·inside·the·same·branch·(major·number).··See·<a·class="xref"·href="intro.html#versioning"·title="1.3. Versioning">Section 1.3,·“Versioning”</a>·for·more·details.</p></dd> |
66 | </dl></div> | 66 | </dl></div> |
67 | <div·class="sect1"·title="13.1. Buildtool·standards"> | 67 | <div·class="sect1"·title="13.1. Buildtool·standards"> |
68 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 68 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
69 | <a·name="idp6 | 69 | <a·name="idp66230712"></a>13.1. Buildtool·standards</h2></div></div></div> |
70 | <p>The·Buildtool·standards·aim·to·create·a·set·of·guidelines·to | 70 | <p>The·Buildtool·standards·aim·to·create·a·set·of·guidelines·to |
71 | keep·all·buildtoolized·packages·somewhat·consistant.··A·user·should·be | 71 | keep·all·buildtoolized·packages·somewhat·consistant.··A·user·should·be |
72 | able·to·gather·information·about·a·package·quickly·if·he·is·aware·of | 72 | able·to·gather·information·about·a·package·quickly·if·he·is·aware·of |
73 | these·standards.··The·following·subsections·document·all·their | 73 | these·standards.··The·following·subsections·document·all·their |
74 | details.</p> | 74 | details.</p> |
75 | <div·class="sect2"·title="13.1.1. Standard·documents"> | 75 | <div·class="sect2"·title="13.1.1. Standard·documents"> |
76 | <div·class="titlepage"><div><div><h3·class="title"> | 76 | <div·class="titlepage"><div><div><h3·class="title"> |
77 | <a·name="idp6 | 77 | <a·name="idp66231736"></a>13.1.1. Standard·documents</h3></div></div></div> |
78 | <p>The·top·directory·of·a·package·is·reserved·to·hold·build·and | 78 | <p>The·top·directory·of·a·package·is·reserved·to·hold·build·and |
79 | package·related·documentation.··You·can·place·as·many·documents·as·you | 79 | package·related·documentation.··You·can·place·as·many·documents·as·you |
80 | want·using·any·name·you·can·think·(tipically·in·upper·case).··Even | 80 | want·using·any·name·you·can·think·(tipically·in·upper·case).··Even |
81 | though,·you·should·maintain·some·consistency·with·other·packages | 81 | though,·you·should·maintain·some·consistency·with·other·packages |
82 | developed·by·other·people.··The·following·list·contains·a·list·of | 82 | developed·by·other·people.··The·following·list·contains·a·list·of |
83 | <span·class="emphasis"><em>recommended</em></span>·documents;·you·may·not·want·to | 83 | <span·class="emphasis"><em>recommended</em></span>·documents;·you·may·not·want·to |
84 | include·them·or·you·may·prefer·other·names.</p> | 84 | include·them·or·you·may·prefer·other·names.</p> |
Offset 25, 16 lines modified | Offset 25, 16 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 5. Building·targets"> | 26 | <div·class="chapter"·title="Chapter 5. Building·targets"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="bt_logic"></a>Chapter 5. Building·targets</h2></div></div></div> | 28 | <a·name="bt_logic"></a>Chapter 5. Building·targets</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="bt_logic.html#idp6 | 32 | <dt><span·class="sect1"><a·href="bt_logic.html#idp64317240">5.1.·The·bt_logic·module</a></span></dt> |
33 | <dt><span·class="sect1"><a·href="bt_logic.html#idp6 | 33 | <dt><span·class="sect1"><a·href="bt_logic.html#idp64414392">5.2.·Examples</a></span></dt> |
34 | </dl> | 34 | </dl> |
35 | </div> | 35 | </div> |
36 | <p>A·target·defines·how·to·do·a·specific·task·with·source·or·object | 36 | <p>A·target·defines·how·to·do·a·specific·task·with·source·or·object |
37 | files,·like·compiling·them,·installing·binaries,·etc.··A·package·has | 37 | files,·like·compiling·them,·installing·binaries,·etc.··A·package·has |
38 | several·standard·targets·associated·to·it,·which·are·described | 38 | several·standard·targets·associated·to·it,·which·are·described |
39 | below:</p> | 39 | below:</p> |
40 | <div·class="variablelist"><dl> | 40 | <div·class="variablelist"><dl> |
Offset 66, 15 lines modified | Offset 66, 15 lines modified | ||
66 | <code·class="filename">Generic.bt</code>·or·by·a·<code·class="filename">Logic.bt</code> | 66 | <code·class="filename">Generic.bt</code>·or·by·a·<code·class="filename">Logic.bt</code> |
67 | file.··Furthermore,·the·package·<span·class="emphasis"><em>must</em></span>·be·configured; | 67 | file.··Furthermore,·the·package·<span·class="emphasis"><em>must</em></span>·be·configured; |
68 | see·<a·class="xref"·href="bt_config.html"·title="Chapter 4. Automatic·package·configuration">Chapter 4,·<i>Automatic·package·configuration</i></a>.</p> | 68 | see·<a·class="xref"·href="bt_config.html"·title="Chapter 4. Automatic·package·configuration">Chapter 4,·<i>Automatic·package·configuration</i></a>.</p> |
69 | <p>In·Buildtool,·the·process·of·building·a·target·is·done·by·the | 69 | <p>In·Buildtool,·the·process·of·building·a·target·is·done·by·the |
70 | <span·class="command"><strong>bt_logic</strong></span>·module.··See·next·section.</p> | 70 | <span·class="command"><strong>bt_logic</strong></span>·module.··See·next·section.</p> |
71 | <div·class="sect1"·title="5.1. The·bt_logic·module"> | 71 | <div·class="sect1"·title="5.1. The·bt_logic·module"> |
72 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 72 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
73 | <a·name="idp6 | 73 | <a·name="idp64317240"></a>5.1. The·bt_logic·module</h2></div></div></div> |
74 | <div·class="cmdsynopsis"><p><code·class="command">buildtool | 74 | <div·class="cmdsynopsis"><p><code·class="command">buildtool |
75 | ······build··|···clean··|···cleandir··|···deinstall··|···install··|···test·· | 75 | ······build··|···clean··|···cleandir··|···deinstall··|···install··|···test·· |
76 | ··</code>··[[-d·<em·class="replaceable"><code>dir</code></em>]·|··[--destdir=<em·class="replaceable"><code>dir</code></em>]]·[[-f·<em·class="replaceable"><code>file</code></em>]·|··[--file=<em·class="replaceable"><code>file</code></em>]]·[[-h]·|··[--help]]·[--ignore-sw-config]·[[-l·<em·class="replaceable"><code>logfile</code></em>]·|··[--logfile=<em·class="replaceable"><code>logfile</code></em>]]·[[-s·<em·class="replaceable"><code>stage</code></em>]·|··[--stage=<em·class="replaceable"><code>stage</code></em>]]·[[-w·<em·class="replaceable"><code>dir</code></em>]·|··[--workdir=<em·class="replaceable"><code>dir</code></em>]]·[<em·class="replaceable"><code>target</code></em>...]</p></div> | 76 | ··</code>··[[-d·<em·class="replaceable"><code>dir</code></em>]·|··[--destdir=<em·class="replaceable"><code>dir</code></em>]]·[[-f·<em·class="replaceable"><code>file</code></em>]·|··[--file=<em·class="replaceable"><code>file</code></em>]]·[[-h]·|··[--help]]·[--ignore-sw-config]·[[-l·<em·class="replaceable"><code>logfile</code></em>]·|··[--logfile=<em·class="replaceable"><code>logfile</code></em>]]·[[-s·<em·class="replaceable"><code>stage</code></em>]·|··[--stage=<em·class="replaceable"><code>stage</code></em>]]·[[-w·<em·class="replaceable"><code>dir</code></em>]·|··[--workdir=<em·class="replaceable"><code>dir</code></em>]]·[<em·class="replaceable"><code>target</code></em>...]</p></div> |
77 | <p>The·<span·class="command"><strong>bt_logic</strong></span>·module·applies·a·stage·to·a·target. | 77 | <p>The·<span·class="command"><strong>bt_logic</strong></span>·module·applies·a·stage·to·a·target. |
78 | A·target·is·a·single·entity·within·the·source·tree·that·is·given·a·name | 78 | A·target·is·a·single·entity·within·the·source·tree·that·is·given·a·name |
79 | and·is·associated·a·set·of·stages.··A·stage·is·the·specific·status·of·a | 79 | and·is·associated·a·set·of·stages.··A·stage·is·the·specific·status·of·a |
80 | target·at·a·specific·time.··For·example,·a·target·can·be·cleaned,·built, | 80 | target·at·a·specific·time.··For·example,·a·target·can·be·cleaned,·built, |
Offset 120, 15 lines modified | Offset 120, 15 lines modified | ||
120 | ······objects,·dependency·tracking,·executables,·etc.··Must·match·the·value | 120 | ······objects,·dependency·tracking,·executables,·etc.··Must·match·the·value |
121 | ······given·to·<span·class="command"><strong>bt_config</strong></span>·during·configuration | 121 | ······given·to·<span·class="command"><strong>bt_config</strong></span>·during·configuration |
122 | ······time.</p></dd> | 122 | ······time.</p></dd> |
123 | </dl></div> | 123 | </dl></div> |
124 | </div> | 124 | </div> |
125 | <div·class="sect1"·title="5.2. Examples"> | 125 | <div·class="sect1"·title="5.2. Examples"> |
126 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 126 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
127 | <a·name="idp6 | 127 | <a·name="idp64414392"></a>5.2. Examples</h2></div></div></div> |
128 | <p>This·section·shows·several·examples·on·how·to·build·targets | 128 | <p>This·section·shows·several·examples·on·how·to·build·targets |
129 | inside·a·source·package.··Remember·that·the·package·must·be·configured | 129 | inside·a·source·package.··Remember·that·the·package·must·be·configured |
130 | before·any·target·can·be·built.</p> | 130 | before·any·target·can·be·built.</p> |
131 | <p>To·build·a·source·package·and·generate·binary·(or·target)·files, | 131 | <p>To·build·a·source·package·and·generate·binary·(or·target)·files, |
132 | simply·issue:</p> | 132 | simply·issue:</p> |
133 | <pre·class="screen"><code·class="prompt">$</code>·buildtool·build</pre> | 133 | <pre·class="screen"><code·class="prompt">$</code>·buildtool·build</pre> |
134 | <p>To·install·the·package·after·it·has·been·built:</p> | 134 | <p>To·install·the·package·after·it·has·been·built:</p> |
Offset 25, 15 lines modified | Offset 25, 15 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 15. Package·flags"> | 26 | <div·class="chapter"·title="Chapter 15. Package·flags"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="bt_pkgflags"></a>Chapter 15. Package·flags</h2></div></div></div> | 28 | <a·name="bt_pkgflags"></a>Chapter 15. Package·flags</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#idp6 | 32 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#idp66316472">15.1.·The·bt_pkgflags·module</a></span></dt> |
33 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#pkgflags">15.2.·Pkgflags·file·format</a></span></dt> | 33 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#pkgflags">15.2.·Pkgflags·file·format</a></span></dt> |
34 | </dl> | 34 | </dl> |
35 | </div> | 35 | </div> |
36 | <p>When·a·developer·wants·to·link·his·program·against·a·third·party | 36 | <p>When·a·developer·wants·to·link·his·program·against·a·third·party |
37 | library,·he·must·know·some·details·about·it,·specially·all·flags·that | 37 | library,·he·must·know·some·details·about·it,·specially·all·flags·that |
38 | need·to·be·passed·to·the·compiler·to·get·a·successful·link.··These·may | 38 | need·to·be·passed·to·the·compiler·to·get·a·successful·link.··These·may |
39 | vary·depending·on·the·system·(i.e.,·shared·or·static·libraries),·on | 39 | vary·depending·on·the·system·(i.e.,·shared·or·static·libraries),·on |
Offset 60, 15 lines modified | Offset 60, 15 lines modified | ||
60 | <p>Even·though,·when·you·write·your·own·library,·it·is·suggested | 60 | <p>Even·though,·when·you·write·your·own·library,·it·is·suggested |
61 | that·you·provide·pkgflags·files·(no·extra·programs·needed·as·this·is | 61 | that·you·provide·pkgflags·files·(no·extra·programs·needed·as·this·is |
62 | entirely·handled·by·Buildtool·itself).··They·store·package | 62 | entirely·handled·by·Buildtool·itself).··They·store·package |
63 | information,·like·its·name·or·its·version·and·also·all·the·flags | 63 | information,·like·its·name·or·its·version·and·also·all·the·flags |
64 | needed·to·compile·and·link·an·application·against·it.</p> | 64 | needed·to·compile·and·link·an·application·against·it.</p> |
65 | <div·class="sect1"·title="15.1. The·bt_pkgflags·module"> | 65 | <div·class="sect1"·title="15.1. The·bt_pkgflags·module"> |
66 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 66 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
67 | <a·name="idp6 | 67 | <a·name="idp66316472"></a>15.1. The·bt_pkgflags·module</h2></div></div></div> |
68 | <div·class="cmdsynopsis"><p><code·class="command">buildtool·pkgflags</code>··[·-c··|···--cflags·]·[·-h··|···--help·]·[·-l··|···--libs·]··<em·class="replaceable"><code>pkgname</code></em>,[<em·class="replaceable"><code>operator</code></em>,<em·class="replaceable"><code>version</code></em>]...·</p></div> | 68 | <div·class="cmdsynopsis"><p><code·class="command">buildtool·pkgflags</code>··[·-c··|···--cflags·]·[·-h··|···--help·]·[·-l··|···--libs·]··<em·class="replaceable"><code>pkgname</code></em>,[<em·class="replaceable"><code>operator</code></em>,<em·class="replaceable"><code>version</code></em>]...·</p></div> |
69 | <p>The·<span·class="command"><strong>bt_pkgflags</strong></span>·module·is·used·to·get·package | 69 | <p>The·<span·class="command"><strong>bt_pkgflags</strong></span>·module·is·used·to·get·package |
70 | flags·from·installed·pkgflags·files,·which·are·printed·to·standard | 70 | flags·from·installed·pkgflags·files,·which·are·printed·to·standard |
71 | output.··Each·argument·specifies·a·package·name·from·which·flags·are | 71 | output.··Each·argument·specifies·a·package·name·from·which·flags·are |
72 | requested.··If·the·argument·contains·three·fields·instead·of·only·one | 72 | requested.··If·the·argument·contains·three·fields·instead·of·only·one |
73 | (separated·either·by·commas·or·spaces),·the·second·is·treated·as·the | 73 | (separated·either·by·commas·or·spaces),·the·second·is·treated·as·the |
74 | version·operator·and·the·third·as·the·version·number.··The·operator | 74 | version·operator·and·the·third·as·the·version·number.··The·operator |
Offset 25, 24 lines modified | Offset 25, 24 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 6. System·wide·configuration"> | 26 | <div·class="chapter"·title="Chapter 6. System·wide·configuration"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="bt_swcgen"></a>Chapter 6. System·wide·configuration</h2></div></div></div> | 28 | <a·name="bt_swcgen"></a>Chapter 6. System·wide·configuration</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="bt_swcgen.html#idp64 | 32 | <dt><span·class="sect1"><a·href="bt_swcgen.html#idp64518968">6.1.·The·bt_swcgen·module</a></span></dt> |
33 | <dd><dl> | 33 | <dd><dl> |
34 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64 | 34 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64561336">6.1.1.·Input·file·structure</a></span></dt> |
35 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64 | 35 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64565816">6.1.2.·Available·functions</a></span></dt> |
36 | </dl></dd> | 36 | </dl></dd> |
37 | </dl> | 37 | </dl> |
38 | </div> | 38 | </div> |
39 | <p>Buildtool·can·be·configured·on·a·host·basis·by·using·system·wide | 39 | <p>Buildtool·can·be·configured·on·a·host·basis·by·using·system·wide |
40 | configuration·files,·all·of·them·placed·in·the·configuration·directory | 40 | configuration·files,·all·of·them·placed·in·the·configuration·directory |
41 | choosed·at·installation·time<sup>[<a·name="idp64 | 41 | choosed·at·installation·time<sup>[<a·name="idp64510776"·href="#ftn.idp64510776"·class="footnote">6</a>]</sup>. |
42 | The·following·files·will·be·recognized·and·used·if·placed·inside | 42 | The·following·files·will·be·recognized·and·used·if·placed·inside |
43 | it:</p> | 43 | it:</p> |
44 | <div·class="variablelist"><dl> | 44 | <div·class="variablelist"><dl> |
45 | <dt><span·class="term"><code·class="filename">bt_config.conf</code></span></dt> | 45 | <dt><span·class="term"><code·class="filename">bt_config.conf</code></span></dt> |
46 | <dd><p>File·read·by·the·<span·class="command"><strong>bt_config</strong></span>·module | 46 | <dd><p>File·read·by·the·<span·class="command"><strong>bt_config</strong></span>·module |
47 | ··before·starting·the·configuration·process·of·a·source·package.··This | 47 | ··before·starting·the·configuration·process·of·a·source·package.··This |
48 | ··file·is·specially·useful·to·add·system·wide·default·values·for | 48 | ··file·is·specially·useful·to·add·system·wide·default·values·for |
Offset 66, 15 lines modified | Offset 66, 15 lines modified | ||
66 | you·in·the·generation·of·such·file,·and·will·take·care·to·keep·it·up | 66 | you·in·the·generation·of·such·file,·and·will·take·care·to·keep·it·up |
67 | to·date·with·a·simple·command.</p> | 67 | to·date·with·a·simple·command.</p> |
68 | <p>This·chapter·describes·how·to·use·the | 68 | <p>This·chapter·describes·how·to·use·the |
69 | <span·class="command"><strong>bt_swcgen</strong></span>·utility·to·automatically·generate·a | 69 | <span·class="command"><strong>bt_swcgen</strong></span>·utility·to·automatically·generate·a |
70 | system·wide·<code·class="filename">bt_config.conf</code>·configuration·file.</p> | 70 | system·wide·<code·class="filename">bt_config.conf</code>·configuration·file.</p> |
71 | <div·class="sect1"·title="6.1. The·bt_swcgen·module"> | 71 | <div·class="sect1"·title="6.1. The·bt_swcgen·module"> |
72 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 72 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
73 | <a·name="idp64 | 73 | <a·name="idp64518968"></a>6.1. The·bt_swcgen·module</h2></div></div></div> |
74 | <div·class="cmdsynopsis"><p><code·class="command">buildtool·swcgen</code>··[·-h··|···--help·]·[·-i·<em·class="replaceable"><code>file</code></em>··|···--input=<em·class="replaceable"><code>file</code></em>·]·[·-o·<em·class="replaceable"><code>file</code></em>··|···--output=<em·class="replaceable"><code>file</code></em>·]</p></div> | 74 | <div·class="cmdsynopsis"><p><code·class="command">buildtool·swcgen</code>··[·-h··|···--help·]·[·-i·<em·class="replaceable"><code>file</code></em>··|···--input=<em·class="replaceable"><code>file</code></em>·]·[·-o·<em·class="replaceable"><code>file</code></em>··|···--output=<em·class="replaceable"><code>file</code></em>·]</p></div> |
75 | <p>The·<span·class="command"><strong>bt_swcgen</strong></span>·module·is·used·to·automatically | 75 | <p>The·<span·class="command"><strong>bt_swcgen</strong></span>·module·is·used·to·automatically |
76 | generate·a·configuration·file·for·<span·class="command"><strong>bt_config</strong></span>, | 76 | generate·a·configuration·file·for·<span·class="command"><strong>bt_config</strong></span>, |
77 | including·cached·results·for·common·checks·usually·issued·in·your | 77 | including·cached·results·for·common·checks·usually·issued·in·your |
78 | system.··The·<span·class="emphasis"><em>output·file</em></span>·is·generated·using | 78 | system.··The·<span·class="emphasis"><em>output·file</em></span>·is·generated·using |
79 | a·special·script·as·input.</p> | 79 | a·special·script·as·input.</p> |
80 | <p>The·<span·class="emphasis"><em>input·file</em></span>·calls·several·functions·that | 80 | <p>The·<span·class="emphasis"><em>input·file</em></span>·calls·several·functions·that |
Offset 124, 15 lines modified | Offset 124, 15 lines modified | ||
124 | <dt><span·class="term"> | 124 | <dt><span·class="term"> |
125 | ······<div·class="cmdsynopsis"><p>··-o·<em·class="replaceable"><code>file</code></em>··|···--output=<em·class="replaceable"><code>file</code></em>··</p></div> | 125 | ······<div·class="cmdsynopsis"><p>··-o·<em·class="replaceable"><code>file</code></em>··|···--output=<em·class="replaceable"><code>file</code></em>··</p></div> |
126 | ····</span></dt> | 126 | ····</span></dt> |
127 | <dd><p>Sets·the·output·filename.</p></dd> | 127 | <dd><p>Sets·the·output·filename.</p></dd> |
128 | </dl></div> | 128 | </dl></div> |
129 | <div·class="sect2"·title="6.1.1. Input·file·structure"> | 129 | <div·class="sect2"·title="6.1.1. Input·file·structure"> |
130 | <div·class="titlepage"><div><div><h3·class="title"> | 130 | <div·class="titlepage"><div><div><h3·class="title"> |
131 | <a·name="idp64 | 131 | <a·name="idp64561336"></a>6.1.1. Input·file·structure</h3></div></div></div> |
132 | <p>The·input·file·is·a·regular·shell·file·which·calls·some·specific | 132 | <p>The·input·file·is·a·regular·shell·file·which·calls·some·specific |
133 | functions.··Therefore,·it·can·contain·conditionals,·loops,·comments·or | 133 | functions.··Therefore,·it·can·contain·conditionals,·loops,·comments·or |
134 | anything·else·supported·by·the·shell·interpreter.··The·file·should | 134 | anything·else·supported·by·the·shell·interpreter.··The·file·should |
135 | follow·the·following·structure:</p> | 135 | follow·the·following·structure:</p> |
136 | <pre·class="programlisting">#·bt_config.conf.in·input·file | 136 | <pre·class="programlisting">#·bt_config.conf.in·input·file |
137 | #·Calls·to·detect·and·cache·development·environments | 137 | #·Calls·to·detect·and·cache·development·environments |
Offset 160, 15 lines modified | Offset 160, 15 lines modified | ||
160 | ··It·is·also·a·good·practice·to·run·this·module·from | 160 | ··It·is·also·a·good·practice·to·run·this·module·from |
161 | ··<span·class="command"><strong>cron</strong></span>·periodically·so·the·cache·is·updated·without | 161 | ··<span·class="command"><strong>cron</strong></span>·periodically·so·the·cache·is·updated·without |
162 | ··disturbing·users.</p> | 162 | ··disturbing·users.</p> |
163 | </div> | 163 | </div> |
164 | </div> | 164 | </div> |
165 | <div·class="sect2"·title="6.1.2. Available·functions"> | 165 | <div·class="sect2"·title="6.1.2. Available·functions"> |
166 | <div·class="titlepage"><div><div><h3·class="title"> | 166 | <div·class="titlepage"><div><div><h3·class="title"> |
167 | <a·name="idp64 | 167 | <a·name="idp64565816"></a>6.1.2. Available·functions</h3></div></div></div> |
168 | <p>This·section·describes·all·the·functions·that·can·be·used·when | 168 | <p>This·section·describes·all·the·functions·that·can·be·used·when |
169 | writting·the·input·file.</p> | 169 | writting·the·input·file.</p> |
170 | <div·class="variablelist"><dl> | 170 | <div·class="variablelist"><dl> |
171 | <dt><span·class="term"><code·class="function">bt_cache_attribute</code></span></dt> | 171 | <dt><span·class="term"><code·class="function">bt_cache_attribute</code></span></dt> |
172 | <dd><p>Detects·and·caches·the·result·of·the | 172 | <dd><p>Detects·and·caches·the·result·of·the |
173 | ····<code·class="function">bt_check_attribute</code>·check.·See·<a·class="xref"·href="config.html#bt_check_attribute"·title="11.7.6.5. The·attribute·keyword">Section 11.7.6.5,·“The·attribute·keyword”</a>.</p></dd> | 173 | ····<code·class="function">bt_check_attribute</code>·check.·See·<a·class="xref"·href="config.html#bt_check_attribute"·title="11.7.6.5. The·attribute·keyword">Section 11.7.6.5,·“The·attribute·keyword”</a>.</p></dd> |
174 | <dt><span·class="term"><code·class="function">bt_check_env</code> | 174 | <dt><span·class="term"><code·class="function">bt_check_env</code> |
Offset 224, 15 lines modified | Offset 224, 15 lines modified | ||
224 | ····is·a·very·convenient·way·to·add·multiple·lines·to·the·output | 224 | ····is·a·very·convenient·way·to·add·multiple·lines·to·the·output |
225 | ····file·(without·using·<code·class="function">bt_echo</code>).</p></dd> | 225 | ····file·(without·using·<code·class="function">bt_echo</code>).</p></dd> |
226 | </dl></div> | 226 | </dl></div> |
227 | </div> | 227 | </div> |
228 | </div> | 228 | </div> |
229 | <div·class="footnotes"> | 229 | <div·class="footnotes"> |
230 | <br><hr·width="100"·align="left"> | 230 | <br><hr·width="100"·align="left"> |
231 | <div·class="footnote"><p><sup>[<a·id="ftn.idp64 | 231 | <div·class="footnote"><p><sup>[<a·id="ftn.idp64510776"·href="#idp64510776"·class="para">6</a>]·</sup>This·directory·will·usually |
232 | be·<code·class="filename">/etc/buildtool/</code>·on·most·Linux·based·systems,·but | 232 | be·<code·class="filename">/etc/buildtool/</code>·on·most·Linux·based·systems,·but |
233 | will·probably·change·on·BSD·systems·and·others.</p></div> | 233 | will·probably·change·on·BSD·systems·and·others.</p></div> |
234 | </div> | 234 | </div> |
235 | </div> | 235 | </div> |
236 | <div·class="navfooter"> | 236 | <div·class="navfooter"> |
237 | <hr> | 237 | <hr> |
238 | <table·width="100%"·summary="Navigation·footer"> | 238 | <table·width="100%"·summary="Navigation·footer"> |
Offset 25, 31 lines modified | Offset 25, 31 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 2. The·buildtool·command"> | 26 | <div·class="chapter"·title="Chapter 2. The·buildtool·command"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="buildtool"></a>Chapter 2. The·buildtool·command</h2></div></div></div> | 28 | <a·name="buildtool"></a>Chapter 2. The·buildtool·command</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="buildtool.html#idp63 | 32 | <dt><span·class="sect1"><a·href="buildtool.html#idp63860536">2.1.·Command·syntax</a></span></dt> |
33 | <dt><span·class="sect1"><a·href="buildtool.html#siteinfo">2.2.·Site·information</a></span></dt> | 33 | <dt><span·class="sect1"><a·href="buildtool.html#siteinfo">2.2.·Site·information</a></span></dt> |
34 | <dt><span·class="sect1"><a·href="buildtool.html#idp63 | 34 | <dt><span·class="sect1"><a·href="buildtool.html#idp63933368">2.3.·Examples</a></span></dt> |
35 | </dl> | 35 | </dl> |
36 | </div> | 36 | </div> |
37 | <p>Buildtool's·main·program,·<span·class="command"><strong>buildtool</strong></span>·is·a | 37 | <p>Buildtool's·main·program,·<span·class="command"><strong>buildtool</strong></span>·is·a |
38 | small·wrapper·that·executes·the·right·module·depending·on·the·job·you | 38 | small·wrapper·that·executes·the·right·module·depending·on·the·job·you |
39 | want·to·do.··It·also·takes·care·to·check·if·Buildtool's·installed | 39 | want·to·do.··It·also·takes·care·to·check·if·Buildtool's·installed |
40 | version·matches·the·version·required·by·the·current·package·(if | 40 | version·matches·the·version·required·by·the·current·package·(if |
41 | applicable),·as·described·in·<a·class="xref"·href="intro.html#versioning"·title="1.3. Versioning">Section 1.3,·“Versioning”</a>.</p> | 41 | applicable),·as·described·in·<a·class="xref"·href="intro.html#versioning"·title="1.3. Versioning">Section 1.3,·“Versioning”</a>.</p> |
42 | <p>You·cannot·execute·a·module·directly·from·the·command·line,·as | 42 | <p>You·cannot·execute·a·module·directly·from·the·command·line,·as |
43 | the·wrapper·issues·several·sanity·checks·and·gives·extra·arguments·to | 43 | the·wrapper·issues·several·sanity·checks·and·gives·extra·arguments·to |
44 | them,·if·needed.··Therefore·you·will·be·using·the·module·wrapper | 44 | them,·if·needed.··Therefore·you·will·be·using·the·module·wrapper |
45 | continuously.</p> | 45 | continuously.</p> |
46 | <div·class="sect1"·title="2.1. Command·syntax"> | 46 | <div·class="sect1"·title="2.1. Command·syntax"> |
47 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 47 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
48 | <a·name="idp63 | 48 | <a·name="idp63860536"></a>2.1. Command·syntax</h2></div></div></div> |
49 | <div·class="cmdsynopsis"><p><code·class="command">buildtool</code>··[·-h··|···--help·]·[·-v··|···--version·]··target··[target·options]</p></div> | 49 | <div·class="cmdsynopsis"><p><code·class="command">buildtool</code>··[·-h··|···--help·]·[·-v··|···--version·]··target··[target·options]</p></div> |
50 | <p>The·following·options·are·recognized:</p> | 50 | <p>The·following·options·are·recognized:</p> |
51 | <div·class="variablelist"><dl> | 51 | <div·class="variablelist"><dl> |
52 | <dt><span·class="term"> | 52 | <dt><span·class="term"> |
53 | ······<div·class="cmdsynopsis"><p>··-h··|···--help··</p></div> | 53 | ······<div·class="cmdsynopsis"><p>··-h··|···--help··</p></div> |
54 | ····</span></dt> | 54 | ····</span></dt> |
55 | <dd><p>Shows·an·useful·help·message,·listing·all·available | 55 | <dd><p>Shows·an·useful·help·message,·listing·all·available |
Offset 139, 15 lines modified | Offset 139, 15 lines modified | ||
139 | <dt><span·class="term"><code·class="literal">dirsubr</code></span></dt> | 139 | <dt><span·class="term"><code·class="literal">dirsubr</code></span></dt> |
140 | <dd><p>Directory·where·generic·configuration·subroutines | 140 | <dd><p>Directory·where·generic·configuration·subroutines |
141 | ··are·located.</p></dd> | 141 | ··are·located.</p></dd> |
142 | </dl></div> | 142 | </dl></div> |
143 | </div> | 143 | </div> |
144 | <div·class="sect1"·title="2.3. Examples"> | 144 | <div·class="sect1"·title="2.3. Examples"> |
145 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 145 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
146 | <a·name="idp63 | 146 | <a·name="idp63933368"></a>2.3. Examples</h2></div></div></div> |
147 | <p>The·following·example·shows·<span·class="command"><strong>buildtool</strong></span>'s·help | 147 | <p>The·following·example·shows·<span·class="command"><strong>buildtool</strong></span>'s·help |
148 | message,·which·displays·more·or·less·the·information·shown | 148 | message,·which·displays·more·or·less·the·information·shown |
149 | above.</p> | 149 | above.</p> |
150 | <pre·class="screen"><code·class="prompt">$</code>·buildtool·--help</pre> | 150 | <pre·class="screen"><code·class="prompt">$</code>·buildtool·--help</pre> |
151 | <p>The·previous·command·is·different·than·the·one·given·below, | 151 | <p>The·previous·command·is·different·than·the·one·given·below, |
152 | which·shows·<span·class="command"><strong>bt_config</strong></span>'s·help·message.··Please·keep | 152 | which·shows·<span·class="command"><strong>bt_config</strong></span>'s·help·message.··Please·keep |
153 | in·mind·this·difference,·as·it·might·cause·trouble·to·you:</p> | 153 | in·mind·this·difference,·as·it·might·cause·trouble·to·you:</p> |
Offset 25, 48 lines modified | Offset 25, 48 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 11. The·configuration·script"> | 26 | <div·class="chapter"·title="Chapter 11. The·configuration·script"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="config"></a>Chapter 11. The·configuration·script</h2></div></div></div> | 28 | <a·name="config"></a>Chapter 11. The·configuration·script</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="config.html#idp6 | 32 | <dt><span·class="sect1"><a·href="config.html#idp65100984">11.1.·Script·structure</a></span></dt> |
33 | <dt><span·class="sect1"><a·href="config.html#idp6 | 33 | <dt><span·class="sect1"><a·href="config.html#idp65110072">11.2.·Printing·messages</a></span></dt> |
34 | <dd><dl> | 34 | <dd><dl> |
35 | <dt><span·class="sect2"><a·href="config.html#idp6 | 35 | <dt><span·class="sect2"><a·href="config.html#idp65112376">11.2.1.·Error·messages</a></span></dt> |
36 | <dt><span·class="sect2"><a·href="config.html#idp6 | 36 | <dt><span·class="sect2"><a·href="config.html#idp65118520">11.2.2.·Warning·messages</a></span></dt> |
37 | <dt><span·class="sect2"><a·href="config.html#idp6 | 37 | <dt><span·class="sect2"><a·href="config.html#idp65124664">11.2.3.·Summary·messages</a></span></dt> |
38 | <dt><span·class="sect2"><a·href="config.html#idp6 | 38 | <dt><span·class="sect2"><a·href="config.html#idp65130808">11.2.4.·Check·messages</a></span></dt> |
39 | </dl></dd> | 39 | </dl></dd> |
40 | <dt><span·class="sect1"><a·href="config.html#idp6 | 40 | <dt><span·class="sect1"><a·href="config.html#idp65140280">11.3.·Customizable·directories·and·features</a></span></dt> |
41 | <dd><dl> | 41 | <dd><dl> |
42 | <dt><span·class="sect2"><a·href="config.html#idp6 | 42 | <dt><span·class="sect2"><a·href="config.html#idp65142072">11.3.1.·Directories</a></span></dt> |
43 | <dt><span·class="sect2"><a·href="config.html#idp6 | 43 | <dt><span·class="sect2"><a·href="config.html#idp65163192">11.3.2.·Features</a></span></dt> |
44 | </dl></dd> | 44 | </dl></dd> |
45 | <dt><span·class="sect1"><a·href="config.html#subrload">11.4.·Loading·subroutine·modules</a></span></dt> | 45 | <dt><span·class="sect1"><a·href="config.html#subrload">11.4.·Loading·subroutine·modules</a></span></dt> |
46 | <dt><span·class="sect1"><a·href="config.html#idp6 | 46 | <dt><span·class="sect1"><a·href="config.html#idp65194936">11.5.·Variables·and·results</a></span></dt> |
47 | <dd><dl> | 47 | <dd><dl> |
48 | <dt><span·class="sect2"><a·href="config.html#bt_generate_output">11.5.1.·Generating·output·files</a></span></dt> | 48 | <dt><span·class="sect2"><a·href="config.html#bt_generate_output">11.5.1.·Generating·output·files</a></span></dt> |
49 | <dt><span·class="sect2"><a·href="config.html#idp6 | 49 | <dt><span·class="sect2"><a·href="config.html#idp65220664">11.5.2.·Generating·a·C/C++·configuration·header</a></span></dt> |
50 | </dl></dd> | 50 | </dl></dd> |
51 | <dt><span·class="sect1"><a·href="config.html#languages">11.6.·Languages·support</a></span></dt> | 51 | <dt><span·class="sect1"><a·href="config.html#languages">11.6.·Languages·support</a></span></dt> |
52 | <dt><span·class="sect1"><a·href="config.html#idp6 | 52 | <dt><span·class="sect1"><a·href="config.html#idp65242936">11.7.·Standard·checks</a></span></dt> |
53 | <dd><dl> | 53 | <dd><dl> |
54 | <dt><span·class="sect2"><a·href="config.html#envs">11.7.1.·Checking·for·build·environments</a></span></dt> | 54 | <dt><span·class="sect2"><a·href="config.html#envs">11.7.1.·Checking·for·build·environments</a></span></dt> |
55 | <dt><span·class="sect2"><a·href="config.html#progs">11.7.2.·Checking·for·programs</a></span></dt> | 55 | <dt><span·class="sect2"><a·href="config.html#progs">11.7.2.·Checking·for·programs</a></span></dt> |
56 | <dt><span·class="sect2"><a·href="config.html#idp6 | 56 | <dt><span·class="sect2"><a·href="config.html#idp65350584">11.7.3.·Checking·for·header·files</a></span></dt> |
57 | <dt><span·class="sect2"><a·href="config.html#idp6 | 57 | <dt><span·class="sect2"><a·href="config.html#idp65369656">11.7.4.·Checking·for·system·specific·functions</a></span></dt> |
58 | <dt><span·class="sect2"><a·href="config.html#idp6 | 58 | <dt><span·class="sect2"><a·href="config.html#idp65379000">11.7.5.·Checking·for·libraries</a></span></dt> |
59 | <dt><span·class="sect2"><a·href="config.html#idp6 | 59 | <dt><span·class="sect2"><a·href="config.html#idp65393208">11.7.6.·Miscellaneous·checks</a></span></dt> |
60 | </dl></dd> | 60 | </dl></dd> |
61 | <dt><span·class="sect1"><a·href="config.html#stdsubrs">11.8.·Standard·subroutine·modules</a></span></dt> | 61 | <dt><span·class="sect1"><a·href="config.html#stdsubrs">11.8.·Standard·subroutine·modules</a></span></dt> |
62 | <dd><dl> | 62 | <dd><dl> |
63 | <dt><span·class="sect2"><a·href="config.html#pkgconfig.subr">11.8.1.·The·pkgconfig·module</a></span></dt> | 63 | <dt><span·class="sect2"><a·href="config.html#pkgconfig.subr">11.8.1.·The·pkgconfig·module</a></span></dt> |
64 | <dt><span·class="sect2"><a·href="config.html#idp65 | 64 | <dt><span·class="sect2"><a·href="config.html#idp65485624">11.8.2.·The·pthread·module</a></span></dt> |
65 | <dt><span·class="sect2"><a·href="config.html#idp65 | 65 | <dt><span·class="sect2"><a·href="config.html#idp65495224">11.8.3.·The·x11·module</a></span></dt> |
66 | </dl></dd> | 66 | </dl></dd> |
67 | </dl> | 67 | </dl> |
68 | </div> | 68 | </div> |
69 | <p>The·<span·class="emphasis"><em>configuration·script</em></span>·is·used·by·the | 69 | <p>The·<span·class="emphasis"><em>configuration·script</em></span>·is·used·by·the |
70 | <span·class="command"><strong>bt_config</strong></span>·module·to·automatically·configure·a | 70 | <span·class="command"><strong>bt_config</strong></span>·module·to·automatically·configure·a |
71 | source·package.··It·is·located·inside·the | 71 | source·package.··It·is·located·inside·the |
72 | <code·class="filename">Generic.bt</code>,·splitted·in·two·functions: | 72 | <code·class="filename">Generic.bt</code>,·splitted·in·two·functions: |
Offset 96, 22 lines modified | Offset 96, 22 lines modified | ||
96 | configure·source·packages.··It·provides·a·command·line·frontend,·as·we | 96 | configure·source·packages.··It·provides·a·command·line·frontend,·as·we |
97 | described·in·<a·class="xref"·href="bt_config.html"·title="Chapter 4. Automatic·package·configuration">Chapter 4,·<i>Automatic·package·configuration</i></a>,·and·lots·of·shell·functions | 97 | described·in·<a·class="xref"·href="bt_config.html"·title="Chapter 4. Automatic·package·configuration">Chapter 4,·<i>Automatic·package·configuration</i></a>,·and·lots·of·shell·functions |
98 | used·to·easily·write·a·configuration·script.··These·include·predefined | 98 | used·to·easily·write·a·configuration·script.··These·include·predefined |
99 | checks,·functions·to·generate·output·files·and·functions·to·write | 99 | checks,·functions·to·generate·output·files·and·functions·to·write |
100 | diagnostic·messages,·between·others.</p> | 100 | diagnostic·messages,·between·others.</p> |
101 | <div·class="sect1"·title="11.1. Script·structure"> | 101 | <div·class="sect1"·title="11.1. Script·structure"> |
102 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 102 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
103 | <a·name="idp6 | 103 | <a·name="idp65100984"></a>11.1. Script·structure</h2></div></div></div> |
104 | <p>The·configuration·script·is·a·simple·shell·script·that·calls | 104 | <p>The·configuration·script·is·a·simple·shell·script·that·calls |
105 | functions·provided·by·the·<span·class="command"><strong>bt_config</strong></span>·module.··As | 105 | functions·provided·by·the·<span·class="command"><strong>bt_config</strong></span>·module.··As |
106 | such,·it·can·include·conditional·sentences,·loops,·functions,·or | 106 | such,·it·can·include·conditional·sentences,·loops,·functions,·or |
107 | whatever·else·is·supported·by·the·standard·shell<sup>[<a·name="idp6 | 107 | whatever·else·is·supported·by·the·standard·shell<sup>[<a·name="idp65102520"·href="#ftn.idp65102520"·class="footnote">7</a>]</sup>,·thus |
108 | becoming·extremely·powerful.··The·script·is·parsed·during·runtime, | 108 | becoming·extremely·powerful.··The·script·is·parsed·during·runtime, |
109 | which·means·that·Buildtool·must·be·present·in·the·build | 109 | which·means·that·Buildtool·must·be·present·in·the·build |
110 | system<sup>[<a·name="idp6 | 110 | system<sup>[<a·name="idp65103032"·href="#ftn.idp65103032"·class="footnote">8</a>]</sup>.</p> |
111 | <p>The·script·is·divided·in·two·blocks,·each·one·contained·in·its | 111 | <p>The·script·is·divided·in·two·blocks,·each·one·contained·in·its |
112 | own·shell·function:</p> | 112 | own·shell·function:</p> |
113 | <div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"> | 113 | <div·class="itemizedlist"><ul·class="itemizedlist"·type="disc"> |
114 | <li·class="listitem"><p>The·<span·class="emphasis"><em>initialization·block</em></span>, | 114 | <li·class="listitem"><p>The·<span·class="emphasis"><em>initialization·block</em></span>, |
115 | enclosed·in·the·<code·class="function">config_init</code>·function.··This·is | 115 | enclosed·in·the·<code·class="function">config_init</code>·function.··This·is |
116 | parsed·before·the·module·analyzes·command·line·arguments,·therefore·it | 116 | parsed·before·the·module·analyzes·command·line·arguments,·therefore·it |
117 | is·used·to·define·new·customizable·directories·and·features,·change | 117 | is·used·to·define·new·customizable·directories·and·features,·change |
Offset 141, 25 lines modified | Offset 141, 25 lines modified | ||
141 | ····#·Checks·and·other·configuration·code·go·here | 141 | ····#·Checks·and·other·configuration·code·go·here |
142 | ····return | 142 | ····return |
143 | }</pre> | 143 | }</pre> |
144 | </div> | 144 | </div> |
145 | <div·class="sect1"·title="11.2. Printing·messages"> | 145 | <div·class="sect1"·title="11.2. Printing·messages"> |
146 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 146 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
147 | <a·name="idp6 | 147 | <a·name="idp65110072"></a>11.2. Printing·messages</h2></div></div></div> |
148 | <p>There·are·several·standard·functions·to·output·diagnostic | 148 | <p>There·are·several·standard·functions·to·output·diagnostic |
149 | messages·while·the·script·is·processed.··You·should·not·directly·use | 149 | messages·while·the·script·is·processed.··You·should·not·directly·use |
150 | commands·like·<span·class="command"><strong>echo</strong></span>·or·<span·class="command"><strong>printf</strong></span>,·as | 150 | commands·like·<span·class="command"><strong>echo</strong></span>·or·<span·class="command"><strong>printf</strong></span>,·as |
151 | they·may·make·your·script·not·work·as·expected·(for·example,·stdout | 151 | they·may·make·your·script·not·work·as·expected·(for·example,·stdout |
152 | vs.·stderr·not·beeing·managed·properly).··Most·of·these·functions·will | 152 | vs.·stderr·not·beeing·managed·properly).··Most·of·these·functions·will |
153 | also·take·care·to·write·proper·information·in·the·configuration | 153 | also·take·care·to·write·proper·information·in·the·configuration |
154 | log.</p> | 154 | log.</p> |
155 | <div·class="sect2"·title="11.2.1. Error·messages"> | 155 | <div·class="sect2"·title="11.2.1. Error·messages"> |
156 | <div·class="titlepage"><div><div><h3·class="title"> | 156 | <div·class="titlepage"><div><div><h3·class="title"> |
157 | <a·name="idp6 | 157 | <a·name="idp65112376"></a>11.2.1. Error·messages</h3></div></div></div> |
158 | <p>An·error·message·is·printed·whenever·a·fatal·condition·happens | 158 | <p>An·error·message·is·printed·whenever·a·fatal·condition·happens |
159 | in·the·configuration·script·(like·not·finding·a·required·library). | 159 | in·the·configuration·script·(like·not·finding·a·required·library). |
160 | The·message·can·contain·information·about·what·went·wrong,·how·to·fix | 160 | The·message·can·contain·information·about·what·went·wrong,·how·to·fix |
161 | it,·suggestions,·etc.··After·it·is·shown,·the·script·aborts·the | 161 | it,·suggestions,·etc.··After·it·is·shown,·the·script·aborts·the |
162 | configuration·process.</p> | 162 | configuration·process.</p> |
163 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_err</strong> | 163 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_err</strong> |
164 | ··<i>line1</i> | 164 | ··<i>line1</i> |
Offset 171, 15 lines modified | Offset 171, 15 lines modified | ||
171 | as·these·messages·are·usually·too·long·to·fit·on·a·single·line.··A | 171 | as·these·messages·are·usually·too·long·to·fit·on·a·single·line.··A |
172 | simple·example:</p> | 172 | simple·example:</p> |
173 | <pre·class="programlisting">bt_err·"The·required·library·foobar·was·not·found."·\ | 173 | <pre·class="programlisting">bt_err·"The·required·library·foobar·was·not·found."·\ |
174 | ·······"You·can·download·it·from·http://www.foobar.org/."</pre> | 174 | ·······"You·can·download·it·from·http://www.foobar.org/."</pre> |
175 | </div> | 175 | </div> |
176 | <div·class="sect2"·title="11.2.2. Warning·messages"> | 176 | <div·class="sect2"·title="11.2.2. Warning·messages"> |
177 | <div·class="titlepage"><div><div><h3·class="title"> | 177 | <div·class="titlepage"><div><div><h3·class="title"> |
178 | <a·name="idp6 | 178 | <a·name="idp65118520"></a>11.2.2. Warning·messages</h3></div></div></div> |
179 | <p>A·warning·message·is·printed·whenever·a·non-fatal·strange | 179 | <p>A·warning·message·is·printed·whenever·a·non-fatal·strange |
180 | condition·happens·in·the·configuration·script.··The·script·is·not | 180 | condition·happens·in·the·configuration·script.··The·script·is·not |
181 | aborted·after·the·message·is·printed.</p> | 181 | aborted·after·the·message·is·printed.</p> |
182 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_warn</strong> | 182 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_warn</strong> |
183 | ··<i>line1</i> | 183 | ··<i>line1</i> |
184 | ··<i>...</i> | 184 | ··<i>...</i> |
185 | ··<i>lineN</i> | 185 | ··<i>lineN</i> |
Offset 189, 15 lines modified | Offset 189, 15 lines modified | ||
189 | different·line,·as·these·messages·are·usually·too·long·to·fit·on·a | 189 | different·line,·as·these·messages·are·usually·too·long·to·fit·on·a |
190 | single·line.··A·simple·example:</p> | 190 | single·line.··A·simple·example:</p> |
191 | <pre·class="programlisting">bt_warn·"The·suggested·library·foobar·was·not·found."·\ | 191 | <pre·class="programlisting">bt_warn·"The·suggested·library·foobar·was·not·found."·\ |
192 | ········"You·should·install·it·for·optimal·results."</pre> | 192 | ········"You·should·install·it·for·optimal·results."</pre> |
193 | </div> | 193 | </div> |
194 | <div·class="sect2"·title="11.2.3. Summary·messages"> | 194 | <div·class="sect2"·title="11.2.3. Summary·messages"> |
195 | <div·class="titlepage"><div><div><h3·class="title"> | 195 | <div·class="titlepage"><div><div><h3·class="title"> |
196 | <a·name="idp6 | 196 | <a·name="idp65124664"></a>11.2.3. Summary·messages</h3></div></div></div> |
197 | <p>A·summary·message·is·printed·when·the·configuration·finishes. | 197 | <p>A·summary·message·is·printed·when·the·configuration·finishes. |
198 | It·may·contain·useful·and·important·information·that·the·user·should | 198 | It·may·contain·useful·and·important·information·that·the·user·should |
199 | notice·(like·if·some·imporant·hidden·feature·has·been·enabled·or·not). | 199 | notice·(like·if·some·imporant·hidden·feature·has·been·enabled·or·not). |
200 | These·messages·can·be·defined·at·any·point·inside·the·configuration | 200 | These·messages·can·be·defined·at·any·point·inside·the·configuration |
201 | script,·using·the·<code·class="function">bt_msg_summary</code>·function.··The | 201 | script,·using·the·<code·class="function">bt_msg_summary</code>·function.··The |
202 | configuration·script·will·keep·them·in·memory·until·it | 202 | configuration·script·will·keep·them·in·memory·until·it |
203 | finishes.··The·function·syntax·is:</p> | 203 | finishes.··The·function·syntax·is:</p> |
Offset 211, 15 lines modified | Offset 211, 15 lines modified | ||
211 | <pre·class="programlisting">bt_msg_summary·'The·installation·prefix·is·${BT_PREFIX}'</pre> | 211 | <pre·class="programlisting">bt_msg_summary·'The·installation·prefix·is·${BT_PREFIX}'</pre> |
212 | <p>Note·that·<span·class="command"><strong>bt_config</strong></span>·automatically·adds·some | 212 | <p>Note·that·<span·class="command"><strong>bt_config</strong></span>·automatically·adds·some |
213 | summary·messages·for·consistency·across·packages,·like·the·one·shown | 213 | summary·messages·for·consistency·across·packages,·like·the·one·shown |
214 | above.</p> | 214 | above.</p> |
215 | </div> | 215 | </div> |
216 | <div·class="sect2"·title="11.2.4. Check·messages"> | 216 | <div·class="sect2"·title="11.2.4. Check·messages"> |
217 | <div·class="titlepage"><div><div><h3·class="title"> | 217 | <div·class="titlepage"><div><div><h3·class="title"> |
218 | <a·name="idp6 | 218 | <a·name="idp65130808"></a>11.2.4. Check·messages</h3></div></div></div> |
219 | <p>A·check·usually·prints·a·message·when·it·starts,·like | 219 | <p>A·check·usually·prints·a·message·when·it·starts,·like |
220 | <code·class="literal">checking·for·feature·foobar...</code>,·and·a·result | 220 | <code·class="literal">checking·for·feature·foobar...</code>,·and·a·result |
221 | message·when·it·finishes.··There·are·two·functions·available·to·print | 221 | message·when·it·finishes.··There·are·two·functions·available·to·print |
222 | these·two·types·of·messages.</p> | 222 | these·two·types·of·messages.</p> |
223 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_msg_chk</strong> | 223 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_msg_chk</strong> |
224 | ··<i>message</i> | 224 | ··<i>message</i> |
225 | ··</p></div> | 225 | ··</p></div> |
Offset 238, 23 lines modified | Offset 238, 23 lines modified | ||
238 | #·All·the·stuff·needed·to·detect·the·program. | 238 | #·All·the·stuff·needed·to·detect·the·program. |
239 | #·The·$res·variable·contains·the·'yes'·or·'no'·word·depending·on·the·result. | 239 | #·The·$res·variable·contains·the·'yes'·or·'no'·word·depending·on·the·result. |
240 | bt_msg_result·"$res"</pre> | 240 | bt_msg_result·"$res"</pre> |
241 | </div> | 241 | </div> |
242 | </div> | 242 | </div> |
243 | <div·class="sect1"·title="11.3. Customizable·directories·and·features"> | 243 | <div·class="sect1"·title="11.3. Customizable·directories·and·features"> |
244 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 244 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
245 | <a·name="idp6 | 245 | <a·name="idp65140280"></a>11.3. Customizable·directories·and·features</h2></div></div></div> |
246 | <p>The·configuration·script·can·define·new·customizable·directories | 246 | <p>The·configuration·script·can·define·new·customizable·directories |
247 | and·features·to·allow·the·user·tune·the·package·behavior.··This·is | 247 | and·features·to·allow·the·user·tune·the·package·behavior.··This·is |
248 | always·done·in·the·initialization·block,·as·command·line·arguments | 248 | always·done·in·the·initialization·block,·as·command·line·arguments |
249 | recognized·by·the·<span·class="command"><strong>bt_config</strong></span>'s·frontend·will·be | 249 | recognized·by·the·<span·class="command"><strong>bt_config</strong></span>'s·frontend·will·be |
250 | extended.··Let's·analyze·them·in·detail.</p> | 250 | extended.··Let's·analyze·them·in·detail.</p> |
251 | <div·class="sect2"·title="11.3.1. Directories"> | 251 | <div·class="sect2"·title="11.3.1. Directories"> |
252 | <div·class="titlepage"><div><div><h3·class="title"> | 252 | <div·class="titlepage"><div><div><h3·class="title"> |
253 | <a·name="idp6 | 253 | <a·name="idp65142072"></a>11.3.1. Directories</h3></div></div></div> |
254 | <p>Any·directory·used·to·install·files·or·where·your·package | 254 | <p>Any·directory·used·to·install·files·or·where·your·package |
255 | expects·to·find·files·should·be·customizable·by·the·end·user.··Paths | 255 | expects·to·find·files·should·be·customizable·by·the·end·user.··Paths |
256 | <span·class="emphasis"><em>must·not·be·hardcoded</em></span>·in·your·program·(assuming | 256 | <span·class="emphasis"><em>must·not·be·hardcoded</em></span>·in·your·program·(assuming |
257 | you·do·not·have·a·very·good·reason·to·do·so),·but·instead·use | 257 | you·do·not·have·a·very·good·reason·to·do·so),·but·instead·use |
258 | variables·that·contain·the·values·selected·during·configuration·time. | 258 | variables·that·contain·the·values·selected·during·configuration·time. |
259 | You·will·usually·want·to·provide·defaults·to·these·values, | 259 | You·will·usually·want·to·provide·defaults·to·these·values, |
260 | though.</p> | 260 | though.</p> |
Offset 290, 15 lines modified | Offset 290, 15 lines modified | ||
290 | the·directory·name·omits·the·<code·class="literal">BT_DIR_</code>·string.</p> | 290 | the·directory·name·omits·the·<code·class="literal">BT_DIR_</code>·string.</p> |
291 | <p>An·example:·assume·you·need·a·directory·to·install·pixmap·files. | 291 | <p>An·example:·assume·you·need·a·directory·to·install·pixmap·files. |
292 | You·could·define·it·with·the·following·call:</p> | 292 | You·could·define·it·with·the·following·call:</p> |
293 | <pre·class="programlisting">bt_dir·PIXMAPS·'${BT_DIR_SHARE}/pixmaps'·'A·directory·holding·pixmap·files.'</pre> | 293 | <pre·class="programlisting">bt_dir·PIXMAPS·'${BT_DIR_SHARE}/pixmaps'·'A·directory·holding·pixmap·files.'</pre> |
294 | </div> | 294 | </div> |
295 | <div·class="sect2"·title="11.3.2. Features"> | 295 | <div·class="sect2"·title="11.3.2. Features"> |
296 | <div·class="titlepage"><div><div><h3·class="title"> | 296 | <div·class="titlepage"><div><div><h3·class="title"> |
297 | <a·name="idp6 | 297 | <a·name="idp65163192"></a>11.3.2. Features</h3></div></div></div> |
298 | <p>Features·allow·the·end·user·to·manually·select·build·details·and | 298 | <p>Features·allow·the·end·user·to·manually·select·build·details·and |
299 | characteristics·during·the·configuration·stage·of·a·source·package. | 299 | characteristics·during·the·configuration·stage·of·a·source·package. |
300 | These·vary·from·forcing·the·package·to·use·shared·libraries·to·include | 300 | These·vary·from·forcing·the·package·to·use·shared·libraries·to·include |
301 | optional·support·for·a·specific·dependency·(as·OpenSSL).</p> | 301 | optional·support·for·a·specific·dependency·(as·OpenSSL).</p> |
302 | <p>Feature·values·are·stored·in·shell·variables.··All·of·them·start | 302 | <p>Feature·values·are·stored·in·shell·variables.··All·of·them·start |
303 | with·the·<code·class="literal">BT_FEATURE_</code>·string·for·consistency.··The | 303 | with·the·<code·class="literal">BT_FEATURE_</code>·string·for·consistency.··The |
304 | rest·of·the·variable·name·matches·the·name·used·as·a·configuration | 304 | rest·of·the·variable·name·matches·the·name·used·as·a·configuration |
Offset 358, 15 lines modified | Offset 358, 15 lines modified | ||
358 | <pre·class="programlisting">bt_subrload·'x11'</pre> | 358 | <pre·class="programlisting">bt_subrload·'x11'</pre> |
359 | <p>See·<a·class="xref"·href="config.html#stdsubrs"·title="11.8. Standard·subroutine·modules">Section 11.8,·“Standard·subroutine·modules”</a>·for·a·description·of·all | 359 | <p>See·<a·class="xref"·href="config.html#stdsubrs"·title="11.8. Standard·subroutine·modules">Section 11.8,·“Standard·subroutine·modules”</a>·for·a·description·of·all |
360 | standard·modules·distributed·together·with·Buildtool·(excluding | 360 | standard·modules·distributed·together·with·Buildtool·(excluding |
361 | <code·class="filename">base.subr</code>).</p> | 361 | <code·class="filename">base.subr</code>).</p> |
362 | </div> | 362 | </div> |
363 | <div·class="sect1"·title="11.5. Variables·and·results"> | 363 | <div·class="sect1"·title="11.5. Variables·and·results"> |
364 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 364 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
365 | <a·name="idp6 | 365 | <a·name="idp65194936"></a>11.5. Variables·and·results</h2></div></div></div> |
366 | <p>While·the·configuration·script·is·executed,·check·results·are | 366 | <p>While·the·configuration·script·is·executed,·check·results·are |
367 | stored·in·temporary·variables.··At·the·end·of·the·script,·these·need | 367 | stored·in·temporary·variables.··At·the·end·of·the·script,·these·need |
368 | to·be·stored·on·disk·so·that·other·Buildtool·modules·can·use·them. | 368 | to·be·stored·on·disk·so·that·other·Buildtool·modules·can·use·them. |
369 | The·<span·class="command"><strong>bt_config</strong></span>·module·keeps·two·different·lists·of | 369 | The·<span·class="command"><strong>bt_config</strong></span>·module·keeps·two·different·lists·of |
370 | variables.··Output·files·are·generated·based·on·one·of·the·two·lists, | 370 | variables.··Output·files·are·generated·based·on·one·of·the·two·lists, |
371 | as·described·below:</p> | 371 | as·described·below:</p> |
372 | <div·class="variablelist"><dl> | 372 | <div·class="variablelist"><dl> |
Offset 459, 27 lines modified | Offset 459, 27 lines modified | ||
459 | <code·class="filename">src/specific.h.in</code>:</p> | 459 | <code·class="filename">src/specific.h.in</code>:</p> |
460 | <pre·class="programlisting">bt_generate_output·src/specific.h</pre> | 460 | <pre·class="programlisting">bt_generate_output·src/specific.h</pre> |
461 | <p>We·are·still·missing·how·substitution·patterns·work.··In·fact, | 461 | <p>We·are·still·missing·how·substitution·patterns·work.··In·fact, |
462 | it·is·very·simple.··A·substitution·pattern·is·a·variable·name·present | 462 | it·is·very·simple.··A·substitution·pattern·is·a·variable·name·present |
463 | in·the·substitution·list·surrounded·by·the·<code·class="literal">@</code> | 463 | in·the·substitution·list·surrounded·by·the·<code·class="literal">@</code> |
464 | character.··That·is,·if·the·variable·<code·class="varname">MYVAR</code>·is·in | 464 | character.··That·is,·if·the·variable·<code·class="varname">MYVAR</code>·is·in |
465 | the·list,·the·input·file·can·reference·its·value·using·the·magic | 465 | the·list,·the·input·file·can·reference·its·value·using·the·magic |
466 | string·<code·class="literal">@MYVAR@</code><sup>[<a·name="idp6 | 466 | string·<code·class="literal">@MYVAR@</code><sup>[<a·name="idp65216312"·href="#ftn.idp65216312"·class="footnote">9</a>]</sup>.</p> |
467 | <p>At·last,·to·add·a·variable·to·the·substitution·list·during | 467 | <p>At·last,·to·add·a·variable·to·the·substitution·list·during |
468 | configuration·time,·you·use·the·<code·class="function">bt_subst</code> | 468 | configuration·time,·you·use·the·<code·class="function">bt_subst</code> |
469 | function.··Its·syntax:</p> | 469 | function.··Its·syntax:</p> |
470 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_subst</strong> | 470 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_subst</strong> |
471 | ··<i>variables</i> | 471 | ··<i>variables</i> |
472 | ··</p></div> | 472 | ··</p></div> |
473 | <p>All·arguments·are·treated·as·independant·variables·and·are·added | 473 | <p>All·arguments·are·treated·as·independant·variables·and·are·added |
474 | to·the·substitution·list.</p> | 474 | to·the·substitution·list.</p> |
475 | </div> | 475 | </div> |
476 | <div·class="sect2"·title="11.5.2. Generating·a·C/C++·configuration·header"> | 476 | <div·class="sect2"·title="11.5.2. Generating·a·C/C++·configuration·header"> |
477 | <div·class="titlepage"><div><div><h3·class="title"> | 477 | <div·class="titlepage"><div><div><h3·class="title"> |
478 | <a·name="idp6 | 478 | <a·name="idp65220664"></a>11.5.2. Generating·a·C/C++·configuration·header</h3></div></div></div> |
479 | <p>A·configuration·header·is·a·regular·C/C++·header·file·that·is | 479 | <p>A·configuration·header·is·a·regular·C/C++·header·file·that·is |
480 | generated·during·the·configuration·stage·of·a·package·and·contains | 480 | generated·during·the·configuration·stage·of·a·package·and·contains |
481 | macro·definitions·describing·what·features·(other·headers,·functions, | 481 | macro·definitions·describing·what·features·(other·headers,·functions, |
482 | size·types,·etc.)·are·present·or·missing·in·the·current·system.··This | 482 | size·types,·etc.)·are·present·or·missing·in·the·current·system.··This |
483 | header·file·should·be·included·by·<span·class="emphasis"><em>all</em></span>·C/C++ | 483 | header·file·should·be·included·by·<span·class="emphasis"><em>all</em></span>·C/C++ |
484 | source·files·that·form·the·package,·so·all·of·them·can·benefit·from | 484 | source·files·that·form·the·package,·so·all·of·them·can·benefit·from |
485 | the·generated·header·(which·might·include·more·complex·things·for | 485 | the·generated·header·(which·might·include·more·complex·things·for |
Offset 562, 22 lines modified | Offset 562, 22 lines modified | ||
562 | <p>The·only·parameter·recognized·by·the·function·is·the·language | 562 | <p>The·only·parameter·recognized·by·the·function·is·the·language |
563 | identifier·that·has·to·be·selected.··The·C·language·is·recognized·with | 563 | identifier·that·has·to·be·selected.··The·C·language·is·recognized·with |
564 | the·<code·class="literal">c</code>·value,·while·C++·is·recognized·with·the | 564 | the·<code·class="literal">c</code>·value,·while·C++·is·recognized·with·the |
565 | <code·class="literal">cxx</code>·value.</p> | 565 | <code·class="literal">cxx</code>·value.</p> |
566 | </div> | 566 | </div> |
567 | <div·class="sect1"·title="11.7. Standard·checks"> | 567 | <div·class="sect1"·title="11.7. Standard·checks"> |
568 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 568 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
569 | <a·name="idp6 | 569 | <a·name="idp65242936"></a>11.7. Standard·checks</h2></div></div></div> |
570 | <p>Most·of·the·functions·present·in·the | 570 | <p>Most·of·the·functions·present·in·the |
571 | <code·class="filename">base.subr</code>·module,·the·standard·one,·are·used·to | 571 | <code·class="filename">base.subr</code>·module,·the·standard·one,·are·used·to |
572 | issue·automatic·checks·for·features·of·the·build·system.··A·check | 572 | issue·automatic·checks·for·features·of·the·build·system.··A·check |
573 | executes·several·commands·internally·and·sets·the·value·of·several | 573 | executes·several·commands·internally·and·sets·the·value·of·several |
574 | variables·according·to·their·results·(which·may·in·turn·be·added·to | 574 | variables·according·to·their·results·(which·may·in·turn·be·added·to |
575 | the·substituion·or·defines·lists);·as·a·function,·it·usually·returns·a | 575 | the·substituion·or·defines·lists);·as·a·function,·it·usually·returns·a |
576 | boolean·value<sup>[<a·name="idp6 | 576 | boolean·value<sup>[<a·name="idp65248440"·href="#ftn.idp65248440"·class="footnote">10</a>]</sup> |
577 | indicating·whether·the·check·was·successful·or·not.</p> | 577 | indicating·whether·the·check·was·successful·or·not.</p> |
578 | <div·class="sect2"·title="11.7.1. Checking·for·build·environments"> | 578 | <div·class="sect2"·title="11.7.1. Checking·for·build·environments"> |
579 | <div·class="titlepage"><div><div><h3·class="title"> | 579 | <div·class="titlepage"><div><div><h3·class="title"> |
580 | <a·name="envs"></a>11.7.1. Checking·for·build·environments</h3></div></div></div> | 580 | <a·name="envs"></a>11.7.1. Checking·for·build·environments</h3></div></div></div> |
581 | <p>Depending·on·the·language·you·use·to·write·your·program,·you | 581 | <p>Depending·on·the·language·you·use·to·write·your·program,·you |
582 | will·need·several·specific·tools·to·build·it.··You·can·think·that | 582 | will·need·several·specific·tools·to·build·it.··You·can·think·that |
583 | checking·for·the·compiler·or·the·interpreter·is·enough,·but·this·is | 583 | checking·for·the·compiler·or·the·interpreter·is·enough,·but·this·is |
Offset 858, 15 lines modified | Offset 858, 15 lines modified | ||
858 | want·to·be·detected.</p> | 858 | want·to·be·detected.</p> |
859 | <p>Returns·true·on·success,·false·if·the·program·cannot·be | 859 | <p>Returns·true·on·success,·false·if·the·program·cannot·be |
860 | found.</p> | 860 | found.</p> |
861 | </div> | 861 | </div> |
862 | </div> | 862 | </div> |
863 | <div·class="sect2"·title="11.7.3. Checking·for·header·files"> | 863 | <div·class="sect2"·title="11.7.3. Checking·for·header·files"> |
864 | <div·class="titlepage"><div><div><h3·class="title"> | 864 | <div·class="titlepage"><div><div><h3·class="title"> |
865 | <a·name="idp6 | 865 | <a·name="idp65350584"></a>11.7.3. Checking·for·header·files</h3></div></div></div> |
866 | <p>Header·files·are·usually·one·of·the·most·common·problems·when·it | 866 | <p>Header·files·are·usually·one·of·the·most·common·problems·when·it |
867 | comes·to·portability·issues.··They·may·be·present·on·some·systems,·but | 867 | comes·to·portability·issues.··They·may·be·present·on·some·systems,·but |
868 | missing·on·others,·or·even·have·different·names.··Therefore·you·must | 868 | missing·on·others,·or·even·have·different·names.··Therefore·you·must |
869 | check·for·the·presence·of·non-standard·headers·in·your·configuration | 869 | check·for·the·presence·of·non-standard·headers·in·your·configuration |
870 | script.··When·a·header·is·found,·a·macro·is·defined·in·the | 870 | script.··When·a·header·is·found,·a·macro·is·defined·in·the |
871 | configuration·header,·so·you·can·then·check·it·from·inside·your·C·or | 871 | configuration·header,·so·you·can·then·check·it·from·inside·your·C·or |
872 | C++·code·and·include·it·or·not.</p> | 872 | C++·code·and·include·it·or·not.</p> |
Offset 904, 28 lines modified | Offset 904, 28 lines modified | ||
904 | ··</p></div> | 904 | ··</p></div> |
905 | <p>The·<code·class="function">bt_check_hdr_std</code>·function·checks·for·a | 905 | <p>The·<code·class="function">bt_check_hdr_std</code>·function·checks·for·a |
906 | set·of·standard·C·and·C++·(depending·on·the·active·language)·required | 906 | set·of·standard·C·and·C++·(depending·on·the·active·language)·required |
907 | to·build·many·simple·programs.··These·headers·include: | 907 | to·build·many·simple·programs.··These·headers·include: |
908 | <code·class="filename">stdio.h</code>,·<code·class="filename">sys/types.h</code>, | 908 | <code·class="filename">stdio.h</code>,·<code·class="filename">sys/types.h</code>, |
909 | <code·class="filename">sys/stat.h</code>,·<code·class="filename">stdlib.h</code>, | 909 | <code·class="filename">sys/stat.h</code>,·<code·class="filename">stdlib.h</code>, |
910 | <code·class="filename">string.h</code>·and | 910 | <code·class="filename">string.h</code>·and |
911 | <code·class="filename">unistd.h</code><sup>[<a·name="idp6 | 911 | <code·class="filename">unistd.h</code><sup>[<a·name="idp65366200"·href="#ftn.idp65366200"·class="footnote">11</a>]</sup>. |
912 | All·headers·found·during·this·check·are·added·to·the | 912 | All·headers·found·during·this·check·are·added·to·the |
913 | <code·class="varname">BT_INCLUDE_FILES</code>·variable.··If·the·detection·of | 913 | <code·class="varname">BT_INCLUDE_FILES</code>·variable.··If·the·detection·of |
914 | <code·class="filename">stdio.h</code>·fails,·the·configuration·process·is | 914 | <code·class="filename">stdio.h</code>·fails,·the·configuration·process·is |
915 | aborted,·as·the·compiler·is·seriously·broken.</p> | 915 | aborted,·as·the·compiler·is·seriously·broken.</p> |
916 | <p>Before·detecting·for·other·headers·using | 916 | <p>Before·detecting·for·other·headers·using |
917 | <code·class="function">bt_check_hdr</code>,·you·should·call·this·check.··Even | 917 | <code·class="function">bt_check_hdr</code>,·you·should·call·this·check.··Even |
918 | though,·avoid·using·this·function·directly.··Instead·use·build | 918 | though,·avoid·using·this·function·directly.··Instead·use·build |
919 | environments,·see·<a·class="xref"·href="config.html#envs"·title="11.7.1. Checking·for·build·environments">Section 11.7.1,·“Checking·for·build·environments”</a>.</p> | 919 | environments,·see·<a·class="xref"·href="config.html#envs"·title="11.7.1. Checking·for·build·environments">Section 11.7.1,·“Checking·for·build·environments”</a>.</p> |
920 | </div> | 920 | </div> |
921 | </div> | 921 | </div> |
922 | <div·class="sect2"·title="11.7.4. Checking·for·system·specific·functions"> | 922 | <div·class="sect2"·title="11.7.4. Checking·for·system·specific·functions"> |
923 | <div·class="titlepage"><div><div><h3·class="title"> | 923 | <div·class="titlepage"><div><div><h3·class="title"> |
924 | <a·name="idp6 | 924 | <a·name="idp65369656"></a>11.7.4. Checking·for·system·specific·functions</h3></div></div></div> |
925 | <p>System·functions·are·another·focus·of·portability·problems. | 925 | <p>System·functions·are·another·focus·of·portability·problems. |
926 | While·many·of·them·are·standard,·they·may·not·be·present·on·ancient | 926 | While·many·of·them·are·standard,·they·may·not·be·present·on·ancient |
927 | systems;·the·ones·that·are·not·standard·should·be·emulated·by·the | 927 | systems;·the·ones·that·are·not·standard·should·be·emulated·by·the |
928 | program·itself·or·not·used·at·all·if·not·present·in·the·build | 928 | program·itself·or·not·used·at·all·if·not·present·in·the·build |
929 | system.</p> | 929 | system.</p> |
930 | <div·class="sect3"·title="11.7.4.1. Generic·functions"> | 930 | <div·class="sect3"·title="11.7.4.1. Generic·functions"> |
931 | <div·class="titlepage"><div><div><h4·class="title"> | 931 | <div·class="titlepage"><div><div><h4·class="title"> |
Offset 963, 15 lines modified | Offset 963, 15 lines modified | ||
963 | ····/*·code·that·does·not·use·vfork(2)·*/ | 963 | ····/*·code·that·does·not·use·vfork(2)·*/ |
964 | #endif | 964 | #endif |
965 | }</pre> | 965 | }</pre> |
966 | </div> | 966 | </div> |
967 | </div> | 967 | </div> |
968 | <div·class="sect2"·title="11.7.5. Checking·for·libraries"> | 968 | <div·class="sect2"·title="11.7.5. Checking·for·libraries"> |
969 | <div·class="titlepage"><div><div><h3·class="title"> | 969 | <div·class="titlepage"><div><div><h3·class="title"> |
970 | <a·name="idp6 | 970 | <a·name="idp65379000"></a>11.7.5. Checking·for·libraries</h3></div></div></div> |
971 | <p>Libraries·are·usually·used·during·the·development·of·a·program | 971 | <p>Libraries·are·usually·used·during·the·development·of·a·program |
972 | to·simplify·the·code,·or·to·use·code·developed·by·a·third·party.··You | 972 | to·simplify·the·code,·or·to·use·code·developed·by·a·third·party.··You |
973 | must·check·for·the·presence·of·the·required·libraries·during·the | 973 | must·check·for·the·presence·of·the·required·libraries·during·the |
974 | configuration·stage·of·the·package·and·notice·the·user·if·something | 974 | configuration·stage·of·the·package·and·notice·the·user·if·something |
975 | goes·wrong,·so·that·linking·does·not·fail·in·the·build·stage.</p> | 975 | goes·wrong,·so·that·linking·does·not·fail·in·the·build·stage.</p> |
976 | <div·class="sect3"·title="11.7.5.1. The·library·howto"> | 976 | <div·class="sect3"·title="11.7.5.1. The·library·howto"> |
977 | <div·class="titlepage"><div><div><h4·class="title"> | 977 | <div·class="titlepage"><div><div><h4·class="title"> |
Offset 1024, 15 lines modified | Offset 1024, 15 lines modified | ||
1024 | underscores.</p> | 1024 | underscores.</p> |
1025 | <p>Returns·true·on·success,·false·if·the·library·(or·function) | 1025 | <p>Returns·true·on·success,·false·if·the·library·(or·function) |
1026 | cannot·be·found.</p> | 1026 | cannot·be·found.</p> |
1027 | </div> | 1027 | </div> |
1028 | </div> | 1028 | </div> |
1029 | <div·class="sect2"·title="11.7.6. Miscellaneous·checks"> | 1029 | <div·class="sect2"·title="11.7.6. Miscellaneous·checks"> |
1030 | <div·class="titlepage"><div><div><h3·class="title"> | 1030 | <div·class="titlepage"><div><div><h3·class="title"> |
1031 | <a·name="idp6 | 1031 | <a·name="idp65393208"></a>11.7.6. Miscellaneous·checks</h3></div></div></div> |
1032 | <p>There·are·many·other·checks·that·do·not·fit·other·categories·but | 1032 | <p>There·are·many·other·checks·that·do·not·fit·other·categories·but |
1033 | are·very·useful·during·the·configuration·stage·of·your·package.··These | 1033 | are·very·useful·during·the·configuration·stage·of·your·package.··These |
1034 | are·described·in·this·section.</p> | 1034 | are·described·in·this·section.</p> |
1035 | <div·class="sect3"·title="11.7.6.1. Presence·of·C/C++·types"> | 1035 | <div·class="sect3"·title="11.7.6.1. Presence·of·C/C++·types"> |
1036 | <div·class="titlepage"><div><div><h4·class="title"> | 1036 | <div·class="titlepage"><div><div><h4·class="title"> |
1037 | <a·name="bt_check_type"></a>11.7.6.1. Presence·of·C/C++·types</h4></div></div></div> | 1037 | <a·name="bt_check_type"></a>11.7.6.1. Presence·of·C/C++·types</h4></div></div></div> |
1038 | <p>Some·times·you·will·need·to·know·if·a·C·or·C++·(depending·on·the | 1038 | <p>Some·times·you·will·need·to·know·if·a·C·or·C++·(depending·on·the |
Offset 1178, 15 lines modified | Offset 1178, 15 lines modified | ||
1178 | defined·with·the·results·of·the·call·and·added·to·the·substitution | 1178 | defined·with·the·results·of·the·call·and·added·to·the·substitution |
1179 | list.·<code·class="literal">parsed_name</code>·is·the·name·of·the·package·you | 1179 | list.·<code·class="literal">parsed_name</code>·is·the·name·of·the·package·you |
1180 | gave·to·the·check,·converted·to·uppercase·and·with·all·special | 1180 | gave·to·the·check,·converted·to·uppercase·and·with·all·special |
1181 | (non-alphabetical)·characters·converted·to·underscores.</p> | 1181 | (non-alphabetical)·characters·converted·to·underscores.</p> |
1182 | </div> | 1182 | </div> |
1183 | <div·class="sect2"·title="11.8.2. The·pthread·module"> | 1183 | <div·class="sect2"·title="11.8.2. The·pthread·module"> |
1184 | <div·class="titlepage"><div><div><h3·class="title"> | 1184 | <div·class="titlepage"><div><div><h3·class="title"> |
1185 | <a·name="idp65 | 1185 | <a·name="idp65485624"></a>11.8.2. The·pthread·module</h3></div></div></div> |
1186 | <p>The·<code·class="filename">pthread.subr</code>·module·provides·a | 1186 | <p>The·<code·class="filename">pthread.subr</code>·module·provides·a |
1187 | customizable·feature·and·a·check·to·detect·a·threading·library·on·the | 1187 | customizable·feature·and·a·check·to·detect·a·threading·library·on·the |
1188 | system.</p> | 1188 | system.</p> |
1189 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>pthread_feature</strong> | 1189 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>pthread_feature</strong> |
1190 | ··</p></div> | 1190 | ··</p></div> |
1191 | <p>The·<code·class="function">pthread_feature</code>·function·defines·a | 1191 | <p>The·<code·class="function">pthread_feature</code>·function·defines·a |
1192 | customizable·feature·to·allow·the·user·tune·if·threading·support·has | 1192 | customizable·feature·to·allow·the·user·tune·if·threading·support·has |
Offset 1209, 15 lines modified | Offset 1209, 15 lines modified | ||
1209 | lists·the·required·library·(if·applicable).··Both·variables·are·added | 1209 | lists·the·required·library·(if·applicable).··Both·variables·are·added |
1210 | to·the·substitution·list.</p> | 1210 | to·the·substitution·list.</p> |
1211 | <p>Returns·true·on·success,·false·if·the·library·(or·function) | 1211 | <p>Returns·true·on·success,·false·if·the·library·(or·function) |
1212 | cannot·be·found.</p> | 1212 | cannot·be·found.</p> |
1213 | </div> | 1213 | </div> |
1214 | <div·class="sect2"·title="11.8.3. The·x11·module"> | 1214 | <div·class="sect2"·title="11.8.3. The·x11·module"> |
1215 | <div·class="titlepage"><div><div><h3·class="title"> | 1215 | <div·class="titlepage"><div><div><h3·class="title"> |
1216 | <a·name="idp65 | 1216 | <a·name="idp65495224"></a>11.8.3. The·x11·module</h3></div></div></div> |
1217 | <p>The·<code·class="filename">x11.subr</code>·module·provides·a·customizable | 1217 | <p>The·<code·class="filename">x11.subr</code>·module·provides·a·customizable |
1218 | feature·and·a·some·functions·to·detect·the·presence·of·the·X·Window | 1218 | feature·and·a·some·functions·to·detect·the·presence·of·the·X·Window |
1219 | System·on·the·system.</p> | 1219 | System·on·the·system.</p> |
1220 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>x11_feature</strong> | 1220 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>x11_feature</strong> |
1221 | ··</p></div> | 1221 | ··</p></div> |
1222 | <p>The·<code·class="function">x11_feature</code>·function·defines·a | 1222 | <p>The·<code·class="function">x11_feature</code>·function·defines·a |
1223 | customizable·feature·to·allow·the·user·tune·if·X11·support·has·to·be | 1223 | customizable·feature·to·allow·the·user·tune·if·X11·support·has·to·be |
Offset 1252, 24 lines modified | Offset 1252, 24 lines modified | ||
1252 | problems.··Note·that·<code·class="function">x11_check</code>·will·automatically | 1252 | problems.··Note·that·<code·class="function">x11_check</code>·will·automatically |
1253 | call·this·function·in·several·situations,·so·make·sure·you·are·not | 1253 | call·this·function·in·several·situations,·so·make·sure·you·are·not |
1254 | duplicating·work.</p> | 1254 | duplicating·work.</p> |
1255 | </div> | 1255 | </div> |
1256 | </div> | 1256 | </div> |
1257 | <div·class="footnotes"> | 1257 | <div·class="footnotes"> |
1258 | <br><hr·width="100"·align="left"> | 1258 | <br><hr·width="100"·align="left"> |
1259 | <div·class="footnote"><p><sup>[<a·id="ftn.idp6 | 1259 | <div·class="footnote"><p><sup>[<a·id="ftn.idp65102520"·href="#idp65102520"·class="para">7</a>]·</sup>You |
1260 | must·restrict·yourself·to·portable·shell·code.</p></div> | 1260 | must·restrict·yourself·to·portable·shell·code.</p></div> |
1261 | <div·class="footnote"><p><sup>[<a·id="ftn.idp6 | 1261 | <div·class="footnote"><p><sup>[<a·id="ftn.idp65103032"·href="#idp65103032"·class="para">8</a>]·</sup>No,·we·will·not·include·a |
1262 | <span·class="command"><strong>configure</strong></span>·generator,·in·terms·of·GNU·autoconf,·as | 1262 | <span·class="command"><strong>configure</strong></span>·generator,·in·terms·of·GNU·autoconf,·as |
1263 | it·defeats·most·of·our·goals.</p></div> | 1263 | it·defeats·most·of·our·goals.</p></div> |
1264 | <div·class="footnote"><p><sup>[<a·id="ftn.idp6 | 1264 | <div·class="footnote"><p><sup>[<a·id="ftn.idp65216312"·href="#idp65216312"·class="para">9</a>]·</sup>Just·like·in·GNU |
1265 | autoconf.</p></div> | 1265 | autoconf.</p></div> |
1266 | <div·class="footnote"><p><sup>[<a·id="ftn.idp6 | 1266 | <div·class="footnote"><p><sup>[<a·id="ftn.idp65248440"·href="#idp65248440"·class="para">10</a>]·</sup>In·shell·scripting,·a·zero·means·true |
1267 | while·anything·different·(usually·one)·means·false.</p></div> | 1267 | while·anything·different·(usually·one)·means·false.</p></div> |
1268 | <div·class="footnote"><p><sup>[<a·id="ftn.idp6 | 1268 | <div·class="footnote"><p><sup>[<a·id="ftn.idp65366200"·href="#idp65366200"·class="para">11</a>]·</sup>This·list·might·be |
1269 | extended·in·future·versions,·but·never·shrinked.</p></div> | 1269 | extended·in·future·versions,·but·never·shrinked.</p></div> |
1270 | </div> | 1270 | </div> |
1271 | </div> | 1271 | </div> |
1272 | <div·class="navfooter"> | 1272 | <div·class="navfooter"> |
1273 | <hr> | 1273 | <hr> |
1274 | <table·width="100%"·summary="Navigation·footer"> | 1274 | <table·width="100%"·summary="Navigation·footer"> |
1275 | <tr> | 1275 | <tr> |
Offset 25, 31 lines modified | Offset 25, 31 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 9. The·definitions·script"> | 26 | <div·class="chapter"·title="Chapter 9. The·definitions·script"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="defs"></a>Chapter 9. The·definitions·script</h2></div></div></div> | 28 | <a·name="defs"></a>Chapter 9. The·definitions·script</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="defs.html#idp64 | 32 | <dt><span·class="sect1"><a·href="defs.html#idp64989112">9.1.·Requiring·a·Buildtool·version</a></span></dt> |
33 | <dt><span·class="sect1"><a·href="defs.html#idp64 | 33 | <dt><span·class="sect1"><a·href="defs.html#idp64992440">9.2.·Package·information</a></span></dt> |
34 | <dt><span·class="sect1"><a·href="defs.html#idp6 | 34 | <dt><span·class="sect1"><a·href="defs.html#idp65011512">9.3.·Module·flags</a></span></dt> |
35 | <dt><span·class="sect1"><a·href="defs.html#idp6 | 35 | <dt><span·class="sect1"><a·href="defs.html#idp65022392">9.4.·Example</a></span></dt> |
36 | </dl> | 36 | </dl> |
37 | </div> | 37 | </div> |
38 | <p>The·<span·class="emphasis"><em>definitions·script</em></span>·tells·Buildtool | 38 | <p>The·<span·class="emphasis"><em>definitions·script</em></span>·tells·Buildtool |
39 | several·important·and·basic·information·about·a·software·package. | 39 | several·important·and·basic·information·about·a·software·package. |
40 | This·information·is·used·in·almost·all·Buildtool·modules·to·determine | 40 | This·information·is·used·in·almost·all·Buildtool·modules·to·determine |
41 | the·package·name,·its·version,·its·license,·etc.··Therefore,·it·must | 41 | the·package·name,·its·version,·its·license,·etc.··Therefore,·it·must |
42 | exist·in·all·buildtoolized·packages.</p> | 42 | exist·in·all·buildtoolized·packages.</p> |
43 | <p>The·script·is·located·inside·the·<code·class="function">defs</code>,·to | 43 | <p>The·script·is·located·inside·the·<code·class="function">defs</code>,·to |
44 | be·placed·inside·the·<code·class="filename">Generic.bt</code>·file·(see·<a·class="xref"·href="scripts.html"·title="Chapter 8. Script·files">Chapter 8,·<i>Script·files</i></a>).··It·should·only·define·variable·values,·hence | 44 | be·placed·inside·the·<code·class="filename">Generic.bt</code>·file·(see·<a·class="xref"·href="scripts.html"·title="Chapter 8. Script·files">Chapter 8,·<i>Script·files</i></a>).··It·should·only·define·variable·values,·hence |
45 | the·name.</p> | 45 | the·name.</p> |
46 | <div·class="sect1"·title="9.1. Requiring·a·Buildtool·version"> | 46 | <div·class="sect1"·title="9.1. Requiring·a·Buildtool·version"> |
47 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 47 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
48 | <a·name="idp64 | 48 | <a·name="idp64989112"></a>9.1. Requiring·a·Buildtool·version</h2></div></div></div> |
49 | <p>When·you·develop·a·package,·you·use·a·specific·Buildtool | 49 | <p>When·you·develop·a·package,·you·use·a·specific·Buildtool |
50 | version.··End·users·may·have·a·different·(older)·version·than·you,·so | 50 | version.··End·users·may·have·a·different·(older)·version·than·you,·so |
51 | they·will·have·problems·to·compile·your·program.··Therefore,·you·must | 51 | they·will·have·problems·to·compile·your·program.··Therefore,·you·must |
52 | tell·Buildtool·which·version·you·used·when·creating·your·program,·so | 52 | tell·Buildtool·which·version·you·used·when·creating·your·program,·so |
53 | it·can·check·if·the·installed·one·is·good·enough·to·compile·the | 53 | it·can·check·if·the·installed·one·is·good·enough·to·compile·the |
54 | package.··See·<a·class="xref"·href="intro.html#versioning"·title="1.3. Versioning">Section 1.3,·“Versioning”</a>·for·more·details·on·how | 54 | package.··See·<a·class="xref"·href="intro.html#versioning"·title="1.3. Versioning">Section 1.3,·“Versioning”</a>·for·more·details·on·how |
55 | Buildtool·versions·are·handled.</p> | 55 | Buildtool·versions·are·handled.</p> |
Offset 57, 15 lines modified | Offset 57, 15 lines modified | ||
57 | task;·it·simply·contains·the·version·number·you·used·to·develop·your | 57 | task;·it·simply·contains·the·version·number·you·used·to·develop·your |
58 | program.</p> | 58 | program.</p> |
59 | <p><span·class="command"><strong>bt_lint</strong></span>·will·complain·if·you·don't·follow | 59 | <p><span·class="command"><strong>bt_lint</strong></span>·will·complain·if·you·don't·follow |
60 | these·rules.</p> | 60 | these·rules.</p> |
61 | </div> | 61 | </div> |
62 | <div·class="sect1"·title="9.2. Package·information"> | 62 | <div·class="sect1"·title="9.2. Package·information"> |
63 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 63 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
64 | <a·name="idp64 | 64 | <a·name="idp64992440"></a>9.2. Package·information</h2></div></div></div> |
65 | <p>The·following·variables·describe·the·basic·details·of·a·package. | 65 | <p>The·following·variables·describe·the·basic·details·of·a·package. |
66 | They·should·appear·in·the·same·order·as·described·here:</p> | 66 | They·should·appear·in·the·same·order·as·described·here:</p> |
67 | <div·class="variablelist"><dl> | 67 | <div·class="variablelist"><dl> |
68 | <dt><span·class="term">BT_PKG_NAME</span></dt> | 68 | <dt><span·class="term">BT_PKG_NAME</span></dt> |
69 | <dd><p>The·package·name.··Should·be·one·word,·without | 69 | <dd><p>The·package·name.··Should·be·one·word,·without |
70 | capitalization·and·without·spaces.··The·distribution·file·will·take | 70 | capitalization·and·without·spaces.··The·distribution·file·will·take |
71 | its·name·from·this·variable.··Must·be·defined.</p></dd> | 71 | its·name·from·this·variable.··Must·be·defined.</p></dd> |
Offset 95, 15 lines modified | Offset 95, 15 lines modified | ||
95 | <dd><p>Whitespace·separated·list·of·the·default·distribution | 95 | <dd><p>Whitespace·separated·list·of·the·default·distribution |
96 | files·that·the·<span·class="command"><strong>bt_dist</strong></span>·module·(see·<a·class="xref"·href="bt_dist.html"·title="Chapter 14. Creating·distribution·files">Chapter 14,·<i>Creating·distribution·files</i></a>)·will·build.··Defaults·to | 96 | files·that·the·<span·class="command"><strong>bt_dist</strong></span>·module·(see·<a·class="xref"·href="bt_dist.html"·title="Chapter 14. Creating·distribution·files">Chapter 14,·<i>Creating·distribution·files</i></a>)·will·build.··Defaults·to |
97 | <code·class="literal">tar.gz</code>.··Can·be·ommited.</p></dd> | 97 | <code·class="literal">tar.gz</code>.··Can·be·ommited.</p></dd> |
98 | </dl></div> | 98 | </dl></div> |
99 | </div> | 99 | </div> |
100 | <div·class="sect1"·title="9.3. Module·flags"> | 100 | <div·class="sect1"·title="9.3. Module·flags"> |
101 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 101 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
102 | <a·name="idp6 | 102 | <a·name="idp65011512"></a>9.3. Module·flags</h2></div></div></div> |
103 | <p>A·package·might·require·you·to·always·pass·some·extra·arguments | 103 | <p>A·package·might·require·you·to·always·pass·some·extra·arguments |
104 | to·specific·modules·to·work·(this·is·very·rare,·though).··Buildtool | 104 | to·specific·modules·to·work·(this·is·very·rare,·though).··Buildtool |
105 | can·do·this·job·for·you,·so·you·do·not·have·to·worry·about·those | 105 | can·do·this·job·for·you,·so·you·do·not·have·to·worry·about·those |
106 | specific·details.··Anyway,·be·careful·with·this·feature.··Do | 106 | specific·details.··Anyway,·be·careful·with·this·feature.··Do |
107 | <span·class="emphasis"><em>not</em></span>·use·it·if·you·do·not·have·a·good·reason·to·do | 107 | <span·class="emphasis"><em>not</em></span>·use·it·if·you·do·not·have·a·good·reason·to·do |
108 | so.</p> | 108 | so.</p> |
109 | <p>The·following·variables·are·recognized:</p> | 109 | <p>The·following·variables·are·recognized:</p> |
Offset 123, 15 lines modified | Offset 123, 15 lines modified | ||
123 | <dt><span·class="term">BT_PKG_MAKE_FLAGS</span></dt> | 123 | <dt><span·class="term">BT_PKG_MAKE_FLAGS</span></dt> |
124 | <dd><p>Extra·arguments·to·be·passed·to·the | 124 | <dd><p>Extra·arguments·to·be·passed·to·the |
125 | <span·class="command"><strong>bt_make</strong></span>·module.</p></dd> | 125 | <span·class="command"><strong>bt_make</strong></span>·module.</p></dd> |
126 | </dl></div> | 126 | </dl></div> |
127 | </div> | 127 | </div> |
128 | <div·class="sect1"·title="9.4. Example"> | 128 | <div·class="sect1"·title="9.4. Example"> |
129 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 129 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
130 | <a·name="idp6 | 130 | <a·name="idp65022392"></a>9.4. Example</h2></div></div></div> |
131 | <p>This·section·contains·an·example·of·a·definitions·script.··Please | 131 | <p>This·section·contains·an·example·of·a·definitions·script.··Please |
132 | note·how·variables·are·grouped·in·blocks;·follow·these·conventions | 132 | note·how·variables·are·grouped·in·blocks;·follow·these·conventions |
133 | when·writting·your·file.</p> | 133 | when·writting·your·file.</p> |
134 | <pre·class="programlisting">defs()·{ | 134 | <pre·class="programlisting">defs()·{ |
135 | ····#·Package·definitions | 135 | ····#·Package·definitions |
136 | ····BT_REQUIRE="0.12" | 136 | ····BT_REQUIRE="0.12" |
Offset 25, 36 lines modified | Offset 25, 36 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 7. Tutorial"> | 26 | <div·class="chapter"·title="Chapter 7. Tutorial"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="tutorial"></a>Chapter 7. Tutorial</h2></div></div></div> | 28 | <a·name="tutorial"></a>Chapter 7. Tutorial</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 32 | <dt><span·class="sect1"><a·href="devtut.html#idp64754872">7.1.·Project·skeleton</a></span></dt> |
33 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 33 | <dt><span·class="sect1"><a·href="devtut.html#idp64772024">7.2.·Package·definitions</a></span></dt> |
34 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 34 | <dt><span·class="sect1"><a·href="devtut.html#idp64775736">7.3.·The·docs·function</a></span></dt> |
35 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 35 | <dt><span·class="sect1"><a·href="devtut.html#idp64784824">7.4.·The·configuration·script</a></span></dt> |
36 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 36 | <dt><span·class="sect1"><a·href="devtut.html#idp64798264">7.5.·Top·level·logic·script</a></span></dt> |
37 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 37 | <dt><span·class="sect1"><a·href="devtut.html#idp64801848">7.6.·The·sample·library</a></span></dt> |
38 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64 | 38 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64806200">7.6.1.·The·logic·script</a></span></dt></dl></dd> |
39 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 39 | <dt><span·class="sect1"><a·href="devtut.html#idp64810168">7.7.·The·sample·program</a></span></dt> |
40 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64 | 40 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64814776">7.7.1.·The·logic·script</a></span></dt></dl></dd> |
41 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 41 | <dt><span·class="sect1"><a·href="devtut.html#idp64830648">7.8.·The·pkgflags·file</a></span></dt> |
42 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 42 | <dt><span·class="sect1"><a·href="devtut.html#idp64836792">7.9.·Finished</a></span></dt> |
43 | </dl> | 43 | </dl> |
44 | </div> | 44 | </div> |
45 | <p>This·chapter·provides·an·introductory·tutorial·for·developers. | 45 | <p>This·chapter·provides·an·introductory·tutorial·for·developers. |
46 | During·this,·we·will·create·a·very·simple·package·from·the·ground·up, | 46 | During·this,·we·will·create·a·very·simple·package·from·the·ground·up, |
47 | which·will·provide·a·library·(either·shared·or·static)·and·a·binary | 47 | which·will·provide·a·library·(either·shared·or·static)·and·a·binary |
48 | program.··You·should·be·familar·with·the·Buildtool·command·line·before | 48 | program.··You·should·be·familar·with·the·Buildtool·command·line·before |
49 | continuing;·if·you·are·not,·go·back·to·<a·class="xref"·href="pt01.html"·title="Part I. User's·documentation">Part I,·“User's·documentation”</a>·and | 49 | continuing;·if·you·are·not,·go·back·to·<a·class="xref"·href="pt01.html"·title="Part I. User's·documentation">Part I,·“User's·documentation”</a>·and |
50 | read·the·chapters·there·again.</p> | 50 | read·the·chapters·there·again.</p> |
51 | <div·class="sect1"·title="7.1. Project·skeleton"> | 51 | <div·class="sect1"·title="7.1. Project·skeleton"> |
52 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 52 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
53 | <a·name="idp64 | 53 | <a·name="idp64754872"></a>7.1. Project·skeleton</h2></div></div></div> |
54 | <p>Let's·get·started·by·creating·the·basic·directory·structure·for | 54 | <p>Let's·get·started·by·creating·the·basic·directory·structure·for |
55 | our·new·project·and·populating·it·with·the·<code·class="filename">Generic.bt</code> | 55 | our·new·project·and·populating·it·with·the·<code·class="filename">Generic.bt</code> |
56 | script·and·several·<code·class="filename">Logic.bt</code>·files·(see·<a·class="xref"·href="scripts.html"·title="Chapter 8. Script·files">Chapter 8,·<i>Script·files</i></a>).··We·could·do·this·by·hand,·but·the | 56 | script·and·several·<code·class="filename">Logic.bt</code>·files·(see·<a·class="xref"·href="scripts.html"·title="Chapter 8. Script·files">Chapter 8,·<i>Script·files</i></a>).··We·could·do·this·by·hand,·but·the |
57 | <span·class="command"><strong>bt_wizard</strong></span>·module·(see·<a·class="xref"·href="bt_wizard.html"·title="Chapter 16. The·project·wizard">Chapter 16,·<i>The·project·wizard</i></a>), | 57 | <span·class="command"><strong>bt_wizard</strong></span>·module·(see·<a·class="xref"·href="bt_wizard.html"·title="Chapter 16. The·project·wizard">Chapter 16,·<i>The·project·wizard</i></a>), |
58 | will·generate·this·basic·skeleton·for·us.··To·start·the·wizard,·enter·a | 58 | will·generate·this·basic·skeleton·for·us.··To·start·the·wizard,·enter·a |
59 | directory·were·you·will·be·storing·all·our·projects·and·then·call·the | 59 | directory·were·you·will·be·storing·all·our·projects·and·then·call·the |
60 | wizard·through·the·Buildtool's·wrapper·(see·<a·class="xref"·href="buildtool.html"·title="Chapter 2. The·buildtool·command">Chapter 2,·<i>The·buildtool·command</i></a>):</p> | 60 | wizard·through·the·Buildtool's·wrapper·(see·<a·class="xref"·href="buildtool.html"·title="Chapter 2. The·buildtool·command">Chapter 2,·<i>The·buildtool·command</i></a>):</p> |
Offset 113, 15 lines modified | Offset 113, 15 lines modified | ||
113 | pkgflags·file·for·the·library.</p></dd> | 113 | pkgflags·file·for·the·library.</p></dd> |
114 | <dt><span·class="term"><code·class="filename">data/tutorial.bpf.in</code></span></dt> | 114 | <dt><span·class="term"><code·class="filename">data/tutorial.bpf.in</code></span></dt> |
115 | <dd><p>The·pkgflags·file·for·the·library·(see·<a·class="xref"·href="bt_pkgflags.html"·title="Chapter 15. Package·flags">Chapter 15,·<i>Package·flags</i></a>).</p></dd> | 115 | <dd><p>The·pkgflags·file·for·the·library·(see·<a·class="xref"·href="bt_pkgflags.html"·title="Chapter 15. Package·flags">Chapter 15,·<i>Package·flags</i></a>).</p></dd> |
116 | </dl></div> | 116 | </dl></div> |
117 | </div> | 117 | </div> |
118 | <div·class="sect1"·title="7.2. Package·definitions"> | 118 | <div·class="sect1"·title="7.2. Package·definitions"> |
119 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 119 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
120 | <a·name="idp64 | 120 | <a·name="idp64772024"></a>7.2. Package·definitions</h2></div></div></div> |
121 | <p>The·<code·class="function">defs</code>·function·in·the | 121 | <p>The·<code·class="function">defs</code>·function·in·the |
122 | <code·class="filename">Generic.bt</code>·file·defines·(hence·the·name)·several | 122 | <code·class="filename">Generic.bt</code>·file·defines·(hence·the·name)·several |
123 | variables·that·provide·general·information·about·your·project.··This | 123 | variables·that·provide·general·information·about·your·project.··This |
124 | information·corresponds·to·the·first·block·of·questions·you·answered·while | 124 | information·corresponds·to·the·first·block·of·questions·you·answered·while |
125 | running·the·wizard.··We·will·not·touch·this·since·the·wizard·has·placed | 125 | running·the·wizard.··We·will·not·touch·this·since·the·wizard·has·placed |
126 | correct·values·in·it.··Here·is·a·copy·of·what·the·function·should·look | 126 | correct·values·in·it.··Here·is·a·copy·of·what·the·function·should·look |
127 | like:</p> | 127 | like:</p> |
Offset 137, 15 lines modified | Offset 137, 15 lines modified | ||
137 | }</pre> | 137 | }</pre> |
138 | <p>These·variables·are·self·descriptive.··If·you·have·doubts,·refer·to | 138 | <p>These·variables·are·self·descriptive.··If·you·have·doubts,·refer·to |
139 | <a·class="xref"·href="defs.html"·title="Chapter 9. The·definitions·script">Chapter 9,·<i>The·definitions·script</i></a>·which·contains·a·detailed·explanation·for·each·of | 139 | <a·class="xref"·href="defs.html"·title="Chapter 9. The·definitions·script">Chapter 9,·<i>The·definitions·script</i></a>·which·contains·a·detailed·explanation·for·each·of |
140 | them.</p> | 140 | them.</p> |
141 | </div> | 141 | </div> |
142 | <div·class="sect1"·title="7.3. The·docs·function"> | 142 | <div·class="sect1"·title="7.3. The·docs·function"> |
143 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 143 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
144 | <a·name="idp64 | 144 | <a·name="idp64775736"></a>7.3. The·docs·function</h2></div></div></div> |
145 | <p>It·is·very·important·for·a·software·package·to·provide·documentation | 145 | <p>It·is·very·important·for·a·software·package·to·provide·documentation |
146 | to·support·its·build·process·(also·known·as·<span·class="emphasis"><em>distribution | 146 | to·support·its·build·process·(also·known·as·<span·class="emphasis"><em>distribution |
147 | documentation</em></span>).··This·includes·a·file·explaining·what·the | 147 | documentation</em></span>).··This·includes·a·file·explaining·what·the |
148 | program·is,·an·outline·on·how·to·build·and·install·it,·a·list·of·changes | 148 | program·is,·an·outline·on·how·to·build·and·install·it,·a·list·of·changes |
149 | between·versions,·a·list·of·authors·and·contributors,·etc.··Please·note | 149 | between·versions,·a·list·of·authors·and·contributors,·etc.··Please·note |
150 | that·documentation·specific·to·how·to·configure·the·program,·how·it·works, | 150 | that·documentation·specific·to·how·to·configure·the·program,·how·it·works, |
151 | etc.·does·not·fit·this·category.</p> | 151 | etc.·does·not·fit·this·category.</p> |
Offset 174, 15 lines modified | Offset 174, 15 lines modified | ||
174 | empty·files·to·shut·up·their·build·infrastructure·(i.e., | 174 | empty·files·to·shut·up·their·build·infrastructure·(i.e., |
175 | <span·class="command"><strong>automake</strong></span>).··If·you·do·not·want·to·provide·them | 175 | <span·class="command"><strong>automake</strong></span>).··If·you·do·not·want·to·provide·them |
176 | (reconsider·your·decision),·then·simply·avoid·their·registration·in·the | 176 | (reconsider·your·decision),·then·simply·avoid·their·registration·in·the |
177 | menu.</p> | 177 | menu.</p> |
178 | </div> | 178 | </div> |
179 | <div·class="sect1"·title="7.4. The·configuration·script"> | 179 | <div·class="sect1"·title="7.4. The·configuration·script"> |
180 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 180 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
181 | <a·name="idp64 | 181 | <a·name="idp64784824"></a>7.4. The·configuration·script</h2></div></div></div> |
182 | <p>Each·package·you·create·needs·a·configuration·script,·even·if·you·do | 182 | <p>Each·package·you·create·needs·a·configuration·script,·even·if·you·do |
183 | not·need·to·detect·specific·system·features·yourself.··The·script,·when | 183 | not·need·to·detect·specific·system·features·yourself.··The·script,·when |
184 | executed,·will·initialize·Buildtool·for·the·project·so·that·future·calls·to | 184 | executed,·will·initialize·Buildtool·for·the·project·so·that·future·calls·to |
185 | <span·class="command"><strong>bt_logic</strong></span>·work.</p> | 185 | <span·class="command"><strong>bt_logic</strong></span>·work.</p> |
186 | <p>The·configuration·script·generated·by·the·wizard·is·included·in·the | 186 | <p>The·configuration·script·generated·by·the·wizard·is·included·in·the |
187 | <code·class="function">config</code>·function·of·the·<code·class="filename">Generic.bt</code> | 187 | <code·class="function">config</code>·function·of·the·<code·class="filename">Generic.bt</code> |
188 | file.··If·you·check·the·file·now,·you·will·see·that·it·does·almost | 188 | file.··If·you·check·the·file·now,·you·will·see·that·it·does·almost |
Offset 209, 15 lines modified | Offset 209, 15 lines modified | ||
209 | ····bt_generate_configh | 209 | ····bt_generate_configh |
210 | }</pre> | 210 | }</pre> |
211 | <p>Note·that·you·can·safely·remove·the·<code·class="function">config_init</code> | 211 | <p>Note·that·you·can·safely·remove·the·<code·class="function">config_init</code> |
212 | function·from·the·script,·since·we·will·not·be·using·it.</p> | 212 | function·from·the·script,·since·we·will·not·be·using·it.</p> |
213 | </div> | 213 | </div> |
214 | <div·class="sect1"·title="7.5. Top·level·logic·script"> | 214 | <div·class="sect1"·title="7.5. Top·level·logic·script"> |
215 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 215 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
216 | <a·name="idp64 | 216 | <a·name="idp64798264"></a>7.5. Top·level·logic·script</h2></div></div></div> |
217 | <p>We·have·got·three·directories·so·far·in·our·project,·which·will | 217 | <p>We·have·got·three·directories·so·far·in·our·project,·which·will |
218 | contain·source·files.··This·means·that·they·will·need·to·take·some·actions | 218 | contain·source·files.··This·means·that·they·will·need·to·take·some·actions |
219 | during·the·build·and·install·stages·(between·others).··We·have·two | 219 | during·the·build·and·install·stages·(between·others).··We·have·two |
220 | alternatives·to·handle·this·situation:·we·can·let·the·top·level·logic | 220 | alternatives·to·handle·this·situation:·we·can·let·the·top·level·logic |
221 | script·build·everything·directly·or·have·a·logic·script·inside·each | 221 | script·build·everything·directly·or·have·a·logic·script·inside·each |
222 | directory.··In·this·tutorial,·we·opt·for·the·second·choice,·as·it·is | 222 | directory.··In·this·tutorial,·we·opt·for·the·second·choice,·as·it·is |
223 | clearer.</p> | 223 | clearer.</p> |
Offset 228, 15 lines modified | Offset 228, 15 lines modified | ||
228 | <pre·class="programlisting">logic()·{ | 228 | <pre·class="programlisting">logic()·{ |
229 | ····bt_target·lib·data·src | 229 | ····bt_target·lib·data·src |
230 | }</pre> | 230 | }</pre> |
231 | <p>See·<a·class="xref"·href="logic.html"·title="Chapter 12. Logic·scripts">Chapter 12,·<i>Logic·scripts</i></a>·for·more·information.</p> | 231 | <p>See·<a·class="xref"·href="logic.html"·title="Chapter 12. Logic·scripts">Chapter 12,·<i>Logic·scripts</i></a>·for·more·information.</p> |
232 | </div> | 232 | </div> |
233 | <div·class="sect1"·title="7.6. The·sample·library"> | 233 | <div·class="sect1"·title="7.6. The·sample·library"> |
234 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 234 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
235 | <a·name="idp64 | 235 | <a·name="idp64801848"></a>7.6. The·sample·library</h2></div></div></div> |
236 | <p>We·will·now·write·the·code·for·our·sample·library;·the·function·shown | 236 | <p>We·will·now·write·the·code·for·our·sample·library;·the·function·shown |
237 | below·is·useless,·but·is·enough·to·demostrate·how·to·do·things.··It·will | 237 | below·is·useless,·but·is·enough·to·demostrate·how·to·do·things.··It·will |
238 | be·stored·into·the·<code·class="filename">lib/aux.c</code>·file.··Our·code·will·make | 238 | be·stored·into·the·<code·class="filename">lib/aux.c</code>·file.··Our·code·will·make |
239 | use·of·the·<code·class="function">basename</code>·function·we·previously | 239 | use·of·the·<code·class="function">basename</code>·function·we·previously |
240 | detected.</p> | 240 | detected.</p> |
241 | <pre·class="programlisting">#include·<bt_config.h> | 241 | <pre·class="programlisting">#include·<bt_config.h> |
Offset 265, 15 lines modified | Offset 265, 15 lines modified | ||
265 | #define·AUX_H | 265 | #define·AUX_H |
266 | int·set_filename(const·char·*); | 266 | int·set_filename(const·char·*); |
267 | #endif·/*·AUX_H·*/</pre> | 267 | #endif·/*·AUX_H·*/</pre> |
268 | <div·class="sect2"·title="7.6.1. The·logic·script"> | 268 | <div·class="sect2"·title="7.6.1. The·logic·script"> |
269 | <div·class="titlepage"><div><div><h3·class="title"> | 269 | <div·class="titlepage"><div><div><h3·class="title"> |
270 | <a·name="idp64 | 270 | <a·name="idp64806200"></a>7.6.1. The·logic·script</h3></div></div></div> |
271 | <p>With·the·library·code·in·place,·we·have·to·write·the·logic·script | 271 | <p>With·the·library·code·in·place,·we·have·to·write·the·logic·script |
272 | that·will·build·and·install·it;·it·will·be·stored·in | 272 | that·will·build·and·install·it;·it·will·be·stored·in |
273 | <code·class="filename">lib/Logic.bt</code>.··The·script·will·define·a·single·target, | 273 | <code·class="filename">lib/Logic.bt</code>.··The·script·will·define·a·single·target, |
274 | using·the·<code·class="literal">library</code>·type·(see·<a·class="xref"·href="logic.html#logic_library"·title="12.7.2. The·library·type">Section 12.7.2,·“The·library·type”</a>)·to·attach·the·proper·stages·to·it.··This·will | 274 | using·the·<code·class="literal">library</code>·type·(see·<a·class="xref"·href="logic.html#logic_library"·title="12.7.2. The·library·type">Section 12.7.2,·“The·library·type”</a>)·to·attach·the·proper·stages·to·it.··This·will |
275 | take·care·to·build·shared·or·static·libraries·(or·both)·depending·on·what | 275 | take·care·to·build·shared·or·static·libraries·(or·both)·depending·on·what |
276 | Buildtool·found·at·configuration·time.</p> | 276 | Buildtool·found·at·configuration·time.</p> |
277 | <p>Our·target·defines·the·library·version,·the·list·of·sources·that·need | 277 | <p>Our·target·defines·the·library·version,·the·list·of·sources·that·need |
Offset 302, 15 lines modified | Offset 302, 15 lines modified | ||
302 | ········BT_INCLUDESDIR=${BT_DIR_INCLUDE}/auxlib | 302 | ········BT_INCLUDESDIR=${BT_DIR_INCLUDE}/auxlib |
303 | ····} | 303 | ····} |
304 | }</pre> | 304 | }</pre> |
305 | </div> | 305 | </div> |
306 | </div> | 306 | </div> |
307 | <div·class="sect1"·title="7.7. The·sample·program"> | 307 | <div·class="sect1"·title="7.7. The·sample·program"> |
308 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 308 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
309 | <a·name="idp64 | 309 | <a·name="idp64810168"></a>7.7. The·sample·program</h2></div></div></div> |
310 | <p>Our·sample·program·will·simply·call·the | 310 | <p>Our·sample·program·will·simply·call·the |
311 | <code·class="function">set_filename</code>·function·defined·by·our·sample·library, | 311 | <code·class="function">set_filename</code>·function·defined·by·our·sample·library, |
312 | use·a·boolean·value·and·print·an·error·if·the·function·returns·false;·as | 312 | use·a·boolean·value·and·print·an·error·if·the·function·returns·false;·as |
313 | we·saw·above,·this·will·only·happen·if·the·<code·class="function">basename</code> | 313 | we·saw·above,·this·will·only·happen·if·the·<code·class="function">basename</code> |
314 | function·does·not·exist·in·the·host·system·(detected·during·the | 314 | function·does·not·exist·in·the·host·system·(detected·during·the |
315 | configuration·stage).··The·code·to·do·this·is·trivial,·as·seen·below. | 315 | configuration·stage).··The·code·to·do·this·is·trivial,·as·seen·below. |
316 | We·will·store·it·as·<code·class="filename">src/main.c</code>:</p> | 316 | We·will·store·it·as·<code·class="filename">src/main.c</code>:</p> |
Offset 345, 15 lines modified | Offset 345, 15 lines modified | ||
345 | }</pre> | 345 | }</pre> |
346 | <p>To·make·the·example·more·complete,·we·will·provide·a·manual·page·for | 346 | <p>To·make·the·example·more·complete,·we·will·provide·a·manual·page·for |
347 | our·program.··Since·writting·it·is·out·of·the·scope·of·the·tutorial,·we | 347 | our·program.··Since·writting·it·is·out·of·the·scope·of·the·tutorial,·we |
348 | simply·create·an·empty·file·for·it:</p> | 348 | simply·create·an·empty·file·for·it:</p> |
349 | <pre·class="screen"><code·class="prompt">~/projects/tutorial$</code>·touch·src/myprog.1</pre> | 349 | <pre·class="screen"><code·class="prompt">~/projects/tutorial$</code>·touch·src/myprog.1</pre> |
350 | <div·class="sect2"·title="7.7.1. The·logic·script"> | 350 | <div·class="sect2"·title="7.7.1. The·logic·script"> |
351 | <div·class="titlepage"><div><div><h3·class="title"> | 351 | <div·class="titlepage"><div><div><h3·class="title"> |
352 | <a·name="idp64 | 352 | <a·name="idp64814776"></a>7.7.1. The·logic·script</h3></div></div></div> |
353 | <p>With·the·program·code·in·place,·we·have·to·write·the·logic·script | 353 | <p>With·the·program·code·in·place,·we·have·to·write·the·logic·script |
354 | that·will·build·and·install·it;·it·will·be·stored·in | 354 | that·will·build·and·install·it;·it·will·be·stored·in |
355 | <code·class="filename">src/Logic.bt</code>.··The·script·will·define·a·single·target, | 355 | <code·class="filename">src/Logic.bt</code>.··The·script·will·define·a·single·target, |
356 | using·the·<code·class="literal">program</code>·type·(see·<a·class="xref"·href="logic.html#logic_program"·title="12.7.1. The·program·type">Section 12.7.1,·“The·program·type”</a>)·to·attach·the·proper·stages·to·it.</p> | 356 | using·the·<code·class="literal">program</code>·type·(see·<a·class="xref"·href="logic.html#logic_program"·title="12.7.1. The·program·type">Section 12.7.1,·“The·program·type”</a>)·to·attach·the·proper·stages·to·it.</p> |
357 | <pre·class="programlisting">logic()·{ | 357 | <pre·class="programlisting">logic()·{ |
358 | ····bt_target·myprog | 358 | ····bt_target·myprog |
Offset 369, 15 lines modified | Offset 369, 15 lines modified | ||
369 | ········BT_LIBS+=-lauxlib | 369 | ········BT_LIBS+=-lauxlib |
370 | ····} | 370 | ····} |
371 | }</pre> | 371 | }</pre> |
372 | </div> | 372 | </div> |
373 | </div> | 373 | </div> |
374 | <div·class="sect1"·title="7.8. The·pkgflags·file"> | 374 | <div·class="sect1"·title="7.8. The·pkgflags·file"> |
375 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 375 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
376 | <a·name="idp64 | 376 | <a·name="idp64830648"></a>7.8. The·pkgflags·file</h2></div></div></div> |
377 | <p>Whenever·you·create·a·library·that·will·be·installed·on·the·system, | 377 | <p>Whenever·you·create·a·library·that·will·be·installed·on·the·system, |
378 | you·should·also·provide·a·pkgflags·file·so·that·linking·to·it·is·easy·and | 378 | you·should·also·provide·a·pkgflags·file·so·that·linking·to·it·is·easy·and |
379 | painless·for·other·developers·(they·will·only·need·a·call·to | 379 | painless·for·other·developers·(they·will·only·need·a·call·to |
380 | <code·class="function">bt_check_pkgflags</code>·from·their·configuration·script;·see | 380 | <code·class="function">bt_check_pkgflags</code>·from·their·configuration·script;·see |
381 | <a·class="xref"·href="config.html#bt_check_pkgflags"·title="11.7.6.4. Package·flags">Section 11.7.6.4,·“Package·flags”</a>).··The·wizard·is·aware·of·this,·so·it | 381 | <a·class="xref"·href="config.html#bt_check_pkgflags"·title="11.7.6.4. Package·flags">Section 11.7.6.4,·“Package·flags”</a>).··The·wizard·is·aware·of·this,·so·it |
382 | will·create·a·sample·pkgflags·file·for·you,·together·with·a·ready·to·use | 382 | will·create·a·sample·pkgflags·file·for·you,·together·with·a·ready·to·use |
383 | logic·file.··Both·of·these·are·located·in·the·<code·class="filename">data</code> | 383 | logic·file.··Both·of·these·are·located·in·the·<code·class="filename">data</code> |
Offset 399, 15 lines modified | Offset 399, 15 lines modified | ||
399 | bpf_libs="-L${BT_DIR_LIB}·-lauxlib" | 399 | bpf_libs="-L${BT_DIR_LIB}·-lauxlib" |
400 | bpf_cflags="-I${BT_DIR_INCLUDE}/aux"</pre> | 400 | bpf_cflags="-I${BT_DIR_INCLUDE}/aux"</pre> |
401 | <p>For·more·information·about·the·variables·defined·in·this·file,·see | 401 | <p>For·more·information·about·the·variables·defined·in·this·file,·see |
402 | <a·class="xref"·href="bt_pkgflags.html#pkgflags"·title="15.2. Pkgflags·file·format">Section 15.2,·“Pkgflags·file·format”</a>.</p> | 402 | <a·class="xref"·href="bt_pkgflags.html#pkgflags"·title="15.2. Pkgflags·file·format">Section 15.2,·“Pkgflags·file·format”</a>.</p> |
403 | </div> | 403 | </div> |
404 | <div·class="sect1"·title="7.9. Finished"> | 404 | <div·class="sect1"·title="7.9. Finished"> |
405 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 405 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
406 | <a·name="idp64 | 406 | <a·name="idp64836792"></a>7.9. Finished</h2></div></div></div> |
407 | <p>We·are·done!··If·everything·went·fine,·you·should·be·able·to·read | 407 | <p>We·are·done!··If·everything·went·fine,·you·should·be·able·to·read |
408 | documentation·about·your·package,·configure,·build,·install,·deinstall·and | 408 | documentation·about·your·package,·configure,·build,·install,·deinstall·and |
409 | clean·it·without·problems.··Now·keep·reading·all·other·chapters·addressed | 409 | clean·it·without·problems.··Now·keep·reading·all·other·chapters·addressed |
410 | to·the·developer.</p> | 410 | to·the·developer.</p> |
411 | </div> | 411 | </div> |
412 | </div> | 412 | </div> |
413 | <div·class="navfooter"> | 413 | <div·class="navfooter"> |
Offset 24, 15 lines modified | Offset 24, 15 lines modified | ||
24 | <hr> | 24 | <hr> |
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 10. The·documentation·script"> | 26 | <div·class="chapter"·title="Chapter 10. The·documentation·script"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="docs"></a>Chapter 10. The·documentation·script</h2></div></div></div> | 28 | <a·name="docs"></a>Chapter 10. The·documentation·script</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl><dt><span·class="sect1"><a·href="docs.html#idp6 | 31 | <dl><dt><span·class="sect1"><a·href="docs.html#idp65081016">10.1.·Example</a></span></dt></dl> |
32 | </div> | 32 | </div> |
33 | <p>The·<span·class="emphasis"><em>documentation·script</em></span>·tells·the | 33 | <p>The·<span·class="emphasis"><em>documentation·script</em></span>·tells·the |
34 | <span·class="command"><strong>bt_doc</strong></span>·module·(see·<a·class="xref"·href="bt_doc.html"·title="Chapter 3. Build·time·documentation">Chapter 3,·<i>Build·time·documentation</i></a>)·which | 34 | <span·class="command"><strong>bt_doc</strong></span>·module·(see·<a·class="xref"·href="bt_doc.html"·title="Chapter 3. Build·time·documentation">Chapter 3,·<i>Build·time·documentation</i></a>)·which |
35 | documents·can·be·read·before·building·the·package.··These·are·often | 35 | documents·can·be·read·before·building·the·package.··These·are·often |
36 | used·to·tell·the·user·specific·details·about·the·build·process,·the | 36 | used·to·tell·the·user·specific·details·about·the·build·process,·the |
37 | package·license·or·some·other·additional·information.</p> | 37 | package·license·or·some·other·additional·information.</p> |
38 | <p>The·script·is·located·inside·the·<code·class="function">docs</code> | 38 | <p>The·script·is·located·inside·the·<code·class="function">docs</code> |
Offset 45, 15 lines modified | Offset 45, 15 lines modified | ||
45 | ··<i>description</i> | 45 | ··<i>description</i> |
46 | ··</p></div> | 46 | ··</p></div> |
47 | <p>The·first·argument·specifies·the·document·file·name,·relative·to | 47 | <p>The·first·argument·specifies·the·document·file·name,·relative·to |
48 | the·project's·top·directory.··The·second·argument·is·a·short·sentence | 48 | the·project's·top·directory.··The·second·argument·is·a·short·sentence |
49 | indicating·what·the·document·contents·are.</p> | 49 | indicating·what·the·document·contents·are.</p> |
50 | <div·class="sect1"·title="10.1. Example"> | 50 | <div·class="sect1"·title="10.1. Example"> |
51 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 51 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
52 | <a·name="idp6 | 52 | <a·name="idp65081016"></a>10.1. Example</h2></div></div></div> |
53 | <p>This·section·contains·an·example·of·a·documentation·script:</p> | 53 | <p>This·section·contains·an·example·of·a·documentation·script:</p> |
54 | <pre·class="programlisting">docs()·{ | 54 | <pre·class="programlisting">docs()·{ |
55 | ····bt_doc·"CHANGES"·"Major·changes·between·package·versions" | 55 | ····bt_doc·"CHANGES"·"Major·changes·between·package·versions" |
56 | ····bt_doc·"PEOPLE"·"Authors·and·contributors" | 56 | ····bt_doc·"PEOPLE"·"Authors·and·contributors" |
57 | ····bt_doc·"README"·"General·documentation" | 57 | ····bt_doc·"README"·"General·documentation" |
58 | ····bt_doc·"TODO"·"Missing·things" | 58 | ····bt_doc·"TODO"·"Missing·things" |
59 | }</pre> | 59 | }</pre> |
Offset 21, 15 lines modified | Offset 21, 15 lines modified | ||
21 | </table> | 21 | </table> |
22 | <hr> | 22 | <hr> |
23 | </div> | 23 | </div> |
24 | <div·class="book"·title="Buildtool's·Manual"> | 24 | <div·class="book"·title="Buildtool's·Manual"> |
25 | <div·class="titlepage"> | 25 | <div·class="titlepage"> |
26 | <div> | 26 | <div> |
27 | <div><h1·class="title"> | 27 | <div><h1·class="title"> |
28 | <a·name="idp63 | 28 | <a·name="idp63721912"></a>Buildtool's·Manual</h1></div> |
29 | <div><div·class="authorgroup"><div·class="author"> | 29 | <div><div·class="authorgroup"><div·class="author"> |
30 | <h3·class="author"> | 30 | <h3·class="author"> |
31 | <span·class="firstname">Julio·M.</span>·<span·class="surname">Merino·Vidal</span> | 31 | <span·class="firstname">Julio·M.</span>·<span·class="surname">Merino·Vidal</span> |
32 | </h3> | 32 | </h3> |
33 | <div·class="affiliation"><div·class="address"><p><code·class="email"><<a·class="email"·href="mailto:jmmv@users.sourceforge.net">jmmv@users.sourceforge.net</a>></code></p></div></div> | 33 | <div·class="affiliation"><div·class="address"><p><code·class="email"><<a·class="email"·href="mailto:jmmv@users.sourceforge.net">jmmv@users.sourceforge.net</a>></code></p></div></div> |
34 | </div></div></div> | 34 | </div></div></div> |
35 | <div><p·class="releaseinfo">This·book·corresponds·to·Buildtool·version·0.16.</p></div> | 35 | <div><p·class="releaseinfo">This·book·corresponds·to·Buildtool·version·0.16.</p></div> |
Offset 55, 136 lines modified | Offset 55, 136 lines modified | ||
55 | <dt><span·class="sect1"><a·href="intro.html#modules">1.2.·Modules</a></span></dt> | 55 | <dt><span·class="sect1"><a·href="intro.html#modules">1.2.·Modules</a></span></dt> |
56 | <dt><span·class="sect1"><a·href="intro.html#versioning">1.3.·Versioning</a></span></dt> | 56 | <dt><span·class="sect1"><a·href="intro.html#versioning">1.3.·Versioning</a></span></dt> |
57 | </dl></dd> | 57 | </dl></dd> |
58 | <dt><span·class="part"><a·href="pt01.html">I.·User's·documentation</a></span></dt> | 58 | <dt><span·class="part"><a·href="pt01.html">I.·User's·documentation</a></span></dt> |
59 | <dd><dl> | 59 | <dd><dl> |
60 | <dt><span·class="chapter"><a·href="buildtool.html">2.·The·buildtool·command</a></span></dt> | 60 | <dt><span·class="chapter"><a·href="buildtool.html">2.·The·buildtool·command</a></span></dt> |
61 | <dd><dl> | 61 | <dd><dl> |
62 | <dt><span·class="sect1"><a·href="buildtool.html#idp63 | 62 | <dt><span·class="sect1"><a·href="buildtool.html#idp63860536">2.1.·Command·syntax</a></span></dt> |
63 | <dt><span·class="sect1"><a·href="buildtool.html#siteinfo">2.2.·Site·information</a></span></dt> | 63 | <dt><span·class="sect1"><a·href="buildtool.html#siteinfo">2.2.·Site·information</a></span></dt> |
64 | <dt><span·class="sect1"><a·href="buildtool.html#idp63 | 64 | <dt><span·class="sect1"><a·href="buildtool.html#idp63933368">2.3.·Examples</a></span></dt> |
65 | </dl></dd> | 65 | </dl></dd> |
66 | <dt><span·class="chapter"><a·href="bt_doc.html">3.·Build·time·documentation</a></span></dt> | 66 | <dt><span·class="chapter"><a·href="bt_doc.html">3.·Build·time·documentation</a></span></dt> |
67 | <dt><span·class="chapter"><a·href="bt_config.html">4.·Automatic·package·configuration</a></span></dt> | 67 | <dt><span·class="chapter"><a·href="bt_config.html">4.·Automatic·package·configuration</a></span></dt> |
68 | <dd><dl> | 68 | <dd><dl> |
69 | <dt><span·class="sect1"><a·href="bt_config.html#idp6 | 69 | <dt><span·class="sect1"><a·href="bt_config.html#idp64041144">4.1.·The·bt_config·module</a></span></dt> |
70 | <dd><dl> | 70 | <dd><dl> |
71 | <dt><span·class="sect2"><a·href="bt_config.html#stddir">4.1.1.·Standard·directories</a></span></dt> | 71 | <dt><span·class="sect2"><a·href="bt_config.html#stddir">4.1.1.·Standard·directories</a></span></dt> |
72 | <dt><span·class="sect2"><a·href="bt_config.html#stdfeat">4.1.2.·Standard·features</a></span></dt> | 72 | <dt><span·class="sect2"><a·href="bt_config.html#stdfeat">4.1.2.·Standard·features</a></span></dt> |
73 | </dl></dd> | 73 | </dl></dd> |
74 | <dt><span·class="sect1"><a·href="bt_config.html#idp6 | 74 | <dt><span·class="sect1"><a·href="bt_config.html#idp64160312">4.2.·Examples</a></span></dt> |
75 | </dl></dd> | 75 | </dl></dd> |
76 | <dt><span·class="chapter"><a·href="bt_logic.html">5.·Building·targets</a></span></dt> | 76 | <dt><span·class="chapter"><a·href="bt_logic.html">5.·Building·targets</a></span></dt> |
77 | <dd><dl> | 77 | <dd><dl> |
78 | <dt><span·class="sect1"><a·href="bt_logic.html#idp6 | 78 | <dt><span·class="sect1"><a·href="bt_logic.html#idp64317240">5.1.·The·bt_logic·module</a></span></dt> |
79 | <dt><span·class="sect1"><a·href="bt_logic.html#idp6 | 79 | <dt><span·class="sect1"><a·href="bt_logic.html#idp64414392">5.2.·Examples</a></span></dt> |
80 | </dl></dd> | 80 | </dl></dd> |
81 | <dt><span·class="chapter"><a·href="bt_swcgen.html">6.·System·wide·configuration</a></span></dt> | 81 | <dt><span·class="chapter"><a·href="bt_swcgen.html">6.·System·wide·configuration</a></span></dt> |
82 | <dd><dl> | 82 | <dd><dl> |
83 | <dt><span·class="sect1"><a·href="bt_swcgen.html#idp64 | 83 | <dt><span·class="sect1"><a·href="bt_swcgen.html#idp64518968">6.1.·The·bt_swcgen·module</a></span></dt> |
84 | <dd><dl> | 84 | <dd><dl> |
85 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64 | 85 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64561336">6.1.1.·Input·file·structure</a></span></dt> |
86 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64 | 86 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64565816">6.1.2.·Available·functions</a></span></dt> |
87 | </dl></dd> | 87 | </dl></dd> |
88 | </dl></dd> | 88 | </dl></dd> |
89 | </dl></dd> | 89 | </dl></dd> |
90 | <dt><span·class="part"><a·href="pt02.html">II.·Developer's·documentation</a></span></dt> | 90 | <dt><span·class="part"><a·href="pt02.html">II.·Developer's·documentation</a></span></dt> |
91 | <dd><dl> | 91 | <dd><dl> |
92 | <dt><span·class="chapter"><a·href="devtut.html">7.·Tutorial</a></span></dt> | 92 | <dt><span·class="chapter"><a·href="devtut.html">7.·Tutorial</a></span></dt> |
93 | <dd><dl> | 93 | <dd><dl> |
94 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 94 | <dt><span·class="sect1"><a·href="devtut.html#idp64754872">7.1.·Project·skeleton</a></span></dt> |
95 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 95 | <dt><span·class="sect1"><a·href="devtut.html#idp64772024">7.2.·Package·definitions</a></span></dt> |
96 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 96 | <dt><span·class="sect1"><a·href="devtut.html#idp64775736">7.3.·The·docs·function</a></span></dt> |
97 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 97 | <dt><span·class="sect1"><a·href="devtut.html#idp64784824">7.4.·The·configuration·script</a></span></dt> |
98 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 98 | <dt><span·class="sect1"><a·href="devtut.html#idp64798264">7.5.·Top·level·logic·script</a></span></dt> |
99 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 99 | <dt><span·class="sect1"><a·href="devtut.html#idp64801848">7.6.·The·sample·library</a></span></dt> |
100 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64 | 100 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64806200">7.6.1.·The·logic·script</a></span></dt></dl></dd> |
101 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 101 | <dt><span·class="sect1"><a·href="devtut.html#idp64810168">7.7.·The·sample·program</a></span></dt> |
102 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64 | 102 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64814776">7.7.1.·The·logic·script</a></span></dt></dl></dd> |
103 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 103 | <dt><span·class="sect1"><a·href="devtut.html#idp64830648">7.8.·The·pkgflags·file</a></span></dt> |
104 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 104 | <dt><span·class="sect1"><a·href="devtut.html#idp64836792">7.9.·Finished</a></span></dt> |
105 | </dl></dd> | 105 | </dl></dd> |
106 | <dt><span·class="chapter"><a·href="scripts.html">8.·Script·files</a></span></dt> | 106 | <dt><span·class="chapter"><a·href="scripts.html">8.·Script·files</a></span></dt> |
107 | <dt><span·class="chapter"><a·href="defs.html">9.·The·definitions·script</a></span></dt> | 107 | <dt><span·class="chapter"><a·href="defs.html">9.·The·definitions·script</a></span></dt> |
108 | <dd><dl> | 108 | <dd><dl> |
109 | <dt><span·class="sect1"><a·href="defs.html#idp64 | 109 | <dt><span·class="sect1"><a·href="defs.html#idp64989112">9.1.·Requiring·a·Buildtool·version</a></span></dt> |
110 | <dt><span·class="sect1"><a·href="defs.html#idp64 | 110 | <dt><span·class="sect1"><a·href="defs.html#idp64992440">9.2.·Package·information</a></span></dt> |
111 | <dt><span·class="sect1"><a·href="defs.html#idp6 | 111 | <dt><span·class="sect1"><a·href="defs.html#idp65011512">9.3.·Module·flags</a></span></dt> |
112 | <dt><span·class="sect1"><a·href="defs.html#idp6 | 112 | <dt><span·class="sect1"><a·href="defs.html#idp65022392">9.4.·Example</a></span></dt> |
113 | </dl></dd> | 113 | </dl></dd> |
114 | <dt><span·class="chapter"><a·href="docs.html">10.·The·documentation·script</a></span></dt> | 114 | <dt><span·class="chapter"><a·href="docs.html">10.·The·documentation·script</a></span></dt> |
115 | <dd><dl><dt><span·class="sect1"><a·href="docs.html#idp6 | 115 | <dd><dl><dt><span·class="sect1"><a·href="docs.html#idp65081016">10.1.·Example</a></span></dt></dl></dd> |
116 | <dt><span·class="chapter"><a·href="config.html">11.·The·configuration·script</a></span></dt> | 116 | <dt><span·class="chapter"><a·href="config.html">11.·The·configuration·script</a></span></dt> |
117 | <dd><dl> | 117 | <dd><dl> |
118 | <dt><span·class="sect1"><a·href="config.html#idp6 | 118 | <dt><span·class="sect1"><a·href="config.html#idp65100984">11.1.·Script·structure</a></span></dt> |
119 | <dt><span·class="sect1"><a·href="config.html#idp6 | 119 | <dt><span·class="sect1"><a·href="config.html#idp65110072">11.2.·Printing·messages</a></span></dt> |
120 | <dd><dl> | 120 | <dd><dl> |
121 | <dt><span·class="sect2"><a·href="config.html#idp6 | 121 | <dt><span·class="sect2"><a·href="config.html#idp65112376">11.2.1.·Error·messages</a></span></dt> |
122 | <dt><span·class="sect2"><a·href="config.html#idp6 | 122 | <dt><span·class="sect2"><a·href="config.html#idp65118520">11.2.2.·Warning·messages</a></span></dt> |
123 | <dt><span·class="sect2"><a·href="config.html#idp6 | 123 | <dt><span·class="sect2"><a·href="config.html#idp65124664">11.2.3.·Summary·messages</a></span></dt> |
124 | <dt><span·class="sect2"><a·href="config.html#idp6 | 124 | <dt><span·class="sect2"><a·href="config.html#idp65130808">11.2.4.·Check·messages</a></span></dt> |
125 | </dl></dd> | 125 | </dl></dd> |
126 | <dt><span·class="sect1"><a·href="config.html#idp6 | 126 | <dt><span·class="sect1"><a·href="config.html#idp65140280">11.3.·Customizable·directories·and·features</a></span></dt> |
127 | <dd><dl> | 127 | <dd><dl> |
128 | <dt><span·class="sect2"><a·href="config.html#idp6 | 128 | <dt><span·class="sect2"><a·href="config.html#idp65142072">11.3.1.·Directories</a></span></dt> |
129 | <dt><span·class="sect2"><a·href="config.html#idp6 | 129 | <dt><span·class="sect2"><a·href="config.html#idp65163192">11.3.2.·Features</a></span></dt> |
130 | </dl></dd> | 130 | </dl></dd> |
131 | <dt><span·class="sect1"><a·href="config.html#subrload">11.4.·Loading·subroutine·modules</a></span></dt> | 131 | <dt><span·class="sect1"><a·href="config.html#subrload">11.4.·Loading·subroutine·modules</a></span></dt> |
132 | <dt><span·class="sect1"><a·href="config.html#idp6 | 132 | <dt><span·class="sect1"><a·href="config.html#idp65194936">11.5.·Variables·and·results</a></span></dt> |
133 | <dd><dl> | 133 | <dd><dl> |
134 | <dt><span·class="sect2"><a·href="config.html#bt_generate_output">11.5.1.·Generating·output·files</a></span></dt> | 134 | <dt><span·class="sect2"><a·href="config.html#bt_generate_output">11.5.1.·Generating·output·files</a></span></dt> |
135 | <dt><span·class="sect2"><a·href="config.html#idp6 | 135 | <dt><span·class="sect2"><a·href="config.html#idp65220664">11.5.2.·Generating·a·C/C++·configuration·header</a></span></dt> |
136 | </dl></dd> | 136 | </dl></dd> |
137 | <dt><span·class="sect1"><a·href="config.html#languages">11.6.·Languages·support</a></span></dt> | 137 | <dt><span·class="sect1"><a·href="config.html#languages">11.6.·Languages·support</a></span></dt> |
138 | <dt><span·class="sect1"><a·href="config.html#idp6 | 138 | <dt><span·class="sect1"><a·href="config.html#idp65242936">11.7.·Standard·checks</a></span></dt> |
139 | <dd><dl> | 139 | <dd><dl> |
140 | <dt><span·class="sect2"><a·href="config.html#envs">11.7.1.·Checking·for·build·environments</a></span></dt> | 140 | <dt><span·class="sect2"><a·href="config.html#envs">11.7.1.·Checking·for·build·environments</a></span></dt> |
141 | <dt><span·class="sect2"><a·href="config.html#progs">11.7.2.·Checking·for·programs</a></span></dt> | 141 | <dt><span·class="sect2"><a·href="config.html#progs">11.7.2.·Checking·for·programs</a></span></dt> |
142 | <dt><span·class="sect2"><a·href="config.html#idp6 | 142 | <dt><span·class="sect2"><a·href="config.html#idp65350584">11.7.3.·Checking·for·header·files</a></span></dt> |
143 | <dt><span·class="sect2"><a·href="config.html#idp6 | 143 | <dt><span·class="sect2"><a·href="config.html#idp65369656">11.7.4.·Checking·for·system·specific·functions</a></span></dt> |
144 | <dt><span·class="sect2"><a·href="config.html#idp6 | 144 | <dt><span·class="sect2"><a·href="config.html#idp65379000">11.7.5.·Checking·for·libraries</a></span></dt> |
145 | <dt><span·class="sect2"><a·href="config.html#idp6 | 145 | <dt><span·class="sect2"><a·href="config.html#idp65393208">11.7.6.·Miscellaneous·checks</a></span></dt> |
146 | </dl></dd> | 146 | </dl></dd> |
147 | <dt><span·class="sect1"><a·href="config.html#stdsubrs">11.8.·Standard·subroutine·modules</a></span></dt> | 147 | <dt><span·class="sect1"><a·href="config.html#stdsubrs">11.8.·Standard·subroutine·modules</a></span></dt> |
148 | <dd><dl> | 148 | <dd><dl> |
149 | <dt><span·class="sect2"><a·href="config.html#pkgconfig.subr">11.8.1.·The·pkgconfig·module</a></span></dt> | 149 | <dt><span·class="sect2"><a·href="config.html#pkgconfig.subr">11.8.1.·The·pkgconfig·module</a></span></dt> |
150 | <dt><span·class="sect2"><a·href="config.html#idp65 | 150 | <dt><span·class="sect2"><a·href="config.html#idp65485624">11.8.2.·The·pthread·module</a></span></dt> |
151 | <dt><span·class="sect2"><a·href="config.html#idp65 | 151 | <dt><span·class="sect2"><a·href="config.html#idp65495224">11.8.3.·The·x11·module</a></span></dt> |
152 | </dl></dd> | 152 | </dl></dd> |
153 | </dl></dd> | 153 | </dl></dd> |
154 | <dt><span·class="chapter"><a·href="logic.html">12.·Logic·scripts</a></span></dt> | 154 | <dt><span·class="chapter"><a·href="logic.html">12.·Logic·scripts</a></span></dt> |
155 | <dd><dl> | 155 | <dd><dl> |
156 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 156 | <dt><span·class="sect1"><a·href="logic.html#idp65937976">12.1.·Adding·targets</a></span></dt> |
157 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 157 | <dt><span·class="sect1"><a·href="logic.html#idp65948344">12.2.·Top·level·script·file</a></span></dt> |
158 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 158 | <dt><span·class="sect1"><a·href="logic.html#idp65958456">12.3.·Target·definitions</a></span></dt> |
159 | <dt><span·class="sect1"><a·href="logic.html#ppstage">12.4.·Pre/post·actions·for·stages</a></span></dt> | 159 | <dt><span·class="sect1"><a·href="logic.html#ppstage">12.4.·Pre/post·actions·for·stages</a></span></dt> |
160 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 160 | <dt><span·class="sect1"><a·href="logic.html#idp65986232">12.5.·Pre/post·actions·for·target·stages</a></span></dt> |
161 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 161 | <dt><span·class="sect1"><a·href="logic.html#idp65988536">12.6.·Overriding·stages·for·specific·targets</a></span></dt> |
162 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 162 | <dt><span·class="sect1"><a·href="logic.html#idp65990584">12.7.·Standard·types</a></span></dt> |
163 | <dd><dl> | 163 | <dd><dl> |
164 | <dt><span·class="sect2"><a·href="logic.html#logic_program">12.7.1.·The·program·type</a></span></dt> | 164 | <dt><span·class="sect2"><a·href="logic.html#logic_program">12.7.1.·The·program·type</a></span></dt> |
165 | <dt><span·class="sect2"><a·href="logic.html#logic_library">12.7.2.·The·library·type</a></span></dt> | 165 | <dt><span·class="sect2"><a·href="logic.html#logic_library">12.7.2.·The·library·type</a></span></dt> |
166 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 166 | <dt><span·class="sect2"><a·href="logic.html#idp66021816">12.7.3.·The·archive·type</a></span></dt> |
167 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 167 | <dt><span·class="sect2"><a·href="logic.html#idp66025272">12.7.4.·The·shlib·type</a></span></dt> |
168 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 168 | <dt><span·class="sect2"><a·href="logic.html#idp66033848">12.7.5.·The·convert·type</a></span></dt> |
169 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 169 | <dt><span·class="sect2"><a·href="logic.html#idp66046392">12.7.6.·The·output·type</a></span></dt> |
170 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 170 | <dt><span·class="sect2"><a·href="logic.html#idp66052792">12.7.7.·The·texinfo·type</a></span></dt> |
171 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 171 | <dt><span·class="sect2"><a·href="logic.html#idp66057272">12.7.8.·The·qt_program·type</a></span></dt> |
172 | </dl></dd> | 172 | </dl></dd> |
173 | </dl></dd> | 173 | </dl></dd> |
174 | <dt><span·class="chapter"><a·href="bt_lint.html">13.·Verifying·a·package</a></span></dt> | 174 | <dt><span·class="chapter"><a·href="bt_lint.html">13.·Verifying·a·package</a></span></dt> |
175 | <dd><dl> | 175 | <dd><dl> |
176 | <dt><span·class="sect1"><a·href="bt_lint.html#idp6 | 176 | <dt><span·class="sect1"><a·href="bt_lint.html#idp66230712">13.1.·Buildtool·standards</a></span></dt> |
177 | <dd><dl><dt><span·class="sect2"><a·href="bt_lint.html#idp6 | 177 | <dd><dl><dt><span·class="sect2"><a·href="bt_lint.html#idp66231736">13.1.1.·Standard·documents</a></span></dt></dl></dd> |
178 | </dl></dd> | 178 | </dl></dd> |
179 | <dt><span·class="chapter"><a·href="bt_dist.html">14.·Creating·distribution·files</a></span></dt> | 179 | <dt><span·class="chapter"><a·href="bt_dist.html">14.·Creating·distribution·files</a></span></dt> |
180 | <dd><dl><dt><span·class="sect1"><a·href="bt_dist.html#idp6 | 180 | <dd><dl><dt><span·class="sect1"><a·href="bt_dist.html#idp66284984">14.1.·Supported·formats</a></span></dt></dl></dd> |
181 | <dt><span·class="chapter"><a·href="bt_pkgflags.html">15.·Package·flags</a></span></dt> | 181 | <dt><span·class="chapter"><a·href="bt_pkgflags.html">15.·Package·flags</a></span></dt> |
182 | <dd><dl> | 182 | <dd><dl> |
183 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#idp6 | 183 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#idp66316472">15.1.·The·bt_pkgflags·module</a></span></dt> |
184 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#pkgflags">15.2.·Pkgflags·file·format</a></span></dt> | 184 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#pkgflags">15.2.·Pkgflags·file·format</a></span></dt> |
185 | </dl></dd> | 185 | </dl></dd> |
186 | <dt><span·class="chapter"><a·href="bt_wizard.html">16.·The·project·wizard</a></span></dt> | 186 | <dt><span·class="chapter"><a·href="bt_wizard.html">16.·The·project·wizard</a></span></dt> |
187 | </dl></dd> | 187 | </dl></dd> |
188 | </dl> | 188 | </dl> |
189 | </div> | 189 | </div> |
190 | </div> | 190 | </div> |
Offset 71, 35 lines modified | Offset 71, 35 lines modified | ||
71 | <a·name="modules"></a>1.2. Modules</h2></div></div></div> | 71 | <a·name="modules"></a>1.2. Modules</h2></div></div></div> |
72 | <div·class="variablelist"·title="Module·list"> | 72 | <div·class="variablelist"·title="Module·list"> |
73 | <p·class="title"><b>Module·list</b></p> | 73 | <p·class="title"><b>Module·list</b></p> |
74 | <dl> | 74 | <dl> |
75 | <dt><span·class="term">bt_config</span></dt> | 75 | <dt><span·class="term">bt_config</span></dt> |
76 | <dd><p>Provides·a·set·of·shell·functions·useful·to·write·automatic | 76 | <dd><p>Provides·a·set·of·shell·functions·useful·to·write·automatic |
77 | configuration·scripts,·together·with·frontend·which·parses·options·and | 77 | configuration·scripts,·together·with·frontend·which·parses·options·and |
78 | executes·the·scripts·in·a·consistent·way.·<sup>[<a·name="idp63 | 78 | executes·the·scripts·in·a·consistent·way.·<sup>[<a·name="idp63793720"·href="#ftn.idp63793720"·class="footnote">1</a>]</sup></p></dd> |
79 | <dt><span·class="term">bt_dist</span></dt> | 79 | <dt><span·class="term">bt_dist</span></dt> |
80 | <dd><p>Creates·compressed·distribution·files·from·the·source | 80 | <dd><p>Creates·compressed·distribution·files·from·the·source |
81 | package.</p></dd> | 81 | package.</p></dd> |
82 | <dt><span·class="term">bt_doc</span></dt> | 82 | <dt><span·class="term">bt_doc</span></dt> |
83 | <dd><p>Shows·build·time·information·related·to·the·actual·package | 83 | <dd><p>Shows·build·time·information·related·to·the·actual·package |
84 | beeing·built.··It·is·a·small·documentation·reader.</p></dd> | 84 | beeing·built.··It·is·a·small·documentation·reader.</p></dd> |
85 | <dt><span·class="term">bt_lint</span></dt> | 85 | <dt><span·class="term">bt_lint</span></dt> |
86 | <dd><p>Verifies·a·buildtoolized·package·against·a·serie·of·rules | 86 | <dd><p>Verifies·a·buildtoolized·package·against·a·serie·of·rules |
87 | and·warns·the·developer·about·them.··Helps·in·the·creation·of·good·packages | 87 | and·warns·the·developer·about·them.··Helps·in·the·creation·of·good·packages |
88 | that·adhere·to·a·basic·set·of·standards.</p></dd> | 88 | that·adhere·to·a·basic·set·of·standards.</p></dd> |
89 | <dt><span·class="term">bt_logic</span></dt> | 89 | <dt><span·class="term">bt_logic</span></dt> |
90 | <dd><p>Keeps·track·of·dependancies·between·source·and·target·files | 90 | <dd><p>Keeps·track·of·dependancies·between·source·and·target·files |
91 | (objects,·executables,·etc.)·and·applies·several·rules·to·them·(building, | 91 | (objects,·executables,·etc.)·and·applies·several·rules·to·them·(building, |
92 | installation,·cleaning,·etc.)·<sup>[<a·name="idp63 | 92 | installation,·cleaning,·etc.)·<sup>[<a·name="idp63799608"·href="#ftn.idp63799608"·class="footnote">2</a>]</sup> |
93 | It·also·has·all·the·knowledge·to·call·the·compiler·and·linker·in·an | 93 | It·also·has·all·the·knowledge·to·call·the·compiler·and·linker·in·an |
94 | abstract·way,·so·multiple·compilers·can·be·easily·supported | 94 | abstract·way,·so·multiple·compilers·can·be·easily·supported |
95 | <sup>[<a·name="idp63 | 95 | <sup>[<a·name="idp63801016"·href="#ftn.idp63801016"·class="footnote">3</a>]</sup>.</p></dd> |
96 | <dt><span·class="term">bt_pkgflags</span></dt> | 96 | <dt><span·class="term">bt_pkgflags</span></dt> |
97 | <dd><p>Stores·flags·related·to·libraries·needed·at·build·time·to | 97 | <dd><p>Stores·flags·related·to·libraries·needed·at·build·time·to |
98 | link·a·given·program·against·that·specific·library.·<sup>[<a·name="idp63 | 98 | link·a·given·program·against·that·specific·library.·<sup>[<a·name="idp63803576"·href="#ftn.idp63803576"·class="footnote">4</a>]</sup></p></dd> |
99 | <dt><span·class="term">bt_sh</span></dt> | 99 | <dt><span·class="term">bt_sh</span></dt> |
100 | <dd><p>A·very·small·and·fast·shell·interpreter.··It·is·used·all | 100 | <dd><p>A·very·small·and·fast·shell·interpreter.··It·is·used·all |
101 | around·Buildtool·to·parse·script·files,·so·you·do·not·need·to·worry·about | 101 | around·Buildtool·to·parse·script·files,·so·you·do·not·need·to·worry·about |
102 | compatibility·issues·with·ancient·shells.··It·also·has·several·improvements | 102 | compatibility·issues·with·ancient·shells.··It·also·has·several·improvements |
103 | over·the·standard·shell,·to·make·coding·easier·and·parsing | 103 | over·the·standard·shell,·to·make·coding·easier·and·parsing |
104 | faster.</p></dd> | 104 | faster.</p></dd> |
105 | <dt><span·class="term">bt_swcgen</span></dt> | 105 | <dt><span·class="term">bt_swcgen</span></dt> |
Offset 133, 22 lines modified | Offset 133, 22 lines modified | ||
133 | candidate</em></span>.··Changes·in·it·can·break·compatibility·without | 133 | candidate</em></span>.··Changes·in·it·can·break·compatibility·without |
134 | notice,·as·the·<acronym·class="acronym">API</acronym>·has·not·been·stabilized·yet.··We·will | 134 | notice,·as·the·<acronym·class="acronym">API</acronym>·has·not·been·stabilized·yet.··We·will |
135 | try·to·avoid·such·changes,·or·if·done,·warn·developers·accordingly·to | 135 | try·to·avoid·such·changes,·or·if·done,·warn·developers·accordingly·to |
136 | encourage·them·to·update·their·packages.</p> | 136 | encourage·them·to·update·their·packages.</p> |
137 | </div> | 137 | </div> |
138 | <div·class="footnotes"> | 138 | <div·class="footnotes"> |
139 | <br><hr·width="100"·align="left"> | 139 | <br><hr·width="100"·align="left"> |
140 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63 | 140 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63793720"·href="#idp63793720"·class="para">1</a>]·</sup>This·is·similar·to |
141 | the·<acronym·class="acronym">GNU</acronym>·<span·class="command"><strong>autoconf</strong></span> | 141 | the·<acronym·class="acronym">GNU</acronym>·<span·class="command"><strong>autoconf</strong></span> |
142 | program.</p></div> | 142 | program.</p></div> |
143 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63 | 143 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63799608"·href="#idp63799608"·class="para">2</a>]·</sup>This·is·similar·to·the |
144 | <acronym·class="acronym">GNU</acronym>·<span·class="command"><strong>automake</strong></span>·program.</p></div> | 144 | <acronym·class="acronym">GNU</acronym>·<span·class="command"><strong>automake</strong></span>·program.</p></div> |
145 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63 | 145 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63801016"·href="#idp63801016"·class="para">3</a>]·</sup>This·is·somewhat·similar·to·the·<acronym·class="acronym">GNU</acronym> |
146 | <span·class="command"><strong>libtool</strong></span>·program.</p></div> | 146 | <span·class="command"><strong>libtool</strong></span>·program.</p></div> |
147 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63 | 147 | <div·class="footnote"><p><sup>[<a·id="ftn.idp63803576"·href="#idp63803576"·class="para">4</a>]·</sup>This·is |
148 | similar·to·the·<acronym·class="acronym">GNU</acronym>·<span·class="command"><strong>pkgconfig</strong></span> | 148 | similar·to·the·<acronym·class="acronym">GNU</acronym>·<span·class="command"><strong>pkgconfig</strong></span> |
149 | program.</p></div> | 149 | program.</p></div> |
150 | </div> | 150 | </div> |
151 | </div> | 151 | </div> |
152 | <div·class="navfooter"> | 152 | <div·class="navfooter"> |
153 | <hr> | 153 | <hr> |
154 | <table·width="100%"·summary="Navigation·footer"> | 154 | <table·width="100%"·summary="Navigation·footer"> |
Offset 25, 30 lines modified | Offset 25, 30 lines modified | ||
25 | </div> | 25 | </div> |
26 | <div·class="chapter"·title="Chapter 12. Logic·scripts"> | 26 | <div·class="chapter"·title="Chapter 12. Logic·scripts"> |
27 | <div·class="titlepage"><div><div><h2·class="title"> | 27 | <div·class="titlepage"><div><div><h2·class="title"> |
28 | <a·name="logic"></a>Chapter 12. Logic·scripts</h2></div></div></div> | 28 | <a·name="logic"></a>Chapter 12. Logic·scripts</h2></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 32 | <dt><span·class="sect1"><a·href="logic.html#idp65937976">12.1.·Adding·targets</a></span></dt> |
33 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 33 | <dt><span·class="sect1"><a·href="logic.html#idp65948344">12.2.·Top·level·script·file</a></span></dt> |
34 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 34 | <dt><span·class="sect1"><a·href="logic.html#idp65958456">12.3.·Target·definitions</a></span></dt> |
35 | <dt><span·class="sect1"><a·href="logic.html#ppstage">12.4.·Pre/post·actions·for·stages</a></span></dt> | 35 | <dt><span·class="sect1"><a·href="logic.html#ppstage">12.4.·Pre/post·actions·for·stages</a></span></dt> |
36 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 36 | <dt><span·class="sect1"><a·href="logic.html#idp65986232">12.5.·Pre/post·actions·for·target·stages</a></span></dt> |
37 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 37 | <dt><span·class="sect1"><a·href="logic.html#idp65988536">12.6.·Overriding·stages·for·specific·targets</a></span></dt> |
38 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 38 | <dt><span·class="sect1"><a·href="logic.html#idp65990584">12.7.·Standard·types</a></span></dt> |
39 | <dd><dl> | 39 | <dd><dl> |
40 | <dt><span·class="sect2"><a·href="logic.html#logic_program">12.7.1.·The·program·type</a></span></dt> | 40 | <dt><span·class="sect2"><a·href="logic.html#logic_program">12.7.1.·The·program·type</a></span></dt> |
41 | <dt><span·class="sect2"><a·href="logic.html#logic_library">12.7.2.·The·library·type</a></span></dt> | 41 | <dt><span·class="sect2"><a·href="logic.html#logic_library">12.7.2.·The·library·type</a></span></dt> |
42 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 42 | <dt><span·class="sect2"><a·href="logic.html#idp66021816">12.7.3.·The·archive·type</a></span></dt> |
43 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 43 | <dt><span·class="sect2"><a·href="logic.html#idp66025272">12.7.4.·The·shlib·type</a></span></dt> |
44 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 44 | <dt><span·class="sect2"><a·href="logic.html#idp66033848">12.7.5.·The·convert·type</a></span></dt> |
45 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 45 | <dt><span·class="sect2"><a·href="logic.html#idp66046392">12.7.6.·The·output·type</a></span></dt> |
46 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 46 | <dt><span·class="sect2"><a·href="logic.html#idp66052792">12.7.7.·The·texinfo·type</a></span></dt> |
47 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 47 | <dt><span·class="sect2"><a·href="logic.html#idp66057272">12.7.8.·The·qt_program·type</a></span></dt> |
48 | </dl></dd> | 48 | </dl></dd> |
49 | </dl> | 49 | </dl> |
50 | </div> | 50 | </div> |
51 | <p>The·build·process·of·a·source·package·is·controlled·by·several | 51 | <p>The·build·process·of·a·source·package·is·controlled·by·several |
52 | <span·class="emphasis"><em>logic</em></span>·scripts.··A·logic·file·defines·targets·and | 52 | <span·class="emphasis"><em>logic</em></span>·scripts.··A·logic·file·defines·targets·and |
53 | associates·several·types·to·them·(which·in·turn·means·that·actions·are | 53 | associates·several·types·to·them·(which·in·turn·means·that·actions·are |
54 | added·to·the·default·stages).</p> | 54 | added·to·the·default·stages).</p> |
Offset 72, 29 lines modified | Offset 72, 29 lines modified | ||
72 | </dd> | 72 | </dd> |
73 | <dt><span·class="term">type</span></dt> | 73 | <dt><span·class="term">type</span></dt> |
74 | <dd><p>Gives·specific·instructions·on·how·to·execute·a·stage | 74 | <dd><p>Gives·specific·instructions·on·how·to·execute·a·stage |
75 | ····on·a·given·target.··It·relates·both·concepts.</p></dd> | 75 | ····on·a·given·target.··It·relates·both·concepts.</p></dd> |
76 | </dl></div> | 76 | </dl></div> |
77 | <div·class="sect1"·title="12.1. Adding·targets"> | 77 | <div·class="sect1"·title="12.1. Adding·targets"> |
78 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 78 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
79 | <a·name="idp65 | 79 | <a·name="idp65937976"></a>12.1. Adding·targets</h2></div></div></div> |
80 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_target</strong> | 80 | <div·xmlns:html="http://www.w3.org/1999/xhtml"·class="funcenv"><p><strong>bt_target</strong> |
81 | ··<i>target1</i> | 81 | ··<i>target1</i> |
82 | ··<i>...</i> | 82 | ··<i>...</i> |
83 | ··<i>targetN</i> | 83 | ··<i>targetN</i> |
84 | ··</p></div> | 84 | ··</p></div> |
85 | <p>To·tell·<span·class="command"><strong>bt_logic</strong></span>·which·targets·are·available·in | 85 | <p>To·tell·<span·class="command"><strong>bt_logic</strong></span>·which·targets·are·available·in |
86 | a·script·file,·use·the·<code·class="function">bt_target</code>·function.··All | 86 | a·script·file,·use·the·<code·class="function">bt_target</code>·function.··All |
87 | arguments·given·to·it·are·treated·as·new·targets·that·will·be·built·in | 87 | arguments·given·to·it·are·treated·as·new·targets·that·will·be·built·in |
88 | the·given·order.</p> | 88 | the·given·order.</p> |
89 | <pre·class="programlisting">bt_target·fooprogram·foolibrary</pre> | 89 | <pre·class="programlisting">bt_target·fooprogram·foolibrary</pre> |
90 | </div> | 90 | </div> |
91 | <div·class="sect1"·title="12.2. Top·level·script·file"> | 91 | <div·class="sect1"·title="12.2. Top·level·script·file"> |
92 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 92 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
93 | <a·name="idp65 | 93 | <a·name="idp65948344"></a>12.2. Top·level·script·file</h2></div></div></div> |
94 | <p>The·logic·script·in·the·top·directory·of·your·project·will·usually | 94 | <p>The·logic·script·in·the·top·directory·of·your·project·will·usually |
95 | recurse·into·other·directories·(note,·<span·class="emphasis"><em>usually</em></span>,·but | 95 | recurse·into·other·directories·(note,·<span·class="emphasis"><em>usually</em></span>,·but |
96 | not·always;·<span·class="command"><strong>bt_logic</strong></span>·leaves·you·the·freedom·to·do·it | 96 | not·always;·<span·class="command"><strong>bt_logic</strong></span>·leaves·you·the·freedom·to·do·it |
97 | another·way).</p> | 97 | another·way).</p> |
98 | <p>This·script·can·either·be·a·top·level·<code·class="filename">Logic.bt</code> | 98 | <p>This·script·can·either·be·a·top·level·<code·class="filename">Logic.bt</code> |
99 | file·or·be·embedded·into·<code·class="filename">Generic.bt</code>·through·the | 99 | file·or·be·embedded·into·<code·class="filename">Generic.bt</code>·through·the |
100 | <code·class="function">logic</code>·function·(the·later·is·highly | 100 | <code·class="function">logic</code>·function·(the·later·is·highly |
Offset 116, 15 lines modified | Offset 116, 15 lines modified | ||
116 | <p>Note·that·when·entering·any·directory,·if·a | 116 | <p>Note·that·when·entering·any·directory,·if·a |
117 | <code·class="filename">Logic.bt</code>·file·is·found·in·it, | 117 | <code·class="filename">Logic.bt</code>·file·is·found·in·it, |
118 | <span·class="command"><strong>bt_logic</strong></span>·will·use·it·instead·of·the·top·level | 118 | <span·class="command"><strong>bt_logic</strong></span>·will·use·it·instead·of·the·top·level |
119 | one.</p> | 119 | one.</p> |
120 | </div> | 120 | </div> |
121 | <div·class="sect1"·title="12.3. Target·definitions"> | 121 | <div·class="sect1"·title="12.3. Target·definitions"> |
122 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 122 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
123 | <a·name="idp65 | 123 | <a·name="idp65958456"></a>12.3. Target·definitions</h2></div></div></div> |
124 | <p>To·define·a·target,·declare·the | 124 | <p>To·define·a·target,·declare·the |
125 | <code·class="function">target_<name></code>·function·in·your·script. | 125 | <code·class="function">target_<name></code>·function·in·your·script. |
126 | This·function·will·<span·class="emphasis"><em>only</em></span>·set·variable·values·that | 126 | This·function·will·<span·class="emphasis"><em>only</em></span>·set·variable·values·that |
127 | affect·the·target.··These·variables·are·made·local·to·the·target,·so·they | 127 | affect·the·target.··These·variables·are·made·local·to·the·target,·so·they |
128 | not·affect·other·targets·that·may·appear·in·the·same·file.··(Variables | 128 | not·affect·other·targets·that·may·appear·in·the·same·file.··(Variables |
129 | made·local·are·those·listed·in·the·<code·class="varname">BT_TARGET_DEFS</code>·and | 129 | made·local·are·those·listed·in·the·<code·class="varname">BT_TARGET_DEFS</code>·and |
130 | <code·class="varname">BT_TARGET_VARS</code>·lists).</p> | 130 | <code·class="varname">BT_TARGET_VARS</code>·lists).</p> |
Offset 188, 39 lines modified | Offset 188, 39 lines modified | ||
188 | post_deinstall()·{ | 188 | post_deinstall()·{ |
189 | ····echo·"Didn't·you·like·it?·:'(" | 189 | ····echo·"Didn't·you·like·it?·:'(" |
190 | }</pre> | 190 | }</pre> |
191 | </div> | 191 | </div> |
192 | <div·class="sect1"·title="12.5. Pre/post·actions·for·target·stages"> | 192 | <div·class="sect1"·title="12.5. Pre/post·actions·for·target·stages"> |
193 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 193 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
194 | <a·name="idp65 | 194 | <a·name="idp65986232"></a>12.5. Pre/post·actions·for·target·stages</h2></div></div></div> |
195 | <p>Similar·to·what·said·in·<a·class="xref"·href="logic.html#ppstage"·title="12.4. Pre/post·actions·for·stages">Section 12.4,·“Pre/post·actions·for·stages”</a>,·you·can·define | 195 | <p>Similar·to·what·said·in·<a·class="xref"·href="logic.html#ppstage"·title="12.4. Pre/post·actions·for·stages">Section 12.4,·“Pre/post·actions·for·stages”</a>,·you·can·define |
196 | actions·to·be·taken·before·and·after·an·specific·target·is·executed:</p> | 196 | actions·to·be·taken·before·and·after·an·specific·target·is·executed:</p> |
197 | <pre·class="programlisting">target_myprogram_post_build()·{ | 197 | <pre·class="programlisting">target_myprogram_post_build()·{ |
198 | ····echo·"You·know,·myprogram·has·been·built·successfully!" | 198 | ····echo·"You·know,·myprogram·has·been·built·successfully!" |
199 | }</pre> | 199 | }</pre> |
200 | </div> | 200 | </div> |
201 | <div·class="sect1"·title="12.6. Overriding·stages·for·specific·targets"> | 201 | <div·class="sect1"·title="12.6. Overriding·stages·for·specific·targets"> |
202 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 202 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
203 | <a·name="idp65 | 203 | <a·name="idp65988536"></a>12.6. Overriding·stages·for·specific·targets</h2></div></div></div> |
204 | <p>If·there·is·a·type·that·half-suits·your·target,·you·can·override | 204 | <p>If·there·is·a·type·that·half-suits·your·target,·you·can·override |
205 | some·of·its·stages·with·your·preferred·commands.··I.e.:</p> | 205 | some·of·its·stages·with·your·preferred·commands.··I.e.:</p> |
206 | <pre·class="programlisting">target_myprogram()·{ | 206 | <pre·class="programlisting">target_myprogram()·{ |
207 | ····BT_TYPE=program | 207 | ····BT_TYPE=program |
208 | ····... | 208 | ····... |
209 | } | 209 | } |
210 | target_myprogram_build()·{ | 210 | target_myprogram_build()·{ |
211 | ····echo·"program's·type·build·doesn't·fit·our·needs...·override·it" | 211 | ····echo·"program's·type·build·doesn't·fit·our·needs...·override·it" |
212 | ····... | 212 | ····... |
213 | }</pre> | 213 | }</pre> |
214 | </div> | 214 | </div> |
215 | <div·class="sect1"·title="12.7. Standard·types"> | 215 | <div·class="sect1"·title="12.7. Standard·types"> |
216 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> | 216 | <div·class="titlepage"><div><div><h2·class="title"·style="clear:·both"> |
217 | <a·name="idp65 | 217 | <a·name="idp65990584"></a>12.7. Standard·types</h2></div></div></div> |
218 | <div·class="sect2"·title="12.7.1. The·program·type"> | 218 | <div·class="sect2"·title="12.7.1. The·program·type"> |
219 | <div·class="titlepage"><div><div><h3·class="title"> | 219 | <div·class="titlepage"><div><div><h3·class="title"> |
220 | <a·name="logic_program"></a>12.7.1. The·program·type</h3></div></div></div> | 220 | <a·name="logic_program"></a>12.7.1. The·program·type</h3></div></div></div> |
221 | <p>This·lets·you·build·executable·programs.··The·following·variables | 221 | <p>This·lets·you·build·executable·programs.··The·following·variables |
222 | are·recognized·in·the·target·definition:</p> | 222 | are·recognized·in·the·target·definition:</p> |
223 | <div·class="variablelist"><dl> | 223 | <div·class="variablelist"><dl> |
224 | <dt><span·class="term"><code·class="varname">BT_IS_TEST</code></span></dt> | 224 | <dt><span·class="term"><code·class="varname">BT_IS_TEST</code></span></dt> |
Offset 278, 27 lines modified | Offset 278, 27 lines modified | ||
278 | ····BT_LIB_MINOR=5 | 278 | ····BT_LIB_MINOR=5 |
279 | ····BT_LIB_MICRO=7 | 279 | ····BT_LIB_MICRO=7 |
280 | ····BT_SOURCES="lib1.c·lib2.c" | 280 | ····BT_SOURCES="lib1.c·lib2.c" |
281 | }</pre> | 281 | }</pre> |
282 | </div> | 282 | </div> |
283 | <div·class="sect2"·title="12.7.3. The·archive·type"> | 283 | <div·class="sect2"·title="12.7.3. The·archive·type"> |
284 | <div·class="titlepage"><div><div><h3·class="title"> | 284 | <div·class="titlepage"><div><div><h3·class="title"> |
285 | <a·name="idp6 | 285 | <a·name="idp66021816"></a>12.7.3. The·archive·type</h3></div></div></div> |
286 | <p>This·lets·you·build·archive·files,·independantly·on·what·the | 286 | <p>This·lets·you·build·archive·files,·independantly·on·what·the |
287 | configuration·script·detected·(that·is,·for·convenience·archives,·for | 287 | configuration·script·detected·(that·is,·for·convenience·archives,·for |
288 | example).</p> | 288 | example).</p> |
289 | <p>Variables·recognized:</p> | 289 | <p>Variables·recognized:</p> |
290 | <div·class="variablelist"><dl> | 290 | <div·class="variablelist"><dl> |
291 | <dt><span·class="term"><code·class="varname">BT_SOURCES</code></span></dt> | 291 | <dt><span·class="term"><code·class="varname">BT_SOURCES</code></span></dt> |
292 | <dd><p>List·of·source·files·(either·C·or·C++).</p></dd> | 292 | <dd><p>List·of·source·files·(either·C·or·C++).</p></dd> |
293 | </dl></div> | 293 | </dl></div> |
294 | </div> | 294 | </div> |
295 | <div·class="sect2"·title="12.7.4. The·shlib·type"> | 295 | <div·class="sect2"·title="12.7.4. The·shlib·type"> |
296 | <div·class="titlepage"><div><div><h3·class="title"> | 296 | <div·class="titlepage"><div><div><h3·class="title"> |
297 | <a·name="idp6 | 297 | <a·name="idp66025272"></a>12.7.4. The·shlib·type</h3></div></div></div> |
298 | <p>This·lets·you·build·shared·libraries·and/or·plugins,·assuming·they | 298 | <p>This·lets·you·build·shared·libraries·and/or·plugins,·assuming·they |
299 | are·supported·in·the·current·platform.</p> | 299 | are·supported·in·the·current·platform.</p> |
300 | <p>Variables·recognized:</p> | 300 | <p>Variables·recognized:</p> |
301 | <div·class="variablelist"><dl> | 301 | <div·class="variablelist"><dl> |
302 | <dt><span·class="term"><code·class="varname">BT_LIB_MAJOR</code></span></dt> | 302 | <dt><span·class="term"><code·class="varname">BT_LIB_MAJOR</code></span></dt> |
303 | <dd><p>Major·version·specification·for·the·library.··May·be·left | 303 | <dd><p>Major·version·specification·for·the·library.··May·be·left |
304 | empty·for·plugins.</p></dd> | 304 | empty·for·plugins.</p></dd> |
Offset 313, 15 lines modified | Offset 313, 15 lines modified | ||
313 | <dt><span·class="term"><code·class="varname">BT_TARGET_FILE</code></span></dt> | 313 | <dt><span·class="term"><code·class="varname">BT_TARGET_FILE</code></span></dt> |
314 | <dd><p>Target·file·name.··Only·use·it·in·special·situations | 314 | <dd><p>Target·file·name.··Only·use·it·in·special·situations |
315 | (i.e.,·building·a·plugin).</p></dd> | 315 | (i.e.,·building·a·plugin).</p></dd> |
316 | </dl></div> | 316 | </dl></div> |
317 | </div> | 317 | </div> |
318 | <div·class="sect2"·title="12.7.5. The·convert·type"> | 318 | <div·class="sect2"·title="12.7.5. The·convert·type"> |
319 | <div·class="titlepage"><div><div><h3·class="title"> | 319 | <div·class="titlepage"><div><div><h3·class="title"> |
320 | <a·name="idp6 | 320 | <a·name="idp66033848"></a>12.7.5. The·convert·type</h3></div></div></div> |
321 | <p>This·implements·automatic·conversion·between·file·types·(i.e.,·from | 321 | <p>This·implements·automatic·conversion·between·file·types·(i.e.,·from |
322 | <code·class="literal">.c</code>·source·code·to·<code·class="literal">.o</code>·object·files). | 322 | <code·class="literal">.c</code>·source·code·to·<code·class="literal">.o</code>·object·files). |
323 | This·is·used·to·automatically·define·targets·when·they·are·not·explicitly | 323 | This·is·used·to·automatically·define·targets·when·they·are·not·explicitly |
324 | provided·by·the·user.··Also·used·intensively·in·generated·dependancy·files | 324 | provided·by·the·user.··Also·used·intensively·in·generated·dependancy·files |
325 | (<code·class="literal">.dep</code>).</p> | 325 | (<code·class="literal">.dep</code>).</p> |
326 | <p>Variables·recognized:</p> | 326 | <p>Variables·recognized:</p> |
327 | <div·class="variablelist"><dl> | 327 | <div·class="variablelist"><dl> |
Offset 344, 15 lines modified | Offset 344, 15 lines modified | ||
344 | convert_html_xml()·{ | 344 | convert_html_xml()·{ |
345 | ····#·commands·to·issue·the·conversion·during·the·build·stage | 345 | ····#·commands·to·issue·the·conversion·during·the·build·stage |
346 | }</pre> | 346 | }</pre> |
347 | </div> | 347 | </div> |
348 | <div·class="sect2"·title="12.7.6. The·output·type"> | 348 | <div·class="sect2"·title="12.7.6. The·output·type"> |
349 | <div·class="titlepage"><div><div><h3·class="title"> | 349 | <div·class="titlepage"><div><div><h3·class="title"> |
350 | <a·name="idp6 | 350 | <a·name="idp66046392"></a>12.7.6. The·output·type</h3></div></div></div> |
351 | <p>This·is·similar·to·the·<code·class="literal">convert</code>·type,·but·used·to | 351 | <p>This·is·similar·to·the·<code·class="literal">convert</code>·type,·but·used·to |
352 | create·files·with·the·<span·class="command"><strong>bt_output</strong></span>·utility·(generated·from | 352 | create·files·with·the·<span·class="command"><strong>bt_output</strong></span>·utility·(generated·from |
353 | the·configure·script·by·the·call·to | 353 | the·configure·script·by·the·call·to |
354 | <code·class="function">bt_generate_output</code>;·see·<a·class="xref"·href="config.html#bt_generate_output"·title="11.5.1. Generating·output·files">Section 11.5.1,·“Generating·output·files”</a>).··This·type·is·automatically·used·by | 354 | <code·class="function">bt_generate_output</code>;·see·<a·class="xref"·href="config.html#bt_generate_output"·title="11.5.1. Generating·output·files">Section 11.5.1,·“Generating·output·files”</a>).··This·type·is·automatically·used·by |
355 | <span·class="command"><strong>bt_logic</strong></span>·when·possible·(i.e.,·a·you·are·building·a | 355 | <span·class="command"><strong>bt_logic</strong></span>·when·possible·(i.e.,·a·you·are·building·a |
356 | file·that·does·not·exist,·but·one·with·the·same·name·with·a·trailing | 356 | file·that·does·not·exist,·but·one·with·the·same·name·with·a·trailing |
357 | <code·class="literal">.in</code>·suffix·does),·so·you·should·not·care·about·defining | 357 | <code·class="literal">.in</code>·suffix·does),·so·you·should·not·care·about·defining |
Offset 360, 27 lines modified | Offset 360, 27 lines modified | ||
360 | <p>For·example,·if·you·have·the·<code·class="filename">test.in</code>·file,·you | 360 | <p>For·example,·if·you·have·the·<code·class="filename">test.in</code>·file,·you |
361 | could·do·the·following·to·get·<code·class="filename">test</code>·automatically | 361 | could·do·the·following·to·get·<code·class="filename">test</code>·automatically |
362 | generated·for·you:</p> | 362 | generated·for·you:</p> |
363 | <pre·class="programlisting">bt_target·test</pre> | 363 | <pre·class="programlisting">bt_target·test</pre> |
364 | </div> | 364 | </div> |
365 | <div·class="sect2"·title="12.7.7. The·texinfo·type"> | 365 | <div·class="sect2"·title="12.7.7. The·texinfo·type"> |
366 | <div·class="titlepage"><div><div><h3·class="title"> | 366 | <div·class="titlepage"><div><div><h3·class="title"> |
367 | <a·name="idp6 | 367 | <a·name="idp66052792"></a>12.7.7. The·texinfo·type</h3></div></div></div> |
368 | <p>This·is·useful·to·handle·generation·of·<code·class="literal">.info</code> | 368 | <p>This·is·useful·to·handle·generation·of·<code·class="literal">.info</code> |
369 | files·and·their·installation·on·the·system.</p> | 369 | files·and·their·installation·on·the·system.</p> |
370 | <p>Variables·recognized:</p> | 370 | <p>Variables·recognized:</p> |
371 | <div·class="variablelist"><dl> | 371 | <div·class="variablelist"><dl> |
372 | <dt><span·class="term"><code·class="varname">BT_SOURCE</code></span></dt> | 372 | <dt><span·class="term"><code·class="varname">BT_SOURCE</code></span></dt> |
373 | <dd><p>Filename·of·the·source·file.··Must·end·in | 373 | <dd><p>Filename·of·the·source·file.··Must·end·in |
374 | <code·class="literal">.texi</code>.</p></dd> | 374 | <code·class="literal">.texi</code>.</p></dd> |
375 | </dl></div> | 375 | </dl></div> |
376 | </div> | 376 | </div> |
377 | <div·class="sect2"·title="12.7.8. The·qt_program·type"> | 377 | <div·class="sect2"·title="12.7.8. The·qt_program·type"> |
378 | <div·class="titlepage"><div><div><h3·class="title"> | 378 | <div·class="titlepage"><div><div><h3·class="title"> |
379 | <a·name="idp6 | 379 | <a·name="idp66057272"></a>12.7.8. The·qt_program·type</h3></div></div></div> |
380 | <p>This·lets·you·build·executable·programs·that·use·the·QT·library. | 380 | <p>This·lets·you·build·executable·programs·that·use·the·QT·library. |
381 | Headers·used·to·build·these·programs·will·usually·need·a·converstion·to | 381 | Headers·used·to·build·these·programs·will·usually·need·a·converstion·to |
382 | <code·class="literal">.moc</code>·files.··This·type·provides·functionality·to | 382 | <code·class="literal">.moc</code>·files.··This·type·provides·functionality·to |
383 | generate·these·files.··The·program·itself·is·handled·by·the·regular | 383 | generate·these·files.··The·program·itself·is·handled·by·the·regular |
384 | 'program'·type·later,·so·all·variables·that·affect·it·are·applicable·here | 384 | 'program'·type·later,·so·all·variables·that·affect·it·are·applicable·here |
385 | too.</p> | 385 | too.</p> |
386 | <p>Variables·recognized:</p> | 386 | <p>Variables·recognized:</p> |
Offset 27, 39 lines modified | Offset 27, 39 lines modified | ||
27 | <div·class="titlepage"><div><div><h1·class="title"> | 27 | <div·class="titlepage"><div><div><h1·class="title"> |
28 | <a·name="part_user"></a>Part I. User's·documentation</h1></div></div></div> | 28 | <a·name="part_user"></a>Part I. User's·documentation</h1></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="chapter"><a·href="buildtool.html">2.·The·buildtool·command</a></span></dt> | 32 | <dt><span·class="chapter"><a·href="buildtool.html">2.·The·buildtool·command</a></span></dt> |
33 | <dd><dl> | 33 | <dd><dl> |
34 | <dt><span·class="sect1"><a·href="buildtool.html#idp63 | 34 | <dt><span·class="sect1"><a·href="buildtool.html#idp63860536">2.1.·Command·syntax</a></span></dt> |
35 | <dt><span·class="sect1"><a·href="buildtool.html#siteinfo">2.2.·Site·information</a></span></dt> | 35 | <dt><span·class="sect1"><a·href="buildtool.html#siteinfo">2.2.·Site·information</a></span></dt> |
36 | <dt><span·class="sect1"><a·href="buildtool.html#idp63 | 36 | <dt><span·class="sect1"><a·href="buildtool.html#idp63933368">2.3.·Examples</a></span></dt> |
37 | </dl></dd> | 37 | </dl></dd> |
38 | <dt><span·class="chapter"><a·href="bt_doc.html">3.·Build·time·documentation</a></span></dt> | 38 | <dt><span·class="chapter"><a·href="bt_doc.html">3.·Build·time·documentation</a></span></dt> |
39 | <dt><span·class="chapter"><a·href="bt_config.html">4.·Automatic·package·configuration</a></span></dt> | 39 | <dt><span·class="chapter"><a·href="bt_config.html">4.·Automatic·package·configuration</a></span></dt> |
40 | <dd><dl> | 40 | <dd><dl> |
41 | <dt><span·class="sect1"><a·href="bt_config.html#idp6 | 41 | <dt><span·class="sect1"><a·href="bt_config.html#idp64041144">4.1.·The·bt_config·module</a></span></dt> |
42 | <dd><dl> | 42 | <dd><dl> |
43 | <dt><span·class="sect2"><a·href="bt_config.html#stddir">4.1.1.·Standard·directories</a></span></dt> | 43 | <dt><span·class="sect2"><a·href="bt_config.html#stddir">4.1.1.·Standard·directories</a></span></dt> |
44 | <dt><span·class="sect2"><a·href="bt_config.html#stdfeat">4.1.2.·Standard·features</a></span></dt> | 44 | <dt><span·class="sect2"><a·href="bt_config.html#stdfeat">4.1.2.·Standard·features</a></span></dt> |
45 | </dl></dd> | 45 | </dl></dd> |
46 | <dt><span·class="sect1"><a·href="bt_config.html#idp6 | 46 | <dt><span·class="sect1"><a·href="bt_config.html#idp64160312">4.2.·Examples</a></span></dt> |
47 | </dl></dd> | 47 | </dl></dd> |
48 | <dt><span·class="chapter"><a·href="bt_logic.html">5.·Building·targets</a></span></dt> | 48 | <dt><span·class="chapter"><a·href="bt_logic.html">5.·Building·targets</a></span></dt> |
49 | <dd><dl> | 49 | <dd><dl> |
50 | <dt><span·class="sect1"><a·href="bt_logic.html#idp6 | 50 | <dt><span·class="sect1"><a·href="bt_logic.html#idp64317240">5.1.·The·bt_logic·module</a></span></dt> |
51 | <dt><span·class="sect1"><a·href="bt_logic.html#idp6 | 51 | <dt><span·class="sect1"><a·href="bt_logic.html#idp64414392">5.2.·Examples</a></span></dt> |
52 | </dl></dd> | 52 | </dl></dd> |
53 | <dt><span·class="chapter"><a·href="bt_swcgen.html">6.·System·wide·configuration</a></span></dt> | 53 | <dt><span·class="chapter"><a·href="bt_swcgen.html">6.·System·wide·configuration</a></span></dt> |
54 | <dd><dl> | 54 | <dd><dl> |
55 | <dt><span·class="sect1"><a·href="bt_swcgen.html#idp64 | 55 | <dt><span·class="sect1"><a·href="bt_swcgen.html#idp64518968">6.1.·The·bt_swcgen·module</a></span></dt> |
56 | <dd><dl> | 56 | <dd><dl> |
57 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64 | 57 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64561336">6.1.1.·Input·file·structure</a></span></dt> |
58 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64 | 58 | <dt><span·class="sect2"><a·href="bt_swcgen.html#idp64565816">6.1.2.·Available·functions</a></span></dt> |
59 | </dl></dd> | 59 | </dl></dd> |
60 | </dl></dd> | 60 | </dl></dd> |
61 | </dl> | 61 | </dl> |
62 | </div> | 62 | </div> |
63 | </div> | 63 | </div> |
64 | <div·class="navfooter"> | 64 | <div·class="navfooter"> |
65 | <hr> | 65 | <hr> |
Offset 27, 104 lines modified | Offset 27, 104 lines modified | ||
27 | <div·class="titlepage"><div><div><h1·class="title"> | 27 | <div·class="titlepage"><div><div><h1·class="title"> |
28 | <a·name="part_devel"></a>Part II. Developer's·documentation</h1></div></div></div> | 28 | <a·name="part_devel"></a>Part II. Developer's·documentation</h1></div></div></div> |
29 | <div·class="toc"> | 29 | <div·class="toc"> |
30 | <p><b>Table·of·Contents</b></p> | 30 | <p><b>Table·of·Contents</b></p> |
31 | <dl> | 31 | <dl> |
32 | <dt><span·class="chapter"><a·href="devtut.html">7.·Tutorial</a></span></dt> | 32 | <dt><span·class="chapter"><a·href="devtut.html">7.·Tutorial</a></span></dt> |
33 | <dd><dl> | 33 | <dd><dl> |
34 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 34 | <dt><span·class="sect1"><a·href="devtut.html#idp64754872">7.1.·Project·skeleton</a></span></dt> |
35 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 35 | <dt><span·class="sect1"><a·href="devtut.html#idp64772024">7.2.·Package·definitions</a></span></dt> |
36 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 36 | <dt><span·class="sect1"><a·href="devtut.html#idp64775736">7.3.·The·docs·function</a></span></dt> |
37 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 37 | <dt><span·class="sect1"><a·href="devtut.html#idp64784824">7.4.·The·configuration·script</a></span></dt> |
38 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 38 | <dt><span·class="sect1"><a·href="devtut.html#idp64798264">7.5.·Top·level·logic·script</a></span></dt> |
39 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 39 | <dt><span·class="sect1"><a·href="devtut.html#idp64801848">7.6.·The·sample·library</a></span></dt> |
40 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64 | 40 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64806200">7.6.1.·The·logic·script</a></span></dt></dl></dd> |
41 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 41 | <dt><span·class="sect1"><a·href="devtut.html#idp64810168">7.7.·The·sample·program</a></span></dt> |
42 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64 | 42 | <dd><dl><dt><span·class="sect2"><a·href="devtut.html#idp64814776">7.7.1.·The·logic·script</a></span></dt></dl></dd> |
43 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 43 | <dt><span·class="sect1"><a·href="devtut.html#idp64830648">7.8.·The·pkgflags·file</a></span></dt> |
44 | <dt><span·class="sect1"><a·href="devtut.html#idp64 | 44 | <dt><span·class="sect1"><a·href="devtut.html#idp64836792">7.9.·Finished</a></span></dt> |
45 | </dl></dd> | 45 | </dl></dd> |
46 | <dt><span·class="chapter"><a·href="scripts.html">8.·Script·files</a></span></dt> | 46 | <dt><span·class="chapter"><a·href="scripts.html">8.·Script·files</a></span></dt> |
47 | <dt><span·class="chapter"><a·href="defs.html">9.·The·definitions·script</a></span></dt> | 47 | <dt><span·class="chapter"><a·href="defs.html">9.·The·definitions·script</a></span></dt> |
48 | <dd><dl> | 48 | <dd><dl> |
49 | <dt><span·class="sect1"><a·href="defs.html#idp64 | 49 | <dt><span·class="sect1"><a·href="defs.html#idp64989112">9.1.·Requiring·a·Buildtool·version</a></span></dt> |
50 | <dt><span·class="sect1"><a·href="defs.html#idp64 | 50 | <dt><span·class="sect1"><a·href="defs.html#idp64992440">9.2.·Package·information</a></span></dt> |
51 | <dt><span·class="sect1"><a·href="defs.html#idp6 | 51 | <dt><span·class="sect1"><a·href="defs.html#idp65011512">9.3.·Module·flags</a></span></dt> |
52 | <dt><span·class="sect1"><a·href="defs.html#idp6 | 52 | <dt><span·class="sect1"><a·href="defs.html#idp65022392">9.4.·Example</a></span></dt> |
53 | </dl></dd> | 53 | </dl></dd> |
54 | <dt><span·class="chapter"><a·href="docs.html">10.·The·documentation·script</a></span></dt> | 54 | <dt><span·class="chapter"><a·href="docs.html">10.·The·documentation·script</a></span></dt> |
55 | <dd><dl><dt><span·class="sect1"><a·href="docs.html#idp6 | 55 | <dd><dl><dt><span·class="sect1"><a·href="docs.html#idp65081016">10.1.·Example</a></span></dt></dl></dd> |
56 | <dt><span·class="chapter"><a·href="config.html">11.·The·configuration·script</a></span></dt> | 56 | <dt><span·class="chapter"><a·href="config.html">11.·The·configuration·script</a></span></dt> |
57 | <dd><dl> | 57 | <dd><dl> |
58 | <dt><span·class="sect1"><a·href="config.html#idp6 | 58 | <dt><span·class="sect1"><a·href="config.html#idp65100984">11.1.·Script·structure</a></span></dt> |
59 | <dt><span·class="sect1"><a·href="config.html#idp6 | 59 | <dt><span·class="sect1"><a·href="config.html#idp65110072">11.2.·Printing·messages</a></span></dt> |
60 | <dd><dl> | 60 | <dd><dl> |
61 | <dt><span·class="sect2"><a·href="config.html#idp6 | 61 | <dt><span·class="sect2"><a·href="config.html#idp65112376">11.2.1.·Error·messages</a></span></dt> |
62 | <dt><span·class="sect2"><a·href="config.html#idp6 | 62 | <dt><span·class="sect2"><a·href="config.html#idp65118520">11.2.2.·Warning·messages</a></span></dt> |
63 | <dt><span·class="sect2"><a·href="config.html#idp6 | 63 | <dt><span·class="sect2"><a·href="config.html#idp65124664">11.2.3.·Summary·messages</a></span></dt> |
64 | <dt><span·class="sect2"><a·href="config.html#idp6 | 64 | <dt><span·class="sect2"><a·href="config.html#idp65130808">11.2.4.·Check·messages</a></span></dt> |
65 | </dl></dd> | 65 | </dl></dd> |
66 | <dt><span·class="sect1"><a·href="config.html#idp6 | 66 | <dt><span·class="sect1"><a·href="config.html#idp65140280">11.3.·Customizable·directories·and·features</a></span></dt> |
67 | <dd><dl> | 67 | <dd><dl> |
68 | <dt><span·class="sect2"><a·href="config.html#idp6 | 68 | <dt><span·class="sect2"><a·href="config.html#idp65142072">11.3.1.·Directories</a></span></dt> |
69 | <dt><span·class="sect2"><a·href="config.html#idp6 | 69 | <dt><span·class="sect2"><a·href="config.html#idp65163192">11.3.2.·Features</a></span></dt> |
70 | </dl></dd> | 70 | </dl></dd> |
71 | <dt><span·class="sect1"><a·href="config.html#subrload">11.4.·Loading·subroutine·modules</a></span></dt> | 71 | <dt><span·class="sect1"><a·href="config.html#subrload">11.4.·Loading·subroutine·modules</a></span></dt> |
72 | <dt><span·class="sect1"><a·href="config.html#idp6 | 72 | <dt><span·class="sect1"><a·href="config.html#idp65194936">11.5.·Variables·and·results</a></span></dt> |
73 | <dd><dl> | 73 | <dd><dl> |
74 | <dt><span·class="sect2"><a·href="config.html#bt_generate_output">11.5.1.·Generating·output·files</a></span></dt> | 74 | <dt><span·class="sect2"><a·href="config.html#bt_generate_output">11.5.1.·Generating·output·files</a></span></dt> |
75 | <dt><span·class="sect2"><a·href="config.html#idp6 | 75 | <dt><span·class="sect2"><a·href="config.html#idp65220664">11.5.2.·Generating·a·C/C++·configuration·header</a></span></dt> |
76 | </dl></dd> | 76 | </dl></dd> |
77 | <dt><span·class="sect1"><a·href="config.html#languages">11.6.·Languages·support</a></span></dt> | 77 | <dt><span·class="sect1"><a·href="config.html#languages">11.6.·Languages·support</a></span></dt> |
78 | <dt><span·class="sect1"><a·href="config.html#idp6 | 78 | <dt><span·class="sect1"><a·href="config.html#idp65242936">11.7.·Standard·checks</a></span></dt> |
79 | <dd><dl> | 79 | <dd><dl> |
80 | <dt><span·class="sect2"><a·href="config.html#envs">11.7.1.·Checking·for·build·environments</a></span></dt> | 80 | <dt><span·class="sect2"><a·href="config.html#envs">11.7.1.·Checking·for·build·environments</a></span></dt> |
81 | <dt><span·class="sect2"><a·href="config.html#progs">11.7.2.·Checking·for·programs</a></span></dt> | 81 | <dt><span·class="sect2"><a·href="config.html#progs">11.7.2.·Checking·for·programs</a></span></dt> |
82 | <dt><span·class="sect2"><a·href="config.html#idp6 | 82 | <dt><span·class="sect2"><a·href="config.html#idp65350584">11.7.3.·Checking·for·header·files</a></span></dt> |
83 | <dt><span·class="sect2"><a·href="config.html#idp6 | 83 | <dt><span·class="sect2"><a·href="config.html#idp65369656">11.7.4.·Checking·for·system·specific·functions</a></span></dt> |
84 | <dt><span·class="sect2"><a·href="config.html#idp6 | 84 | <dt><span·class="sect2"><a·href="config.html#idp65379000">11.7.5.·Checking·for·libraries</a></span></dt> |
85 | <dt><span·class="sect2"><a·href="config.html#idp6 | 85 | <dt><span·class="sect2"><a·href="config.html#idp65393208">11.7.6.·Miscellaneous·checks</a></span></dt> |
86 | </dl></dd> | 86 | </dl></dd> |
87 | <dt><span·class="sect1"><a·href="config.html#stdsubrs">11.8.·Standard·subroutine·modules</a></span></dt> | 87 | <dt><span·class="sect1"><a·href="config.html#stdsubrs">11.8.·Standard·subroutine·modules</a></span></dt> |
88 | <dd><dl> | 88 | <dd><dl> |
89 | <dt><span·class="sect2"><a·href="config.html#pkgconfig.subr">11.8.1.·The·pkgconfig·module</a></span></dt> | 89 | <dt><span·class="sect2"><a·href="config.html#pkgconfig.subr">11.8.1.·The·pkgconfig·module</a></span></dt> |
90 | <dt><span·class="sect2"><a·href="config.html#idp65 | 90 | <dt><span·class="sect2"><a·href="config.html#idp65485624">11.8.2.·The·pthread·module</a></span></dt> |
91 | <dt><span·class="sect2"><a·href="config.html#idp65 | 91 | <dt><span·class="sect2"><a·href="config.html#idp65495224">11.8.3.·The·x11·module</a></span></dt> |
92 | </dl></dd> | 92 | </dl></dd> |
93 | </dl></dd> | 93 | </dl></dd> |
94 | <dt><span·class="chapter"><a·href="logic.html">12.·Logic·scripts</a></span></dt> | 94 | <dt><span·class="chapter"><a·href="logic.html">12.·Logic·scripts</a></span></dt> |
95 | <dd><dl> | 95 | <dd><dl> |
96 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 96 | <dt><span·class="sect1"><a·href="logic.html#idp65937976">12.1.·Adding·targets</a></span></dt> |
97 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 97 | <dt><span·class="sect1"><a·href="logic.html#idp65948344">12.2.·Top·level·script·file</a></span></dt> |
98 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 98 | <dt><span·class="sect1"><a·href="logic.html#idp65958456">12.3.·Target·definitions</a></span></dt> |
99 | <dt><span·class="sect1"><a·href="logic.html#ppstage">12.4.·Pre/post·actions·for·stages</a></span></dt> | 99 | <dt><span·class="sect1"><a·href="logic.html#ppstage">12.4.·Pre/post·actions·for·stages</a></span></dt> |
100 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 100 | <dt><span·class="sect1"><a·href="logic.html#idp65986232">12.5.·Pre/post·actions·for·target·stages</a></span></dt> |
101 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 101 | <dt><span·class="sect1"><a·href="logic.html#idp65988536">12.6.·Overriding·stages·for·specific·targets</a></span></dt> |
102 | <dt><span·class="sect1"><a·href="logic.html#idp65 | 102 | <dt><span·class="sect1"><a·href="logic.html#idp65990584">12.7.·Standard·types</a></span></dt> |
103 | <dd><dl> | 103 | <dd><dl> |
104 | <dt><span·class="sect2"><a·href="logic.html#logic_program">12.7.1.·The·program·type</a></span></dt> | 104 | <dt><span·class="sect2"><a·href="logic.html#logic_program">12.7.1.·The·program·type</a></span></dt> |
105 | <dt><span·class="sect2"><a·href="logic.html#logic_library">12.7.2.·The·library·type</a></span></dt> | 105 | <dt><span·class="sect2"><a·href="logic.html#logic_library">12.7.2.·The·library·type</a></span></dt> |
106 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 106 | <dt><span·class="sect2"><a·href="logic.html#idp66021816">12.7.3.·The·archive·type</a></span></dt> |
107 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 107 | <dt><span·class="sect2"><a·href="logic.html#idp66025272">12.7.4.·The·shlib·type</a></span></dt> |
108 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 108 | <dt><span·class="sect2"><a·href="logic.html#idp66033848">12.7.5.·The·convert·type</a></span></dt> |
109 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 109 | <dt><span·class="sect2"><a·href="logic.html#idp66046392">12.7.6.·The·output·type</a></span></dt> |
110 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 110 | <dt><span·class="sect2"><a·href="logic.html#idp66052792">12.7.7.·The·texinfo·type</a></span></dt> |
111 | <dt><span·class="sect2"><a·href="logic.html#idp6 | 111 | <dt><span·class="sect2"><a·href="logic.html#idp66057272">12.7.8.·The·qt_program·type</a></span></dt> |
112 | </dl></dd> | 112 | </dl></dd> |
113 | </dl></dd> | 113 | </dl></dd> |
114 | <dt><span·class="chapter"><a·href="bt_lint.html">13.·Verifying·a·package</a></span></dt> | 114 | <dt><span·class="chapter"><a·href="bt_lint.html">13.·Verifying·a·package</a></span></dt> |
115 | <dd><dl> | 115 | <dd><dl> |
116 | <dt><span·class="sect1"><a·href="bt_lint.html#idp6 | 116 | <dt><span·class="sect1"><a·href="bt_lint.html#idp66230712">13.1.·Buildtool·standards</a></span></dt> |
117 | <dd><dl><dt><span·class="sect2"><a·href="bt_lint.html#idp6 | 117 | <dd><dl><dt><span·class="sect2"><a·href="bt_lint.html#idp66231736">13.1.1.·Standard·documents</a></span></dt></dl></dd> |
118 | </dl></dd> | 118 | </dl></dd> |
119 | <dt><span·class="chapter"><a·href="bt_dist.html">14.·Creating·distribution·files</a></span></dt> | 119 | <dt><span·class="chapter"><a·href="bt_dist.html">14.·Creating·distribution·files</a></span></dt> |
120 | <dd><dl><dt><span·class="sect1"><a·href="bt_dist.html#idp6 | 120 | <dd><dl><dt><span·class="sect1"><a·href="bt_dist.html#idp66284984">14.1.·Supported·formats</a></span></dt></dl></dd> |
121 | <dt><span·class="chapter"><a·href="bt_pkgflags.html">15.·Package·flags</a></span></dt> | 121 | <dt><span·class="chapter"><a·href="bt_pkgflags.html">15.·Package·flags</a></span></dt> |
122 | <dd><dl> | 122 | <dd><dl> |
123 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#idp6 | 123 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#idp66316472">15.1.·The·bt_pkgflags·module</a></span></dt> |
124 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#pkgflags">15.2.·Pkgflags·file·format</a></span></dt> | 124 | <dt><span·class="sect1"><a·href="bt_pkgflags.html#pkgflags">15.2.·Pkgflags·file·format</a></span></dt> |
125 | </dl></dd> | 125 | </dl></dd> |
126 | <dt><span·class="chapter"><a·href="bt_wizard.html">16.·The·project·wizard</a></span></dt> | 126 | <dt><span·class="chapter"><a·href="bt_wizard.html">16.·The·project·wizard</a></span></dt> |
127 | </dl> | 127 | </dl> |
128 | </div> | 128 | </div> |
129 | </div> | 129 | </div> |
130 | <div·class="navfooter"> | 130 | <div·class="navfooter"> |