Builder.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Class Builder</title>
  5. <link rel="stylesheet" type="text/css" href="doc.css" />
  6. </head>
  7. <body>
  8. <div class='body'>
  9. <div class="content">
  10. <a name='top'></a>
  11. <h1 class='className'>Builder</h1>
  12. <div class='classBlock'>
  13. <table class='classHead' title='Builder'>
  14. <tr><td><strong>Module</strong></td><td>embedthis.me</td></tr>
  15. <tr><td><strong>Definition</strong></td><td> class Builder</td></tr>
  16. <tr><td><strong>Inheritance</strong></td><td>Builder <img src='images/inherit.gif' alt='inherit'/> <a href='Object.html'>Object</a><tr><td><strong>Stability</strong></td><td>Prototype.</td></tr>
  17. </td></tr>
  18. </table>
  19. <p class='classBrief'>The Builder Class implements the core building functions for MakeMe.</p>
  20. </div>
  21. <hr />
  22. <a name='Properties'></a>
  23. <h2 class='classSection'>Properties</h2>
  24. <table class='itemTable' title='properties'>
  25. <tr><th>Qualifiers</th><th>Property</th><th>Type</th><th width='95%'>Description</th></tr>
  26. <a name='ALL'></a>
  27. <tr><td nowrap align='center'>static const </td><td>ALL</td><td>&nbsp;</td><td>Default goal to build all. Set to 'all'.</td></tr>
  28. <a name='TargetsToBuildByDefault'></a>
  29. <tr><td nowrap align='center'>static const </td><td>TargetsToBuildByDefault</td><td>&nbsp;</td><td>List of targets to build by default. Defaults to 'exe', 'file', 'lib' and 'header'.</td></tr>
  30. <a name='TargetsToClean'></a>
  31. <tr><td nowrap align='center'>static const </td><td>TargetsToClean</td><td>&nbsp;</td><td>List of targets to clean by default. Defaults to 'exe', 'file', 'lib' and 'obj'.</td></tr>
  32. <a name='goal'></a>
  33. <tr><td nowrap align='center'></td><td>goal</td><td><a href='String.html'>String</a></td><td>Current goal. </td></tr>
  34. <a name='localPlatform'></a>
  35. <tr><td nowrap align='center'></td><td>localPlatform</td><td><a href='String.html'>String</a></td><td>Local platform string of the form OS-ARCH-PROFILE. </td></tr>
  36. <a name='topTargets'></a>
  37. <tr><td nowrap align='center'></td><td>topTargets</td><td><a href='Array.html'>Array</a></td><td>Top-level targets to build. </td></tr>
  38. </table>
  39. <p class='inheritedLink'><a href='Object.html#Properties'><i>Inherited Properties</i></a></p>
  40. <hr />
  41. <a name='ClassMethods'></a>
  42. <h2 class='classSection'>Builder Class Methods</h2>
  43. <table class='apiIndex' title='methods'>
  44. <tr><th>Qualifiers</th><th width='95%'>Method</th></tr>
  45. <p>(No own class methods defined)</p></table>
  46. <p class='inheritedLink'><a href='Object.html#InstanceMethods'><i>Inherited Methods</i></a></p>
  47. <hr />
  48. <a name='InstanceMethods'></a>
  49. <h2 class='classSection'>Builder Instance Methods</h2>
  50. <table class='apiIndex' title='methods'>
  51. <tr><th>Qualifiers</th><th width='95%'>Method</th></tr>
  52. <tr class='apiDef'><td class='apiType'></td><td><a href='#build'><b>build</b></a>(goals: <a href='Array.html'>Array</a> = expression)</tr><tr class='apiBrief'><td>&nbsp;</td><td>Build all required targets for the requested goals.</td></tr>
  53. <tr class='apiDef'><td class='apiType'></td><td><a href='#mapLibPaths'><b>mapLibPaths</b></a>(libpaths: <a href='Array.html'>Array</a>, base: <a href='Path.html'>Path</a> = expression): <a href='String.html'>String</a></tr><tr class='apiBrief'><td>&nbsp;</td><td>Map library paths to a base.</td></tr>
  54. <tr class='apiDef'><td class='apiType'></td><td><a href='#run'><b>run</b></a>(command, copt = expression): <a href='String.html'>String</a></tr><tr class='apiBrief'><td>&nbsp;</td><td>Run a command and trace output if copt.show or options.show.</td></tr>
  55. <tr class='apiDef'><td class='apiType'></td><td><a href='#watch'><b>watch</b></a>(start: <a href='Path.html'>Path</a>, goals = expression)</tr><tr class='apiBrief'><td>&nbsp;</td><td>Watch for changes and rebuild as required.</td></tr>
  56. <tr class='apiDef'><td class='apiType'></td><td><a href='#whyRebuild'><b>whyRebuild</b></a>(path: <a href='Path.html'>Path</a>, tag: <a href='String.html'>String</a>, msg: <a href='String.html'>String</a>)</tr><tr class='apiBrief'><td>&nbsp;</td><td>Emit trace for me --why on why a target is being rebuilt.</td></tr>
  57. <tr class='apiDef'><td class='apiType'></td><td><a href='#whySkip'><b>whySkip</b></a>(name: <a href='String.html'>String</a>, msg: <a href='String.html'>String</a>)</tr><tr class='apiBrief'><td>&nbsp;</td><td>Emit trace for me --why on why a target is being skipped.</td></tr>
  58. </table>
  59. <p class='inheritedLink'><a href='Object.html#InstanceMethods'><i>Inherited Methods</i></a></p>
  60. <hr />
  61. <h2>Method Detail</h2>
  62. <a name='build'></a>
  63. <div class='api'>
  64. <div class='apiSig'> build(goals: <a href='Array.html'>Array</a> = expression)
  65. </div>
  66. <div class='apiDetail'>
  67. <dl><dt>Description</dt></dd><dd>Build all required targets for the requested goals. </dd></dl>
  68. <dl><dt>Parameters</dt>
  69. <dd><table class='parameters' title='parameters'>
  70. <tr class='param'><td class='param'>goals: <a href='Array.html'>Array</a> </td><td>null [default: expression]</td></tr></table></dd>
  71. </dl></div>
  72. </div>
  73. <hr />
  74. <a name='mapLibPaths'></a>
  75. <div class='api'>
  76. <div class='apiSig'> mapLibPaths(libpaths: <a href='Array.html'>Array</a>, base: <a href='Path.html'>Path</a> = expression): <a href='String.html'>String</a>
  77. </div>
  78. <div class='apiDetail'>
  79. <dl><dt>Description</dt></dd><dd>Map library paths to a base. </dd></dl>
  80. <dl><dt>Parameters</dt>
  81. <dd><table class='parameters' title='parameters'>
  82. <tr class='param'><td class='param'>libpaths: <a href='Array.html'>Array</a> </td><td>Array of library search paths.</td></tr><tr class='param'><td class='param'>base: <a href='Path.html'>Path</a> </td><td>Base directory from which the paths should be resolved. Defaults to the current directory. [default: expression]</td></tr></table></dd>
  83. </dl><dl><dt>Returns</dt>
  84. <dd>Linker library search path options.</dd></dl>
  85. </div>
  86. </div>
  87. <hr />
  88. <a name='run'></a>
  89. <div class='api'>
  90. <div class='apiSig'> run(command, copt = expression): <a href='String.html'>String</a>
  91. </div>
  92. <div class='apiDetail'>
  93. <dl><dt>Description</dt></dd><dd>Run a command and trace output if copt.show or options.show. </dd></dl>
  94. <dl><dt>Parameters</dt>
  95. <dd><table class='parameters' title='parameters'>
  96. <tr class='param'><td class='param'>command </td><td>Command to run. May be an array of args or a string.</td></tr><tr class='param'><td class='param'>copt </td><td>Options. These are also passed to <a href='#Cmd'>Cmd</a>. [default: expression]</td></tr></table></dd>
  97. </dl><dl><dt>Options</dt>
  98. <dd><table class='parameters' title='options'>
  99. <td class='param'>dir</td><td>Change to given directory to run the command.</td></tr>
  100. <td class='param'>filter</td><td>Do not display output to the console if it contains the specified filter pattern. Set to true to filter (not display) any output. Note the command always returns the command output as the function result.</td></tr>
  101. <td class='param'>generate</td><td>Generate in projects. Defaults to true.</td></tr>
  102. <td class='param'>noshow</td><td>Do not show the command line before executing. Useful to override me --show for one command.</td></tr>
  103. <td class='param'>nostop</td><td>Continue processing even if this command is not successful.</td></tr>
  104. <td class='param'>show</td><td>Show the command line before executing. Similar to me --show, but operates on just this command.</td></tr>
  105. <td class='param'>timeout</td><td>Timeout for the command to complete Note: do not use the Cmd options: noio, detach. Use Cmd APIs directly.</td></tr>
  106. </table></dd>
  107. </dl></div>
  108. </div>
  109. <hr />
  110. <a name='watch'></a>
  111. <div class='api'>
  112. <div class='apiSig'> watch(start: <a href='Path.html'>Path</a>, goals = expression)
  113. </div>
  114. <div class='apiDetail'>
  115. <dl><dt>Description</dt></dd><dd>Watch for changes and rebuild as required. The sleep period is defined via --watch.</dd></dl>
  116. <dl><dt>Parameters</dt>
  117. <dd><table class='parameters' title='parameters'>
  118. <tr class='param'><td class='param'>goals </td><td>null [default: expression]</td></tr></table></dd>
  119. </dl></div>
  120. </div>
  121. <hr />
  122. <a name='whyRebuild'></a>
  123. <div class='api'>
  124. <div class='apiSig'> whyRebuild(path: <a href='Path.html'>Path</a>, tag: <a href='String.html'>String</a>, msg: <a href='String.html'>String</a>)
  125. </div>
  126. <div class='apiDetail'>
  127. <dl><dt>Description</dt></dd><dd>Emit trace for me --why on why a target is being rebuilt. </dd></dl>
  128. <dl><dt>Parameters</dt>
  129. <dd><table class='parameters' title='parameters'>
  130. <tr class='param'><td class='param'>path: <a href='Path.html'>Path</a> </td><td>Target path being considered.</td></tr><tr class='param'><td class='param'>tag: <a href='String.html'>String</a> </td><td>Informational tag emitted before the message.</td></tr><tr class='param'><td class='param'>msg: <a href='String.html'>String</a> </td><td>Message to display.</td></tr></table></dd>
  131. </dl></div>
  132. </div>
  133. <hr />
  134. <a name='whySkip'></a>
  135. <div class='api'>
  136. <div class='apiSig'> whySkip(name: <a href='String.html'>String</a>, msg: <a href='String.html'>String</a>)
  137. </div>
  138. <div class='apiDetail'>
  139. <dl><dt>Description</dt></dd><dd>Emit trace for me --why on why a target is being skipped. </dd></dl>
  140. <dl><dt>Parameters</dt>
  141. <dd><table class='parameters' title='parameters'>
  142. <tr class='param'><td class='param'>name: <a href='String.html'>String</a> </td><td>Target path being considered.</td></tr><tr class='param'><td class='param'>msg: <a href='String.html'>String</a> </td><td>Message to display.</td></tr></table></dd>
  143. </dl></div>
  144. </div>
  145. <hr />
  146. <div class="terms">
  147. <p class="terms">
  148. <a href="https://www.embedthis.com/"> Embedthis Software LLC, 2003-2014. All rights reserved. Embedthis is a trademark of Embedthis Software LLC.</a>
  149. </p>
  150. </div></div>
  151. </div>
  152. </body>
  153. </html>