Changeset 50
- Timestamp:
- 10/15/06 23:38:01 (5 years ago)
- Files:
-
- downloads/bud-3.04.doc.zip (added)
- downloads/bud-3.04.src.zip (added)
- downloads/bud_win_3.04.dbg.exe (added)
- downloads/bud_win_3.04.exe (added)
- trunk/Docs/User_Manual.html (modified) (8 diffs)
- trunk/Docs/autobuild.html (modified) (5 diffs)
- trunk/Docs/change_log.html (modified) (6 diffs)
- trunk/Docs/command_line.html (modified) (5 diffs)
- trunk/Docs/configuration_file.html (modified) (10 diffs)
- trunk/Docs/dlls.html (modified) (3 diffs)
- trunk/Docs/introduction.html (modified) (2 diffs)
- trunk/Docs/macros.html (modified) (5 diffs)
- trunk/Docs/pragmas.html (modified) (7 diffs)
- trunk/Docs/profile_file.html (modified) (2 diffs)
- trunk/Docs/response_file.html (modified) (2 diffs)
- trunk/Docs/rules.html (modified) (6 diffs)
- trunk/Docs/switches.html (modified) (25 diffs)
- trunk/Docs/todo.html (modified) (2 diffs)
- trunk/Source/build.d (modified) (133 diffs)
- trunk/Source/build_bn.d (modified) (1 diff)
- trunk/Source/debug.brf (modified) (1 diff)
- trunk/Source/default.rdf (modified) (1 diff)
- trunk/Source/docsrc/User_Manual.d (modified) (8 diffs)
- trunk/Source/docsrc/autobuild.d (modified) (5 diffs)
- trunk/Source/docsrc/change_log.d (modified) (5 diffs)
- trunk/Source/docsrc/command_line.d (modified) (5 diffs)
- trunk/Source/docsrc/configuration_file.d (modified) (10 diffs)
- trunk/Source/docsrc/dlls.d (modified) (3 diffs)
- trunk/Source/docsrc/introduction.d (modified) (1 diff)
- trunk/Source/docsrc/macros.d (modified) (5 diffs)
- trunk/Source/docsrc/pragmas.d (modified) (6 diffs)
- trunk/Source/docsrc/profile_file.d (modified) (2 diffs)
- trunk/Source/docsrc/response_file.d (modified) (1 diff)
- trunk/Source/docsrc/rules.d (modified) (5 diffs)
- trunk/Source/docsrc/switches.d (modified) (25 diffs)
- trunk/Source/docsrc/todo.d (modified) (1 diff)
- trunk/Source/docsrc/um.d (modified) (1 diff)
- trunk/Source/example_build.cfg (modified) (8 diffs)
- trunk/Source/full.brf (modified) (1 diff)
- trunk/Source/nix_dmd_build.cfg (modified) (2 diffs)
- trunk/Source/nix_gnu_build.cfg (modified) (2 diffs)
- trunk/Source/source.d (modified) (66 diffs)
- trunk/Source/source_bn.d (modified) (1 diff)
- trunk/Source/util/fdt.d (modified) (1 diff)
- trunk/Source/util/file2_bn.d (modified) (1 diff)
- trunk/Source/util/fileex.d (modified) (5 diffs)
- trunk/Source/util/fileex_bn.d (modified) (1 diff)
- trunk/Source/util/linetoken_bn.d (modified) (1 diff)
- trunk/Source/util/pathex.d (modified) (3 diffs)
- trunk/Source/util/pathex_bn.d (modified) (1 diff)
- trunk/Source/util/series.d (added)
- trunk/Source/util/str.d (modified) (8 diffs)
- trunk/Source/util/str_bn.d (modified) (1 diff)
- trunk/Source/win_dmd_build.cfg (modified) (3 diffs)
- trunk/Source/win_gnu_build.cfg (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Docs/User_Manual.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="description">Topic: Description</a></h1> 15 <div class="section"> Buildis a tool to assist building applications and libraries written15 <div class="section"><i>Bud</i> is a tool to assist building applications and libraries written 16 16 using the D programming language. 17 17 </div> … … 19 19 20 20 <h1 class="abstract">Abstract</h1><p class="abstract">It is an effective replacement for 21 the general 'make' tools. The primary difference between <i>Bu ild</i> and22 other tools is that <i>Bu ild</i> does not need you to create and maintain21 the general 'make' tools. The primary difference between <i>Bud</i> and 22 other tools is that <i>Bud</i> does not need you to create and maintain 23 23 'makefiles'. Instead, it analyses the source code files to determine 24 24 all dependancies and constructs the appropriate calls to the compiler, 25 25 linker and librarian. 26 26 <br/> <br/> 27 The aim of <i>Bu ild</i> is to create a target file from the source file(s)27 The aim of <i>Bud</i> is to create a target file from the source file(s) 28 28 supplied to it. This is usually an executable file but could also be 29 29 a library. In both cases, source files are converted to object files, and … … 41 41 42 42 <li><a href="pragmas.html">Pragmas</a></li> 43 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_build"> Build</a></span></li>44 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_build_def"> Build Def</a></span></li>45 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_export_version"> Export Version</a></span></li>46 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_ignore"> Ignore</a></span></li>47 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_include"> Include</a></span></li>48 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_link"> Link</a></span></li>49 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_nolink"> Nolink</a></span></li>50 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_target"> Target</a></span></li>43 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_build">build</a></span></li> 44 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_build_def">build def</a></span></li> 45 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_export_version">export version</a></span></li> 46 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_ignore">ignore</a></span></li> 47 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_include">include</a></span></li> 48 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_link">link</a></span></li> 49 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_nolink">nolink</a></span></li> 50 <li class="indent"><span class="subtoc"><a href="pragmas.html#pragma_target">target</a></span></li> 51 51 52 <li><a href="autobuild.html">Auto Build Number</a></li>52 <li><a href="autobuild.html">Automatic build number</a></li> 53 53 54 54 <li><a href="rules.html">Rule Definition File</a></li> … … 62 62 <li class="indent"><span class="subtoc"><a href="switches.html#switch_allobj">-allobj</a></span></li> 63 63 <li class="indent"><span class="subtoc"><a href="switches.html#switch_autowinlibs">-AutoWinLibs</a></span></li> 64 <li class="indent"><span class="subtoc"><a href="switches.html#switch_BCFPATH">-BCFPATH</a></span></li> 64 65 <li class="indent"><span class="subtoc"><a href="switches.html#switch_CFPATH">-CFPATH</a></span></li> 65 66 <li class="indent"><span class="subtoc"><a href="switches.html#switch_cleanup">-clean</a></span></li> … … 67 68 <li class="indent"><span class="subtoc"><a href="switches.html#switch_DCPATH">-DCPATH</a></span></li> 68 69 <li class="indent"><span class="subtoc"><a href="switches.html#switch_dll">-dll</a></span></li> 70 <li class="indent"><span class="subtoc"><a href="switches.html#switch_emptyargs">-emptyargs</a></span></li> 69 71 <li class="indent"><span class="subtoc"><a href="switches.html#switch_exec">-exec<args></a></span></li> 72 <li class="indent"><span class="subtoc"><a href="switches.html#switch_explicit">-explicit</a></span></li> 70 73 <li class="indent"><span class="subtoc"><a href="switches.html#switch_full">-full</a></span></li> 71 74 <li class="indent"><span class="subtoc"><a href="switches.html#switch_gui">-gui</a></span></li> … … 95 98 <li class="indent"><span class="subtoc"><a href="switches.html#switch_uses">-uses</a></span></li> 96 99 <li class="indent"><span class="subtoc"><a href="switches.html#switch_UMB">-UMB</a></span></li> 100 <li class="indent"><span class="subtoc"><a href="switches.html#switch_usefinal">-usefinal=<yes/no></a></span></li> 97 101 <li class="indent"><span class="subtoc"><a href="switches.html#switch_v">-v (lowercase)</a></span></li> 98 102 <li class="indent"><span class="subtoc"><a href="switches.html#switch_V">-V (uppercase)</a></span></li> … … 111 115 <div class="section"><h2 class="section"><a name="authors">Authors:<span class="secdef">Derek Parnell - Melbourne</span></a></h2></div> 112 116 <div class="section"><h2 class="section"><a name="create">Initial Creation:<span class="secdef">January 2005</span></a></h2></div> 113 <div class="section"><h2 class="section"><a name="version">Version:<span class="secdef">3.0 3</span></a></h2></div>114 <div class="section"><h2 class="section"><a name="date">Date:<span class="secdef"> 20 September 2006</span></a></h2></div>117 <div class="section"><h2 class="section"><a name="version">Version:<span class="secdef">3.04</span></a></h2></div> 118 <div class="section"><h2 class="section"><a name="date">Date:<span class="secdef">16 October 2006</span></a></h2></div> 115 119 <div class="section"><h2 class="section"><a name="license">License:</a></h2> 116 120 <pre class="cite">This software is provided 'as-is', without any express or implied … … 139 143 140 144 141 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006145 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 142 146 </span></div> 143 147 </body> trunk/Docs/autobuild.html
r49 r50 10 10 11 11 12 <p class="page_title">Bu ild Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title">Bud Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 <h1 class="topic"><a name="autobuild">Topic: Auto Build Number</a></h1>15 <div class="section">Automatically Incremented Build Numbering for Modules14 <h1 class="topic"><a name="autobuild">Topic: Automatic build number</a></h1> 15 <div class="section">Automatically incremented build numbering for Modules 16 16 You can optionally specify that the <i>build</i> utility automatically 17 17 increments a build number for any module. You do this by supplying … … 37 37 You can access the build number from within the module thus ... <br> 38 38 39 <pre class="code">writefln(" Build number is %d", auto_build_number);39 <pre class="code">writefln("The application build number is %d", auto_build_number); 40 40 </pre> 41 41 You can access the build numbers of other modules in you application … … 54 54 The "_bn.d" file created by <i>build</i> for this module would look like ... <br> 55 55 <pre class="code">module parser_bn; 56 /// This file is automatically maintained by the B UILDutility,56 /// This file is automatically maintained by the Bud utility, 57 57 /// Please refrain from manually editing it. 58 58 long auto_build_number = 77; … … 60 60 61 61 Of course the number <i>77</i> is just an example. This number would actually 62 start at 1 and increment whenever <i>Bu ild</i> needed to create a new object62 start at 1 and increment whenever <i>Bud</i> needed to create a new object 63 63 file for the module. 64 64 </div> … … 66 66 67 67 68 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:49200668 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 69 69 </span></div> 70 70 </body> trunk/Docs/change_log.html
r49 r50 14 14 <h1 class="topic"><a name="change_log">Topic: Change Log</a></h1> 15 15 <div class="section">A list of changes and fixes that have been made. 16 17 <h3 class="subsection"><a name="">v3.04 -- /October/2006 </a></h3> 18 <div class="list"><ul> <li class="item">** <b>FIX:</b> Correctly handle INIT:CompilerExe from configuration file 19 20 <li class="item">** <b>FIX:</b> Correctly handles version platform statements. 21 22 <li class="item">** <b>FIX:</b> Correctly handles the #! arguments. 23 24 <li class="item">** <b>FIX:</b> Sets default OutFileSwitch for GDC to "-o " 25 26 <li class="item">** <b>FIX:</b> Sets default Shared Library Extension for unix to "so" 27 28 <li class="item">** <b>FIX:</b> Sets default Linker 'lib' switch for GNU tools to "-l" 29 30 <li class="item">** <b>FIX:</b> The auto-build-number facility has been repaired. 31 32 <li class="item">** <b>FIX:</b> No longer runs any FINAL commands if the compile failed. 33 34 <li class="item">** <b>FIX: Ticket #38</b> Now correctly handles paths enclosed in quotes. 35 36 <li class="item">** <b>ENH:</b> A new <i>-explicit</i> switch will cause only the 37 files explicitly named on the command line to be compiled. All other 38 files, such as imported ones, are processed but not compiled. 39 40 <li class="item">** <b>ENH:</b> A new <i>-usefinal</i> switch to control the usage of 41 FINAL statements defined in the configuration file. 42 43 <li class="item">** <b>ENH:</b> A new <i>-emptyargs</i> switch to control whether or 44 not to abort if there are any empty arguments on the command line. 45 46 <li class="item">** <b>ENH:</b> A new <i>-BCFPATH</i> switch to define an alternative 47 location for <i>Bud</i> configuration files. This can also be supplied as 48 an environment switch. 49 50 </ul></div> 16 51 17 52 <h3 class="subsection"><a name="">v3.03 -- 20/September/2006 </a></h3> … … 118 153 119 154 <li class="item">** <b>FIX: Ticket #9 </b> Now, if the output file created by the 120 rule ends with the library exten tion, it is presented to the linker155 rule ends with the library extension, it is presented to the linker 121 156 as a library rather than an object file. 122 157 … … 142 177 'std' modules. 143 178 144 <li class="item">** <b>ENH: </b> Any file name on the command line with an exten tion145 of <i>".brf" </i> will be used as a <a href="response_file.html"> BuildResponse File</a>179 <li class="item">** <b>ENH: </b> Any file name on the command line with an extension 180 of <i>".brf" </i> will be used as a <a href="response_file.html"><i>Bud</i> Response File</a> 146 181 147 182 148 183 <li class="item">** <b>ENH: </b> If there is nothing on the command line and the 149 184 file 'build.brf' exists in the current directory, then it will be 150 used as the <a href="response_file.html"> BuildResponse File</a> for this run.185 used as the <a href="response_file.html"><i>Bud</i> Response File</a> for this run. 151 186 152 187 … … 216 251 217 252 <h3 class="subsection"><a name="">v2.10 -- 06/Apr/2006 </a></h3> 218 <div class="list"><ul> <li class="item">** <b>FIX: </b> The default BuildResponse File invoked when just253 <div class="list"><ul> <li class="item">** <b>FIX: </b> The default <i>Bud</i> Response File invoked when just 219 254 placing '@' on the command line is now correctly named "build.brf" 220 255 <li class="item">** <b>ENH: </b> For Windows environments, command line files can now use … … 223 258 invoked via DMD. 224 259 <li class="item">** <b>ENH: </b> You can now specify the default linker switches in 225 the BuildConfiguration File.260 the <i>Bud</i> Configuration File. 226 261 <li class="item">** <b>ENH: </b> Using the new switch <i>-PP </i>, you can now 227 262 specify additional paths to search for files. … … 654 689 </div> 655 690 656 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006691 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 657 692 </span></div> 658 693 </body> trunk/Docs/command_line.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="command_line">Topic: Command Line</a></h1> 15 <div class="section">The <i>Bu ild</i> utility supplies the source file and optional switches via16 the command line. The typical format of the <i>Bu ild</i> utility's command15 <div class="section">The <i>Bud</i> utility supplies the source file and optional switches via 16 the command line. The typical format of the <i>Bud</i> utility's command 17 17 line is ... 18 18 <pre class="code"> <b>build</b> <sourcefile> [<switches> ] [<otherfiles> ] … … 21 21 You can however specify the files and switches in any order you like. 22 22 <br/> <br/> 23 Normally you would only supply a single file name to <i>Bu ild</i>, that being23 Normally you would only supply a single file name to <i>Bud</i>, that being 24 24 the source file of the top-level file in the application. Typically 25 25 the one that has the 'main()' or 'WinMain()' function, though this is … … 32 32 If you run the utility without any files and without any switches, it 33 33 display a <i>help</i> screen with some details about the switches. That looks 34 something likethis ...34 something similar to this ... 35 35 <pre class="code"> Path and Version : C:\Program Files\build.exe v3.6(339) 36 36 Usage: build sourcefile [options objectfiles libraries] … … 98 98 Note that the default for Windows <i>DigitalMars</i> is to use a response file 99 99 but for all other environments it is to use command line arguments. 100 <b>-info</b> Displays the version and path of the Buildapplication100 <b>-info</b> Displays the version and path of the <i>Bud</i> application 101 101 <b>-help</b> Displays the full 'usage' help text. 102 102 <b>-h</b> Same as /-help, displays the full 'usage' help text. … … 128 128 129 129 130 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006130 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 131 131 </span></div> 132 132 </body> trunk/Docs/configuration_file.html
r49 r50 5 5 <link rel="stylesheet" type="text/css" href="style.css" title="standard" > 6 6 <link rel="alternate stylesheet" type="text/css" href="none.css" title="none" > 7 <title>User Manual for B UILD</title>7 <title>User Manual for Bud</title> 8 8 </head> 9 <body><h1>User Manual for B UILD</h1><!-- Generated by Ddoc from configuration_file.d -->10 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>9 <body><h1>User Manual for Bud</h1><!-- Generated by Ddoc from configuration_file.d --> 10 11 12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="configuration_file">Topic: Configuration File</a></h1> 15 15 <div class="section">The utility's configuration file is used to specify your default options 16 16 for the utility. The file is called <b>build.cfg</b>. You can have from zero 17 to three configuration files because the <i>Build</i> utility looks in each 18 of three places for a configuration file, and it uses each one that it finds. 19 It looks in the folder that <i>Build</i> is installed, then in the folder 17 to four configuration files because the <i>Bud</i> utility looks in each 18 of four places for a configuration file, and it uses each one that it finds. 19 It looks in the folder that <i>Bud</i> is installed, then in a user defined 20 alternative path (defined by -BCFPATH switch), then in the folder 20 21 that the compiler is installed, and finally in the current folder. 22 <br/> <br/> 23 <b>Note:</b> The alternative location is optional. It can be specified in 24 an environment switch called BCFPATH or in a command line switch 25 of the same name, -BCFPATH. 21 26 <br/> <br/> 22 27 The configuration file consists of one or more command lines. … … 81 86 </pre> 82 87 <div class="indent"><div class="section">The identifiers for the settable strings are detailed below.</div> 83 <div class="tabrow1">ExeExten tion</div><div class="tabrow2">The file extention for executable files. <span class="eg">Example: "exe"</span></div>84 <div class="tabrow1">LibExten tion</div><div class="tabrow2">The file extention for library files.<span class="eg">Example: "lib"</span></div>85 <div class="tabrow1">ObjExten tion</div><div class="tabrow2">The file extention for object files.<span class="eg">Example: "obj"</span></div>86 <div class="tabrow1">ShrLibExten tion</div><div class="tabrow2">The file extention for shared libraries files.<span class="eg">Example: "dll"</span></div>87 <div class="tabrow1">SrcExten tion </div><div class="tabrow2">The file extention for D source files.<span class="eg">Example: "d"</span></div>88 <div class="tabrow1">MacroExten tion </div><div class="tabrow2"> The file extention for macro files.<span class="eg">Example: "mac"</span></div>89 <div class="tabrow1">DdocExten tion </div><div class="tabrow2">The file extention for D Documentation files.<span class="eg">Example: "ddoc"</span></div>88 <div class="tabrow1">ExeExtension</div><div class="tabrow2">The file extension for executable files. <span class="eg">Example: "exe"</span></div> 89 <div class="tabrow1">LibExtension</div><div class="tabrow2">The file extension for library files.<span class="eg">Example: "lib"</span></div> 90 <div class="tabrow1">ObjExtension</div><div class="tabrow2">The file extension for object files.<span class="eg">Example: "obj"</span></div> 91 <div class="tabrow1">ShrLibExtension</div><div class="tabrow2">The file extension for shared libraries files.<span class="eg">Example: "dll"</span></div> 92 <div class="tabrow1">SrcExtension </div><div class="tabrow2">The file extension for D source files.<span class="eg">Example: "d"</span></div> 93 <div class="tabrow1">MacroExtension </div><div class="tabrow2"> The file extension for macro files.<span class="eg">Example: "mac"</span></div> 94 <div class="tabrow1">DdocExtension </div><div class="tabrow2">The file extension for D Documentation files.<span class="eg">Example: "ddoc"</span></div> 90 95 <div class="tabrow1">CompilerExe </div><div class="tabrow2">The file name of the compiler.<span class="eg">Example: "dmd.exe"</span></div> 91 96 <div class="tabrow1">CompileOnly </div><div class="tabrow2">The switch that is passed to the compiler to tell … … 124 129 you don't specify any CompilerDefs, "-op" is 125 130 assumed.</div> 126 <div class="tabrow1">OutFileSwitch </div><div class="tabrow2">The switch tells <i>Bu ild</i>131 <div class="tabrow1">OutFileSwitch </div><div class="tabrow2">The switch tells <i>Bud</i> 127 132 where to create the executable file. <span class="eg">Example: "-of"</span></div> 128 133 <div class="tabrow1">ImportPath </div><div class="tabrow2">This is the switch for the compiler to tell it where … … 139 144 to insert symbolic debugging information into 140 145 the executable.<span class="eg">Example: "/co"</span></div> 141 <div class="tabrow1">BuildImportPath</div><div class="tabrow2">This is the switch for <i>Bu ild</i> to tell it146 <div class="tabrow1">BuildImportPath</div><div class="tabrow2">This is the switch for <i>Bud</i> to tell it 142 147 a path to scan for imported modules. <span class="eg">Example: "-I"</span></div> 143 <div class="tabrow1">ImportPathDelim</div><div class="tabrow2">This is the switch for <i>Bu ild</i> to tell it148 <div class="tabrow1">ImportPathDelim</div><div class="tabrow2">This is the switch for <i>Bud</i> to tell it 144 149 which character is used to delimit paths on 145 150 a BuildImportPath list. <span class="eg">Example: ";"</span></div> 146 <div class="tabrow1">OutputPath </div><div class="tabrow2">This is the switch for <i>Bu ild</i> to tell it151 <div class="tabrow1">OutputPath </div><div class="tabrow2">This is the switch for <i>Bud</i> to tell it 147 152 the path to use for all temporary output files. <span class="eg">Example: "-od"</span></div> 148 <div class="tabrow1">RunSwitch </div><div class="tabrow2">This is the switch for <i>Bu ild</i> to tell it153 <div class="tabrow1">RunSwitch </div><div class="tabrow2">This is the switch for <i>Bud</i> to tell it 149 154 to run the application once it successfully 150 155 compiles. <span class="eg">Example: "-exec"</span></div> … … 153 158 by a 'LIBCMD=' in the configuration file or 154 159 on the commandline. <span class="eg">Example: "c:\tools\"</span></div> 155 <div class="tabrow1">ResponseExt </div><div class="tabrow2">This is the file exten tion that Buildwill use160 <div class="tabrow1">ResponseExt </div><div class="tabrow2">This is the file extension that <i>Bud</i> will use 156 161 for its response files. <span class="eg">Example: "brf"</span></div> 157 <div class="tabrow1">DefResponseFile</div><div class="tabrow2">This is the name of <i>Build's</i> default162 <div class="tabrow1">DefResponseFile</div><div class="tabrow2">This is the name of the <i>Bud</i> default 158 163 response file. <span class="eg">Example: "build.brf"</span></div> 159 <div class="tabrow1">RDFName </div><div class="tabrow2">This is the name of <i>Build's</i> default164 <div class="tabrow1">RDFName </div><div class="tabrow2">This is the name of the <i>Bud</i> default 160 165 Rules Definition File. <span class="eg">Example: "default.rdf"</span></div> 161 <div class="tabrow1">DefMacroDefFile</div><div class="tabrow2">This is the name of <i>Build's</i> default166 <div class="tabrow1">DefMacroDefFile</div><div class="tabrow2">This is the name of the <i>Bud</i> default 162 167 Macro Definition File. <span class="eg">Example: "build.mdf"</span></div> 163 168 <div class="tabrow1">LinkerStdOut </div><div class="tabrow2">This is the commandline option given to the linker 164 when the <i>Bu ild</i> commandline has the <i>"-silent"</i>169 when the <i>Bud</i> commandline has the <i>"-silent"</i> 165 170 switch. <span class="eg">Example: ">nul"</span></div> 166 171 <div class="tabrow1">IgnoredModules </div><div class="tabrow2">This is a comma delimited list of modules or packages 167 to ignore. <i>Bu ild</i> will not scan these modules and172 to ignore. <i>Bud</i> will not scan these modules and 168 173 packages for dependancies. <span class="eg">Example: "std,dfl,dui"</span> 169 174 If none is specified by this configuration item then … … 200 205 </ul></div> 201 206 </div> 202 <div class="tabrow1">PathId </div><div class="tabrow2">The name of the environment symbol used by <i>Bu ild</i>207 <div class="tabrow1">PathId </div><div class="tabrow2">The name of the environment symbol used by <i>Bud</i> 203 208 when scanning for executables. <span class="eg">Example: "PATH"</span></div> 204 <div class="tabrow1">HomePathId </div><div class="tabrow2">The name of the environment symbol used by <i>Bu ild</i>209 <div class="tabrow1">HomePathId </div><div class="tabrow2">The name of the environment symbol used by <i>Bud</i> 205 210 when scanning for configuration file. <span class="eg">Example: "HOME"</span></div> 206 <div class="tabrow1">EtcPath </div><div class="tabrow2">The name of an alternative path used by <i>Bu ild</i>211 <div class="tabrow1">EtcPath </div><div class="tabrow2">The name of an alternative path used by <i>Bud</i> 207 212 when scanning for configuration file. <span class="eg">Example: "c:\etc\"</span></div> 208 <div class="tabrow1">GenDebugInfo </div><div class="tabrow2">The switch that tells <i>Bu ild</i> and the compiler213 <div class="tabrow1">GenDebugInfo </div><div class="tabrow2">The switch that tells <i>Bud</i> and the compiler 209 214 to insert debugging information into the object 210 215 files. <span class="eg">Example: "-g"</span></div> 211 <div class="tabrow1">ModOutPrefix </div><div class="tabrow2">If the <i>Bu ild</i> switch <i><span class="quote">"-modules"</span></i> was212 used, this defines the string which <i>Bu ild</i> will216 <div class="tabrow1">ModOutPrefix </div><div class="tabrow2">If the <i>Bud</i> switch <i><span class="quote">"-modules"</span></i> was 217 used, this defines the string which <i>Bud</i> will 213 218 begin the Modules List output file with. 214 219 <span class="eg">Example: "MODULES = \n"</span></div> 215 <div class="tabrow1">ModOutSuffix </div><div class="tabrow2">If the <i>Bu ild</i> switch <i><span class="quote">"-modules"</span></i> was216 used, this defines the string which <i>Bu ild</i> will220 <div class="tabrow1">ModOutSuffix </div><div class="tabrow2">If the <i>Bud</i> switch <i><span class="quote">"-modules"</span></i> was 221 used, this defines the string which <i>Bud</i> will 217 222 end the Modules List output file with. 218 223 <span class="eg">Example: ""</span></div> 219 <div class="tabrow1">ModOutBody </div><div class="tabrow2">If the <i>Bu ild</i> switch <i><span class="quote">"-modules"</span></i> was220 used, this defines the string which <i>Bu ild</i> will224 <div class="tabrow1">ModOutBody </div><div class="tabrow2">If the <i>Bud</i> switch <i><span class="quote">"-modules"</span></i> was 225 used, this defines the string which <i>Bud</i> will 221 226 use as a template for each module being listed. 222 227 <span class="eg">Example: " $(MODULE {mod})"</span> <br/> <br/> … … 224 229 name and {src} will be replaced with the source 225 230 file's name.</div> 226 <div class="tabrow1">ModOutDelim </div><div class="tabrow2">If the <i>Bu ild</i> switch <i><span class="quote">"-modules"</span></i> was227 used, this defines the string which <i>Bu ild</i> will231 <div class="tabrow1">ModOutDelim </div><div class="tabrow2">If the <i>Bud</i> switch <i><span class="quote">"-modules"</span></i> was 232 used, this defines the string which <i>Bud</i> will 228 233 insert in between each listed module. 229 234 <span class="eg">Example: "\n"</span></div> 230 <div class="tabrow1">ModOutFile </div><div class="tabrow2">If the <i>Bu ild</i> switch <i><span class="quote">"-modules"</span></i> was235 <div class="tabrow1">ModOutFile </div><div class="tabrow2">If the <i>Bud</i> switch <i><span class="quote">"-modules"</span></i> was 231 236 used, this defines the output file's suffix. This 232 237 is only used if the <i><span class="quote">"-modules"</span></i> switch … … 255 260 </div> 256 261 257 <p><span class="example"><i>Example:</i> </span></p><pre class="code">INIT:MacroExten tion = bmc262 <p><span class="example"><i>Example:</i> </span></p><pre class="code">INIT:MacroExtension = bmc 258 263 INIT:LinkerPath = /u2/qwerty/ 259 264 INIT:AssumedLibs = c,kde,mgui … … 263 268 <table class="conftab"> <thead class="confthead"> <td class="confthcell"><i>INIT:</i> item</td><td class="confthcell">DigitalMars-Windows</td><td class="confthcell">GDC-Windows</td><td class="confthcell">DigitalMars-Unix</td><td class="confthcell">GDC-Unix</td> 264 269 </thead> 265 <tr class="confrow"><td class="confcell"><strong>ExeExten tion</strong> </td><td class="confcell">exe </td><td class="confcell">exe </td><td class="confcell"> </td><td class="confcell"> </td></tr>266 <tr class="confrow"><td class="confcell"><strong>LibExten tion</strong> </td><td class="confcell">lib </td><td class="confcell">lib </td><td class="confcell">a </td><td class="confcell">a </td></tr>267 <tr class="confrow"><td class="confcell"><strong>ObjExten tion</strong> </td><td class="confcell">obj </td><td class="confcell">obj </td><td class="confcell">o </td><td class="confcell">o </td></tr>268 <tr class="confrow"><td class="confcell"><strong>ShrLibExten tion</strong> </td><td class="confcell">dll </td><td class="confcell">dll </td><td class="confcell">s </td><td class="confcell">s </td></tr>269 <tr class="confrow"><td class="confcell"><strong>SrcExten tion</strong> </td><td class="confcell">d </td><td class="confcell">d </td><td class="confcell">d </td><td class="confcell">d </td></tr>270 <tr class="confrow"><td class="confcell"><strong>MacroExten tion</strong> </td><td class="confcell">mac </td><td class="confcell">mac </td><td class="confcell">mac </td><td class="confcell">mac </td></tr>271 <tr class="confrow"><td class="confcell"><strong>DdocExten tion</strong> </td><td class="confcell">ddoc </td><td class="confcell">ddoc </td><td class="confcell">ddoc </td><td class="confcell">ddoc </td></tr>270 <tr class="confrow"><td class="confcell"><strong>ExeExtension</strong> </td><td class="confcell">exe </td><td class="confcell">exe </td><td class="confcell"> </td><td class="confcell"> </td></tr> 271 <tr class="confrow"><td class="confcell"><strong>LibExtension</strong> </td><td class="confcell">lib </td><td class="confcell">lib </td><td class="confcell">a </td><td class="confcell">a </td></tr> 272 <tr class="confrow"><td class="confcell"><strong>ObjExtension</strong> </td><td class="confcell">obj </td><td class="confcell">obj </td><td class="confcell">o </td><td class="confcell">o </td></tr> 273 <tr class="confrow"><td class="confcell"><strong>ShrLibExtension</strong> </td><td class="confcell">dll </td><td class="confcell">dll </td><td class="confcell">s </td><td class="confcell">s </td></tr> 274 <tr class="confrow"><td class="confcell"><strong>SrcExtension</strong> </td><td class="confcell">d </td><td class="confcell">d </td><td class="confcell">d </td><td class="confcell">d </td></tr> 275 <tr class="confrow"><td class="confcell"><strong>MacroExtension</strong> </td><td class="confcell">mac </td><td class="confcell">mac </td><td class="confcell">mac </td><td class="confcell">mac </td></tr> 276 <tr class="confrow"><td class="confcell"><strong>DdocExtension</strong> </td><td class="confcell">ddoc </td><td class="confcell">ddoc </td><td class="confcell">ddoc </td><td class="confcell">ddoc </td></tr> 272 277 <tr class="confrow"><td class="confcell"><strong>CompilerExe</strong> </td><td class="confcell">dmd.exe </td><td class="confcell">gdc.exe </td><td class="confcell">dmd </td><td class="confcell">gdc </td></tr> 273 278 <tr class="confrow"><td class="confcell"><strong>CompileOnly</strong> </td><td class="confcell">-c </td><td class="confcell">-c </td><td class="confcell">-c </td><td class="confcell">-c </td></tr> … … 420 425 421 426 422 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006427 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 423 428 </span></div> 424 429 </body> trunk/Docs/dlls.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="dll_libraries">Topic: DLL Libraries</a></h1> 15 <div class="section"><h2 class="short_title">How to create a DLL library using Build.</h2>15 <div class="section"><h2 class="short_title">How to create a DLL library using <i>Bud</i>.</h2> 16 16 <br> 17 When Buildfinds a <b>DllMain()</b> function, or the <b>-dll</b> switch is used, it17 When <i>Bud</i> finds a <b>DllMain()</b> function, or the <b>-dll</b> switch is used, it 18 18 creates a special type of Module Definition file, and sets the target to 19 19 to be a DLL file. The Module Definition file generated takes the form ... … … 30 30 Also, if you have the program <b>implib</b> in your path, it will be run 31 31 after the DLL file is created, in order to also create a <b>.lib</b> 32 library to interface with the DLL. Buildcurrently supports both the32 library to interface with the DLL. <i>Bud</i> currently supports both the 33 33 <i>DigitalMars</i> version and the <i>Borland (Inprise)</i> version of <b>implib</b>. 34 34 </div> … … 36 36 37 37 38 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:49200638 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 39 39 </span></div> 40 40 </body> trunk/Docs/introduction.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="introduction">Topic: Introduction</a></h1> … … 28 28 29 29 30 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:49200630 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 31 31 </span></div> 32 32 </body> trunk/Docs/macros.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="macros">Topic: Macros</a></h1> 15 <div class="section">The <i>macro</i> system in Buildworks by transforming the contents of a file,15 <div class="section">The <i>macro</i> system in <i>Bud</i> works by transforming the contents of a file, 16 16 via the use of special commands, into a new file that will be 17 17 compiled. 18 18 <br/> <br/> 19 19 The macro system is fairly restricted for now but a much more powerful 20 facility will be available in subsequent releases of Build. However, in spite20 facility will be available in subsequent releases of <i>Bud</i>. However, in spite 21 21 of this, a lot can be achieved by the current macro facility. 22 22 <br/> <br/> … … 24 24 25 25 <div class="section"><b>How it Works</b><br> 26 Buildfirstly examines the default Macro Definition File (MDF)26 <i>Bud</i> firstly examines the default Macro Definition File (MDF) 27 27 and preprocesses 28 28 the defined special commands in preparation for any macro files it may be … … 137 137 </pre> 138 138 Additionally there is another command that is only recognized when embedded 139 in a macro file. This is the <b>output</b> command. It tells <i>Bu ild</i> what139 in a macro file. This is the <b>output</b> command. It tells <i>Bud</i> what 140 140 name to use for the transformed file. 141 141 <p><span class="example"><i>Example:</i> Send output to another file</span></p><pre class="code">@output ../result/mytest.d … … 143 143 If the <b>output</b> command is not found in a file, the transformed file 144 144 is assumed to tbe the same name as the macro file but with ".d" as 145 the exten tion. In other words, "test.mac" when transformed becomes "test.d".145 the extension. In other words, "test.mac" when transformed becomes "test.d". 146 146 <br/> <br/> 147 147 It is important to note that <b>all</b> embedded macro commands are removed from … … 151 151 152 152 153 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006153 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 154 154 </span></div> 155 155 </body> trunk/Docs/pragmas.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="pragmas">Topic: Pragmas</a></h1> … … 61 61 <div class="section"><h2 class="section"><a name="pragma_ignore">pragma: ignore</a></h2> 62 62 This identifies that the current module is not to be passed to 63 the compiler or linker. It is however scanned by Buildand can thus64 contain Buildpragma directives and import statements. This would be63 the compiler or linker. It is however scanned by <i>Bud</i> and can thus 64 contain <i>Bud</i> pragma directives and import statements. This would be 65 65 used to create a special <i>all.d</i> file to pull in all the modules 66 66 for a library or program. … … 78 78 This identifies a required file which is not otherwise imported. 79 79 In some applications, especially ones converted over from C, it is 80 possible that the file on the <i>Bu ild</i> command line does not directly80 possible that the file on the <i>Bud</i> command line does not directly 81 81 or indirectly import a required file. In those situations, you can 82 82 use this pragma to tell build to include it in the compilation checking … … 144 144 <br/> <br/> 145 145 The utility searches for the <i>FILENAME</i> in the currently defined 'import' 146 paths and if doesn't exist, <i>Bu ild</i> will abort.146 paths and if doesn't exist, <i>Bud</i> will abort. 147 147 <br/> <br/> 148 148 The <i>OPTIONS</i> can be included if you need to pass any special values … … 156 156 replaced with <i>-wc -x</i> and <i>abc.hp</i> respectively. 157 157 <br/> <br/> 158 There are some OPTIONS that have a special meaning to <i>Bu ild</i>.158 There are some OPTIONS that have a special meaning to <i>Bud</i>. 159 159 <dl><dt>rule=<name></dt><dd>This identifies the name of the rule to use. 160 If this isn't supplied, the rule is found by matching the file exten tion160 If this isn't supplied, the rule is found by matching the file extension 161 161 on the <i>FILENAME</i> against the <i>in=</i> and <i>out=</i> file types in 162 162 each rule definition.</dd> … … 177 177 By default, the output file from the external tool is added to the linkage 178 178 set of files, and the input file is ignored. These behaviours can be changed 179 by options in the <a href="rules.html">Rule definition</a>. It is possible to tell <i>Bu ild</i> to179 by options in the <a href="rules.html">Rule definition</a>. It is possible to tell <i>Bud</i> to 180 180 compile, link or ignore the input file and/or the output file. 181 181 <br/> <br/> … … 243 243 244 244 245 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006245 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 246 246 </span></div> 247 247 </body> trunk/Docs/profile_file.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="profile_file">Topic: Profile File</a></h1> 15 15 <div class="section">The utility's profile is used to specify various values 16 16 for the utility. The file is called <b>build.pfl</b>. You can have from zero 17 to three profile files because the <i>Bu ild</i> utility looks in each17 to three profile files because the <i>Bud</i> utility looks in each 18 18 of three places for a profile file, and it uses each one that it finds. 19 It looks in the folder that <i>Bu ild</i> is installed, then in the folder19 It looks in the folder that <i>Bud</i> is installed, then in the folder 20 20 that the compiler is installed, and finally in the current folder. 21 21 <br/> <br/> … … 100 100 101 101 102 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006102 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 103 103 </span></div> 104 104 </body> trunk/Docs/response_file.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="response_file">Topic: Response File</a></h1> … … 50 50 51 51 52 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:49200652 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 53 53 </span></div> 54 54 </body> trunk/Docs/rules.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="rule_definition_file">Topic: Rule Definition File</a></h1> … … 22 22 The default Rule Definition File is called <span class="quote">"default.rdf"</span> but this 23 23 can be changed in the <a href="configuration_file.html">Configuration File</a>. 24 If you don't specify a full path to the file, <i>Bu ild</i> searches for it.25 It first first looks in the directory where <i>Bu ild</i> is installed, and if24 If you don't specify a full path to the file, <i>Bud</i> searches for it. 25 It first first looks in the directory where <i>Bud</i> is installed, and if 26 26 it is not found there, the scans throught the directories in the 27 27 PATH environment symbol. … … 39 39 <tr class="row"> <td class="cell">tool=<command pattern> </td> <td class="cell">Yes </td> <td class="cell">Defines the command line to use. </td> 40 40 </tr> 41 <tr class="row"> <td class="cell">in=<exten tion> </td> <td class="cell">No </td> <td class="cell">Specifies the file type (extension) of the input file </td>41 <tr class="row"> <td class="cell">in=<extension> </td> <td class="cell">No </td> <td class="cell">Specifies the file type (extension) of the input file </td> 42 42 </tr> 43 <tr class="row"> <td class="cell">out=<exten tion> </td> <td class="cell">No </td> <td class="cell">Specifies the file type (extension) of the output file </td>43 <tr class="row"> <td class="cell">out=<extension> </td> <td class="cell">No </td> <td class="cell">Specifies the file type (extension) of the output file </td> 44 44 </tr> 45 45 <tr class="row"> <td class="cell">in_use=<usage code> </td> <td class="cell">No </td> … … 64 64 in braces. At compile time, the tokens are replaced by replacement text 65 65 taken from the <b>pragma(build)</b> statement that invoked the rule. In addition, 66 <i>Bu ild</i> also generates some reserved tokens.66 <i>Bud</i> also generates some reserved tokens. 67 67 <table class="table"><thead class="thead"><tr class="row"><td class="thcell">Reserved Token </td> <td class="thcell">Usage </td></tr> 68 68 </thead> … … 75 75 </table> 76 76 <p class="note"><span class="noteid">NOTE:</span><span class="notebody"> *This is everything up to but not including the final '.' character in the name.</span></p> 77 <i>Bu ild</i> ensures that the outfile's path will exist before the tool77 <i>Bud</i> ensures that the outfile's path will exist before the tool 78 78 is run. 79 79 <p><span class="example"><i>Example:</i> Sample RDF</span></p><pre class="code">----- Windows Resource Compiler -------- … … 98 98 99 99 100 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006100 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 101 101 </span></div> 102 102 </body> trunk/Docs/switches.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="switches">Topic: Switches</a></h1> 15 <div class="section"><i>Bu ild</i> supports a number of command line switches to control its15 <div class="section"><i>Bud</i> supports a number of command line switches to control its 16 16 default assumptions. All switches begin with a <b>'-'</b>. Any switch that 17 17 begins with a double dash <b>'--'</b> has the effect of cancelling that … … 36 36 <h2 class="section"><a name="switch_v">switch: -v<span class="secdef">Global verbose mode</span></a></h2> 37 37 <div class="indent"><br> 38 Sets <i>verbose</i> mode on for both <i>Bu ild</i> and for the compiler.38 Sets <i>verbose</i> mode on for both <i>Bud</i> and for the compiler. 39 39 </div> 40 40 41 41 <h2 class="section"><a name="switch_V">switch: -V<span class="secdef">Normal verbose mode</span></a></h2> 42 42 <div class="indent"><br> 43 Set <i>verbose</i> mode on for just <i>Build</i> and <b>not</b> for the compiler. 43 Set <i>verbose</i> mode on for just <i>Bud</i> and <b>not</b> for the compiler. 44 </div> 45 46 <h2 class="section"><a name="switch_explicit">switch: -explicit<span class="secdef">Process only explicitly named files</span></a></h2> 47 <div class="indent"><br> 48 Normally, the utility will compile not only the files named in the command line, 49 but also any file named in <i>import</i> statements if they require it. This 50 switch will force the utility to only compile files named on the 51 command line. 52 <p><span class="example"><i>Example:</i> Only compile the two files named</span></p><pre class="code">build fileone.d filetwo.d -explicit 53 </pre> 54 </div> 55 56 <h2 class="section"><a name="switch_usefinal">switch: -usefinal<span class="secdef">Allow the processing of 57 'FINAL' processing</span></a></h2> 58 <div class="indent"><br> 59 By default, all the <i>FINAL</i> commands found in the configuration files 60 are processed after successful compilation. You can control whether you 61 want this or not by using this switch. 62 <p><span class="example"><i>Example:</i> Prevent processing of FINAL commands</span></p><pre class="code">-usefinal=no 63 </pre> 64 <p><span class="example"><i>Example:</i> Ensure processing of FINAL commands (default)</span></p><pre class="code">-usefinal=yes 65 </pre> 66 </div> 67 68 <h2 class="section"><a name="switch_emptyargs">switch: -emptyargs<span class="secdef">Ignore empty commandline arguments</span></a></h2> 69 <div class="indent"><br> 70 By default, if <i>Bud</i> comes across any empty arguments from either the commandline 71 or configuration file, they are simply ignored. However by setting this switch 72 to 'yes', you can force <i>Bud</i> to abort if it finds an empty argument. 73 <p><span class="example"><i>Example:</i> Abort on finding an empty argument</span></p><pre class="code">-emptyargs=no 74 </pre> 75 <p><span class="example"><i>Example:</i> Ignore empty arguments (default)</span></p><pre class="code">-emptyargs=yes 76 </pre> 44 77 </div> 45 78 … … 51 84 <h2 class="section"><a name="switch_DCPATH">switch: -DCPATH<span class="secdef">Identifies where the compiler has been installed.</span></a></h2> 52 85 <div class="indent"><br> 53 Normally, <i>Bu ild</i> scans the PATH environment symbol to find where the86 Normally, <i>Bud</i> scans the PATH environment symbol to find where the 54 87 D compiler is located. However, if you need to use the compiler from 55 a different location, you would use this switch to tell <i>Bu ild</i> where88 a different location, you would use this switch to tell <i>Bud</i> where 56 89 it is. 57 90 … … 68 101 <h2 class="section"><a name="switch_CFPATH">switch: -CFPATH<span class="secdef">Identifies where the D config file has been installed.</span></a></h2> 69 102 <div class="indent"><br> 70 Normally, <i>Bu ild</i> looks in the same place that the compiler is103 Normally, <i>Bud</i> looks in the same place that the compiler is 71 104 installed in, but if you need to use a different configuration 72 path from that, you would use this switch to tell <i>Bu ild</i> where105 path from that, you would use this switch to tell <i>Bud</i> where 73 106 it is. 74 107 … … 77 110 </div> 78 111 112 <h2 class="section"><a name="switch_BCFPATH">switch: -BCFPATH<span class="secdef">Identifies where a <i>Bud</i> config file has been installed.</span></a></h2> 113 <div class="indent"><br> 114 <i>Bud</i> looks for configuration files in the following places... <br> 115 <div class="list"><ul> <li class="item">The directory that the utility is installed in 116 <li class="item">The directory defined by this switch -BCFPATH or the BCFPATH environment switch 117 <li class="item">The directory that the compiler is installed in 118 <li class="item">The current directory 119 </ul></div> 120 <p><span class="example"><i>Example:</i> </span></p><pre class="code"> -BCFPATHc:\myproject\configs 121 </pre> 122 </div> 123 79 124 <h2 class="section"><a name="switch_full">switch: -full<span class="secdef">Causes all source files to be compiled.</span></a></h2> 80 125 <div class="indent"><br> 81 Normally, <i>Bu ild</i> only compiles a source file if it's object file126 Normally, <i>Bud</i> only compiles a source file if it's object file 82 127 is out of date or missing. This switch forces all source files to be 83 128 recompiled, even if not strictly required. … … 88 133 <h2 class="section"><a name="switch_link">switch: -link<span class="secdef">Forces the linker to be called instead of the librarian.</span></a></h2> 89 134 <div class="indent"><br> 90 Normally, if <i>Bu ild</i> does not find a <b>main()</b> or <b>WinMain()</b> function135 Normally, if <i>Bud</i> does not find a <b>main()</b> or <b>WinMain()</b> function 91 136 in the source files, it creates a library to contain the object 92 files. But when this switch is used, <i>Bu ild</i> will attempt to137 files. But when this switch is used, <i>Bud</i> will attempt to 93 138 create an application by calling the linker rather than the librarian. 94 139 … … 125 170 <h2 class="section"><a name="switch_nolink">switch: -nolink<span class="secdef">Ensures that the linker is not called.</span></a></h2> 126 171 <div class="indent"><br> 127 Normally, if <i>Bu ild</i> finds a <b>main()</b> or <b>WinMain()</b> function, it172 Normally, if <i>Bud</i> finds a <b>main()</b> or <b>WinMain()</b> function, it 128 173 tries to create an application by calling the linker. If you use 129 174 this switch however, the linker will not be called. … … 137 182 <h2 class="section"><a name="switch_lib">switch: -lib<span class="secdef">Forces the object files to be placed in a library.</span></a></h2> 138 183 <div class="indent"><br> 139 Normally, if <i>Bu ild</i> finds a <b>main()</b> or <b>WinMain()</b> function, it184 Normally, if <i>Bud</i> finds a <b>main()</b> or <b>WinMain()</b> function, it 140 185 tries to create an application by calling the linker. But if you 141 186 use this switch, the librarian is called instead of the linker. … … 149 194 and switches.</span></a></h2> 150 195 <div class="indent"><br> 151 Normally <i>Bu ild</i> tries to create either an executable or a library file.196 Normally <i>Bud</i> tries to create either an executable or a library file. 152 197 However sometimes you just need the object files to be created. 153 198 This switch is literally the same has if you had placed both -nolink and … … 159 204 <h2 class="section"><a name="switch_nolib">switch: -nolib<span class="secdef">Ensures that the object files are not used to form a library.</span></a></h2> 160 205 <div class="indent"><br> 161 Normally, if <i>Bu ild</i> does not find a <b>main()</b> or a <b>WinMain()</b> function,206 Normally, if <i>Bud</i> does not find a <b>main()</b> or a <b>WinMain()</b> function, 162 207 it calls the librarian to create a library for your object files. 163 208 But if you use this switch, the librarian is not called. … … 166 211 <h2 class="section"><a name="switch_allobj">switch: -allobj<span class="secdef">Ensures that all object files are added to a library.</span></a></h2> 167 212 <div class="indent"><br> 168 Normally, <i>Bu ild</i> will only create a library using the object files213 Normally, <i>Bud</i> will only create a library using the object files 169 214 that are in the same directory as the new library. You would use 170 215 this switch if you wanted all object files created by this build … … 174 219 <h2 class="section"><a name="switch_cleanup">switch: -cleanup<span class="secdef">Ensures that all working files created during the run are removed.</span></a></h2> 175 220 <div class="indent"><br> 176 Normally, <i>Bu ild</i> does not delete any object files or working files177 when it finishes a session. You can use this switch to have <i>Bu ild</i>221 Normally, <i>Bud</i> does not delete any object files or working files 222 when it finishes a session. You can use this switch to have <i>Bud</i> 178 223 clean up after itself. This will remove all object files created 179 224 in this run, plus any temporary work files. … … 255 300 Adds a project path to the source search list.</span></a></h2> 256 301 <div class="indent"><br> 257 This is used to add a path that will be searched when <i>Bu ild</i> is302 This is used to add a path that will be searched when <i>Bud</i> is 258 303 looking for source files that are only supplied with relative paths. 259 304 <br/> <br/> … … 265 310 <p><span class="example"><i>Example:</i> </span></p><pre class="code">build editor codeparser -PPc:\projects\myeditor\source 266 311 </pre> 267 In the above example, <i>Bu ild</i> will look for 'editor.d' and 'codeparser.d'312 In the above example, <i>Bud</i> will look for 'editor.d' and 'codeparser.d' 268 313 first in the current directory and then, if it didn't find them, in the 269 314 folder 'c:\projects\myeditor\source'. … … 295 340 <span class="nb"><strong>Note:</strong> This only applies to Windows environment.</span> 296 341 <br/> <br/> 297 Normally, if <i>Bu ild</i> finds a <b>DllMain()</b> function it automatically342 Normally, if <i>Bud</i> finds a <b>DllMain()</b> function it automatically 298 343 creates a DLL library. However, if you need to force a DLL 299 344 library to be created instead of a normal library, you would use this switch. … … 305 350 <span class="nb"><strong>Note:</strong> This only applies to Windows environment.</span> 306 351 <br/> <br/> 307 Normally, if <i>Bu ild</i> finds a <b>WinMain()</b> function it automatically352 Normally, if <i>Bud</i> finds a <b>WinMain()</b> function it automatically 308 353 creates a GUI application. However, if you need to force a GUI 309 354 application, you would use this switch. … … 314 359 for Windows NT, 2000, and ME, and 5.0 for Windows XP. 315 360 <br/> <br/> 316 By default, <i>Bu ild</i> uses the version of Windows it is running under.317 </div> 318 319 <h2 class="section"><a name="switch_info">switch: -info<span class="secdef">Displays information about Build.</span></a></h2>320 <div class="indent"><br> 321 Displays the version and path of the <i>Bu ild</i> application.361 By default, <i>Bud</i> uses the version of Windows it is running under. 362 </div> 363 364 <h2 class="section"><a name="switch_info">switch: -info<span class="secdef">Displays information about <i>Bud</i>.</span></a></h2> 365 <div class="indent"><br> 366 Displays the version and path of the <i>Bud</i> application. 322 367 <p><span class="example"><i>Example:</i> </span></p><pre class="code">Path and Version : y:\util\build.exe v2.9(1197) 323 368 built on Wed Aug 10 11:03:42 2005 … … 328 373 <div class="indent"><br> 329 374 This displays the commandline syntax, including all the switches, used 330 to run <i>Bu ild</i>.375 to run <i>Bud</i>. 331 376 <br/> <br/> 332 377 This has the aliases of <b>-h</b> and <b>-?</b> … … 356 401 Identifies a module or package to ignore.</span></a></h2> 357 402 <div class="indent"><br> 358 Normally, <i>Bu ild</i> assumes that all imported modules are available403 Normally, <i>Bud</i> assumes that all imported modules are available 359 404 to be recompiled if required. You would use this switch if you explictly 360 did not want <i>Bu ild</i> to recompile a module.405 did not want <i>Bud</i> to recompile a module. 361 406 362 407 <span class="nb"><strong>Note:</strong> The <i>Phobos</i> package of modules is automatically ignored. This 363 means that <i>Bu ild</i> does not try to recompile phobos.</span>408 means that <i>Bud</i> does not try to recompile phobos.</span> 364 409 365 410 <p><span class="example"><i>Example:</i> ignore the module (or package) called 'parser'</span></p><pre class="code">-Xparser … … 382 427 Identifies the target name to build.</span></a></h2> 383 428 <div class="indent"><br> 384 Normally, <i>Bu ild</i> derives the target name from the first file name429 Normally, <i>Bud</i> derives the target name from the first file name 385 430 on the command line, or from the pragma(target) if present. 386 431 If however, you wish to override that, use this switch. … … 406 451 Give Windows libraries to linker</span></a></h2> 407 452 <div class="indent"><br> 408 By default, when creating a Windows GUI application, <i>Bu ild</i> will453 By default, when creating a Windows GUI application, <i>Bud</i> will 409 454 supply a list of commonly used windows libraries to the linker. However, 410 455 if for some reason you do not want this to happen, you can use this switch 411 456 to disable that. <br/> <br/> 412 <b>Note:</b> that this switch is not valid for Posix editions of <i>Bu ild</i>.457 <b>Note:</b> that this switch is not valid for Posix editions of <i>Bud</i>. 413 458 </div> 414 459 … … 418 463 Use this switch to cause a Module List File to be created. This 419 464 file will contain a list of all the module names processed by 420 <i>Bu ild</i>. You can use the Configuration File to specify the465 <i>Bud</i>. You can use the Configuration File to specify the 421 466 layout of this file, but by default the file will look like 422 467 a Ddoc macro definition ... … … 434 479 Create the Uses/Used-By cross reference file.</span></a></h2> 435 480 <div class="indent"><br> 436 This causes <i>Bu ild</i> to create a file that details the modules that481 This causes <i>Bud</i> to create a file that details the modules that 437 482 are used by a module and the modules that uses a module. 438 483 <br/> <br/> 439 484 You can optionally specify a name for the cross reference file. If you 440 485 don't then the name of the cross reference file takes the Target file's 441 base name and adds the exten tion ".use".486 base name and adds the extension ".use". 442 487 <br/> <br/> 443 488 The file is in two sections. The first, headed by the line <span class="quote">"[USES]"</span> … … 471 516 Determines where the linker expects the object files.</span></a></h2> 472 517 <div class="indent"><br> 473 For <b>DMD</b> environments, <i>Bu ild</i> expects that object files will be created518 For <b>DMD</b> environments, <i>Bud</i> expects that object files will be created 474 519 in the same directory as the source file, or in the directory 475 520 specified in any <a href="#switch_od">-od</a> switch. However, this switch 476 can tell <i>Bu ild</i> to expect them in the current directory.477 <br/> <br/> 478 For <b>GDC</b> environments, <i>Bu ild</i> expects that object files will be created479 in the current directory. However this switch can tell <i>Bu ild</i> to expect521 can tell <i>Bud</i> to expect them in the current directory. 522 <br/> <br/> 523 For <b>GDC</b> environments, <i>Bud</i> expects that object files will be created 524 in the current directory. However this switch can tell <i>Bud</i> to expect 480 525 then to be in same directory as the source file, or in the directory 481 526 specified in any <a href="#switch_od">-od</a> switch. … … 497 542 498 543 499 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:492006544 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 500 545 </span></div> 501 546 </body> trunk/Docs/todo.html
r49 r50 10 10 11 11 12 <p class="page_title"> BuildUtility <span class="page_title">© 2006, Derek Parnell, Melbourne</span>12 <p class="page_title"><i>Bud</i> Utility <span class="page_title">© 2006, Derek Parnell, Melbourne</span> 13 13 <br> <a href="User_Manual.html#toc"><span class="tocref">(table of contents)</span></a></p> 14 14 <h1 class="topic"><a name="todo">Topic: Things Still To Do</a></h1> … … 39 39 40 40 41 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Wed Sep 20 16:04:49200641 <hr><div class="footnote"><span class="footnote">Generated by Ddoc, Mon Oct 16 11:03:25 2006 42 42 </span></div> 43 43 </body> trunk/Source/build.d
r49 r50 6 6 Authors: Derek Parnell, Melbourne 7 7 Initial Creation: January 2005 8 Version: 3.0 39 Date: September 20068 Version: 3.04 9 Date: October 2006 10 10 License: 11 11 This software is provided 'as-is', without any express or implied … … 40 40 version(Windows) { 41 41 // OptLink Definition File 42 pragma (build_def, "VERSION 3.0 3");42 pragma (build_def, "VERSION 3.04"); 43 43 } 44 44 } … … 46 46 47 47 private{ 48 alias char[] string; 48 49 // --------- imports ---------------- 49 50 static import source; // Source File class … … 72 73 } 73 74 74 version(linux)75 else version(linux) 75 76 { 76 77 static import std.c.linux.linux; 77 78 } 78 79 79 version(darwin)80 else version(darwin) 80 81 { 81 82 static import std.c.darwin.darwin; … … 90 91 class BuildException : Error 91 92 { 92 this( char[]pMsg)93 this(string pMsg) 93 94 { 94 95 super (vAppName ~ ":" ~ pMsg); … … 101 102 // --------- internal strings ---------------- 102 103 version(Windows) { 103 char[] vExeExtention=`exe`;104 char[] vLibExtention=`lib`;105 char[] vObjExtention=`obj`;106 char[] vShrLibExtention=`dll`;107 char[]vLinkerStdOut = ">nul";104 string vExeExtension=`exe`; 105 string vLibExtension=`lib`; 106 string vObjExtension=`obj`; 107 string vShrLibExtension=`dll`; 108 string vLinkerStdOut = ">nul"; 108 109 } 109 110 110 111 version(Posix) { 111 char[] vExeExtention=``;112 char[] vLibExtention=`a`;113 char[] vObjExtention=`o`;114 char[] vShrLibExtention=`s`;115 char[]vLinkerStdOut = ">/dev/null";116 } 117 char[] vSrcExtention=`d`;118 char[]vSrcDInterfaceExt = `di`;119 char[] vMacroExtention=`mac`;120 char[] vDdocExtention=`ddoc`;112 string vExeExtension=``; 113 string vLibExtension=`a`; 114 string vObjExtension=`o`; 115 string vShrLibExtension=`so`; 116 string vLinkerStdOut = ">/dev/null"; 117 } 118 string vSrcExtension=`d`; 119 string vSrcDInterfaceExt = `di`; 120 string vMacroExtension=`mac`; 121 string vDdocExtension=`ddoc`; 121 122 122 123 // ---------- Module scoped globals ----------- 123 124 version(DigitalMars) { 124 125 version(Windows) { 125 char[]vCompilerExe=`dmd.exe`;126 char[]vCompileOnly = `-c`;127 char[]vLinkerExe=`link.exe`;126 string vCompilerExe=`dmd.exe`; 127 string vCompileOnly = `-c`; 128 string vLinkerExe=`link.exe`; 128 129 bool vPostSwitches = true; 129 130 bool vAppendLinkSwitches = true; 130 char[] vArgDelim = ","; 131 char[] vArgFileDelim = "+"; 132 char[] vConfigFile=`sc.ini`; 133 char[] vCompilerPath=``; 134 char[] vLinkerPath=``; 135 char[] vLinkerDefs=`/noi/map`; 136 char[] vConfigPath=``; 137 char[] vLibPaths = ``; 138 char[] vConfigSep = ";"; 139 char[] vLibrarian = `lib.exe`; 140 char[] vLibrarianOpts = `-c -p256`; 141 char[] vHomePathId = "HOME"; 142 char[] vEtcPath = ""; 143 char[] vSymInfoSwitch = "/co"; 144 char[] vOutFileSwitch = "-of"; 131 string vArgDelim = ","; 132 string vArgFileDelim = "+"; 133 string vConfigFile=`sc.ini`; 134 string vCompilerPath=``; 135 string vLinkerPath=``; 136 string vLinkerDefs=`/noi/map`; 137 string vConfigPath=``; 138 string vLibPaths = ``; 139 string vConfigSep = ";"; 140 string vLibrarian = `lib.exe`; 141 string vLibrarianOpts = `-c -p256`; 142 string vHomePathId = "HOME"; 143 string vEtcPath = ""; 144 string vSymInfoSwitch = "/co"; 145 string vOutFileSwitch = "-of"; 146 string vLinkLibSwitch = ""; 145 147 } 146 148 147 149 version(Posix) { 148 char[]vCompilerExe=`dmd`;149 char[]vCompileOnly= `-c`;150 char[]vLinkerExe=`gcc`;150 string vCompilerExe=`dmd`; 151 string vCompileOnly= `-c`; 152 string vLinkerExe=`gcc`; 151 153 bool vPostSwitches = false; 152 154 bool vAppendLinkSwitches = false; 153 char[] vArgDelim = " "; 154 char[] vArgFileDelim = " "; 155 char[] vConfigFile=`dmd.conf`; 156 char[] vCompilerPath=``; 157 char[] vLinkerPath=``; 158 char[] vLinkerDefs=``; 159 char[] vConfigPath=`/etc/`; 160 char[] vLibPaths = ``; 161 char[] vConfigSep = ":"; 162 char[] vLibrarian = `ar`; 163 char[] vLibrarianOpts = `-r`; 164 char[] vHomePathId = "HOME"; 165 char[] vEtcPath = "/etc/"; 166 char[] vSymInfoSwitch = "-g"; 167 char[] vOutFileSwitch = "-o "; 168 } 169 170 char[] vVersionSwitch = "-version"; 171 char[] vDebugSwitch = "-debug"; 172 char[][] vCompilerDefs; 173 char[] vImportPath = "-I"; 155 string vArgDelim = " "; 156 string vArgFileDelim = " "; 157 string vConfigFile=`dmd.conf`; 158 string vCompilerPath=``; 159 string vLinkerPath=``; 160 string vLinkerDefs=``; 161 string vConfigPath=`/etc/`; 162 string vLibPaths = ``; 163 string vConfigSep = ":"; 164 string vLibrarian = `ar`; 165 string vLibrarianOpts = `-r`; 166 string vHomePathId = "HOME"; 167 string vEtcPath = "/etc/"; 168 string vSymInfoSwitch = "-g"; 169 string vOutFileSwitch = "-o "; 170 string vLinkLibSwitch = "-l"; 171 } 172 173 string vVersionSwitch = "-version"; 174 string vDebugSwitch = "-debug"; 175 string[] vCompilerDefs; 176 string vImportPath = "-I"; 174 177 bool vUseModBaseName = false; 175 char[] vLinkLibSwitch = "";176 178 } 177 179 178 180 version(GNU) { 179 181 version(Windows) { 180 char[]vCompilerExe=`gdc.exe`;181 char[]vCompileOnly= `-c`;182 char[]vLinkerExe=`gdc.exe`;182 string vCompilerExe=`gdc.exe`; 183 string vCompileOnly= `-c`; 184 string vLinkerExe=`gdc.exe`; 183 185 bool vPostSwitches = false; 184 186 bool vAppendLinkSwitches = false; 185 char[]vArgDelim = " ";186 char[]vArgFileDelim = " ";187 char[]vConfigFile=null;188 char[]vCompilerPath=``;189 char[]vLinkerPath=``;190 char[]vLinkerDefs=``;191 char[]vConfigPath=null;192 char[]vLibPaths = ``;193 char[]vConfigSep = ";";194 char[]vLibrarian = `ar.exe`;195 char[]vLibrarianOpts = `-c`;196 char[]vLinkLibSwitch = "-l";197 char[]vHomePathId = "HOME";198 char[]vEtcPath = "";187 string vArgDelim = " "; 188 string vArgFileDelim = " "; 189 string vConfigFile=null; 190 string vCompilerPath=``; 191 string vLinkerPath=``; 192 string vLinkerDefs=``; 193 string vConfigPath=null; 194 string vLibPaths = ``; 195 string vConfigSep = ";"; 196 string vLibrarian = `ar.exe`; 197 string vLibrarianOpts = `-c`; 198 string vLinkLibSwitch = "-l"; 199 string vHomePathId = "HOME"; 200 string vEtcPath = ""; 199 201 } 200 202 201 203 version(Posix) { 202 char[]vCompilerExe=`gdc`;203 char[]vCompileOnly= `-c`;204 char[]vLinkerExe=`gdc`;204 string vCompilerExe=`gdc`; 205 string vCompileOnly= `-c`; 206 string vLinkerExe=`gdc`; 205 207 bool vPostSwitches = false; 206 208 bool vAppendLinkSwitches = false; 207 char[]vArgDelim = " ";208 char[]vArgFileDelim = " ";209 char[]vConfigFile=null;210 char[]vCompilerPath=``;211 char[]vLinkerPath=``;212 char[]vLinkerDefs=``;213 char[]vConfigPath=null;214 char[]vLibPaths = ``;215 char[]vConfigSep = ":";216 char[]vLibrarian = `ar`;217 char[]vLibrarianOpts = `-r`;218 char[]vLinkLibSwitch = "-l";219 char[]vHomePathId = "HOME";220 char[]vEtcPath = "/etc/";221 } 222 char[]vVersionSwitch = "-fversion";223 char[]vDebugSwitch = "-fdebug";224 char[] vOutFileSwitch = "-of";225 char[][] vCompilerDefs;226 char[]vImportPath = "-I ";227 char[]vSymInfoSwitch = "-g";209 string vArgDelim = " "; 210 string vArgFileDelim = " "; 211 string vConfigFile=null; 212 string vCompilerPath=``; 213 string vLinkerPath=``; 214 string vLinkerDefs=``; 215 string vConfigPath=null; 216 string vLibPaths = ``; 217 string vConfigSep = ":"; 218 string vLibrarian = `ar`; 219 string vLibrarianOpts = `-r`; 220 string vLinkLibSwitch = "-l"; 221 string vHomePathId = "HOME"; 222 string vEtcPath = "/etc/"; 223 } 224 string vVersionSwitch = "-fversion"; 225 string vDebugSwitch = "-fdebug"; 226 string vOutFileSwitch = "-o "; 227 string[] vCompilerDefs; 228 string vImportPath = "-I "; 229 string vSymInfoSwitch = "-g"; 228 230 /* GDC places object files in the directory from which it is called */ 229 231 bool vUseModBaseName = true; 230 232 } 231 233 232 char[] vOverrideConfigPath = ""; 233 char[] vBuildImportPath = "-I"; 234 char[] vImportPathDelim = ";"; 235 char[] vOutputPath = "-od"; 236 char[] vRunSwitch = "-exec"; 237 char[] vLibrarianPath = ""; 238 char[]* vDelayedValue = null; 239 char[] vTemporaryPath = ""; 240 char[] vLibPathSwitch = "-L"; 241 char[] vMapSwitch = "-M"; 242 char[] vGenDebugInfo = "-g"; 243 char[] vResponseExt = "brf"; 244 char[] vDefResponseFile = "build.brf"; 245 char[] vDefMacroDefFile = "build.mdf"; 246 char[] vUtilsConfigFile = "build.cfg"; 247 char[] vPathId = "PATH"; // Used to locate the environment symbol 248 249 char[] vModOutPrefix = "MODULES = \n"; 250 char[] vModOutSuffix = ""; 251 char[] vModOutBody = " $(MODULE {mod})\n"; 252 char[] vModOutDelim = ""; 253 char[] vModOutFile = "_modules.ddoc"; 254 255 char[][] vFinalProc; 234 string vCFGPath = ``; 235 string vOverrideConfigPath = ""; 236 string vBuildImportPath = "-I"; 237 string vImportPathDelim = ";"; 238 string vOutputPath = "-od"; 239 string vRunSwitch = "-exec"; 240 string vLibrarianPath = ""; 241 string* vDelayedValue = null; 242 string vTemporaryPath = ""; 243 string vLibPathSwitch = "-L"; 244 string vMapSwitch = "-M"; 245 string vGenDebugInfo = "-g"; 246 string vResponseExt = "brf"; 247 string vDefResponseFile = "build.brf"; 248 string vDefMacroDefFile = "build.mdf"; 249 string vUtilsConfigFile = "build.cfg"; 250 string vPathId = "PATH"; // Used to locate the environment symbol 251 252 string vModOutPrefix = "MODULES = \n"; 253 string vModOutSuffix = ""; 254 string vModOutBody = " $(MODULE {mod})\n"; 255 string vModOutDelim = ""; 256 string vModOutFile = "_modules.ddoc"; 257 258 string[] vFinalProc; 256 259 257 260 Bool vTestRun; 261 Bool vExplicit; 258 262 Bool vScanImports; 259 263 Bool vNoLink; … … 272 276 Bool vUseResponseFile; 273 277 Bool vConsoleApp; 274 275 char[] vUsesOutput; 276 char[] vSymbolOutName; 277 char[] vRunParms; 278 char[] vTargetExe; 279 char[][] vImportRoots; 280 char[][] vModulesToIgnore; 281 char[][] vModulesToNotice; 282 char[][] vBuildDef; 283 char[][] vDefaultLibs; 278 Bool vUseFinal; 279 Bool vEmptyArgs; 280 281 string vUsesOutput; 282 string vSymbolOutName; 283 string vRunParms; 284 string vTargetExe; 285 string[] vImportRoots; 286 string[] vModulesToIgnore; 287 string[] vModulesToNotice; 288 string[] vBuildDef; 289 string[] vDefaultLibs; 284 290 LibOpt vLibraryAction = LibOpt.Implicit; 285 char[]vAppPath;286 char[]vAppName;287 char[] vAppVersion = "3.03";288 char[]vTargetName; // Output name from first file name.289 char[]vPragmaTargetName; // Output name from pragma.290 char[]vCommandTargetName; // Output name from switches.291 char[][] vCmdLineSourceFiles; // List of source files from command line292 bool[ char[]] vLinkFiles; // List of non-source files from command line293 char[][] vCombinedArgs; // All the args are gathered here prior to processing.294 char[][] vBuildArgs; // Arguments passed to build295 char[][] vCompilerArgs; // Arguments passed to compiler296 char[][] vSourceScanList; // The list of places to find source files.297 bool[ char[]] vResourceFileTypes;298 char[][] vUDResTypes;291 string vAppPath; 292 string vAppName; 293 string vAppVersion = "3.04"; 294 string vTargetName; // Output name from first file name. 295 string vPragmaTargetName; // Output name from pragma. 296 string vCommandTargetName; // Output name from switches. 297 string[] vCmdLineSourceFiles; // List of source files from command line 298 bool[string] vLinkFiles; // List of non-source files from command line 299 string[] vCombinedArgs; // All the args are gathered here prior to processing. 300 string[] vBuildArgs; // Arguments passed to build 301 string[] vCompilerArgs; // Arguments passed to compiler 302 string[] vSourceScanList; // The list of places to find source files. 303 bool[string] vResourceFileTypes; 304 string[] vUDResTypes; 299 305 300 306 301 307 version(Windows) 302 308 { 303 char[]vWinVer = "";309 string vWinVer = ""; 304 310 ubyte vWinVerNum; 305 311 bool vAutoWinLibs = true; … … 319 325 vNoLink = False; 320 326 vTestRun = False; 327 vExplicit = False; 321 328 vScanImports = False; 329 vUseFinal = True; 330 vEmptyArgs = True; 322 331 vForceCompile = False; 323 332 vSilent = False; … … 380 389 std.stdio.writefln(" version of the compiler."); 381 390 std.stdio.writefln(" -CFPATH<path> <path> is where the D config file has been installed."); 391 std.stdio.writefln(" -BCFPATH<path> <path> is where the Build config file has been installed."); 382 392 std.stdio.writefln(" -full Causes all source files, except ignored modules,"); 383 393 std.stdio.writefln(" to be compiled."); … … 413 423 } 414 424 425 std.stdio.writefln(" -explicit Only compile files explicitly named on the command line."); 426 std.stdio.writefln(" All other files, such as imported ones, are not compiled."); 415 427 std.stdio.writefln(" -LIBOPT<opt> Allows you to pass <opt> to the librarian."); 416 428 std.stdio.writefln(" -LIBPATH=<pathlist> Used to add a semi-colon delimited list"); … … 426 438 std.stdio.writefln(" -R will reverse the current usage."); 427 439 std.stdio.writefln(" -PP<path> Add a path to the Source Search List"); 440 std.stdio.writefln(" -usefinal=<Yes|No> Indicates whether to use any FINAL processes"); 441 std.stdio.writefln(" defined in the configuration file."); 442 std.stdio.writefln(" -usefinal=Yes will cause the FINAL to be used. This is the default"); 443 std.stdio.writefln(" -usefinal=No will prevent the FINAL from being used."); 428 444 429 445 version(UseResponseFile) … … 532 548 533 549 // Examine any link file dependancies too. 534 foreach(int idx, char[]lFileName; vLinkFiles.keys)550 foreach(int idx, string lFileName; vLinkFiles.keys) 535 551 { 536 552 util.fdt.FileDateTime lLinkTime = new util.fdt.FileDateTime(lFileName); … … 579 595 Bool lLinking; 580 596 Bool lBuildRequired; 581 char[][] lFilesToLink;582 char[][] lFilesToCompile;597 string[] lFilesToLink; 598 string[] lFilesToCompile; 583 599 int lRunResult; 584 char[]lTargetName;585 char[]lTargetDir;600 string lTargetName; 601 string lTargetDir; 586 602 util.fdt.FileDateTime lTargetTime; 587 603 util.fdt.FileDateTime lMostRecentTime; 588 604 auto source.Source[] lNonLinkingSources; 589 char[]lDResponseFileName;590 char[]lLinkResponseFileName;591 char[]lLResponseFileName;592 char[]lDefName;593 char[]lOutText;594 char[]lCompilerOpts;595 char[]lSourcesToCompile;596 char[]lCommand;597 char[][] lObjectFiles;598 char[][] lLibraryFiles;605 string lDResponseFileName; 606 string lLinkResponseFileName; 607 string lLResponseFileName; 608 string lDefName; 609 string lOutText; 610 string lCompilerOpts; 611 string lSourcesToCompile; 612 string lCommand; 613 string[] lObjectFiles; 614 string[] lLibraryFiles; 599 615 600 616 … … 604 620 605 621 // Examine each supplied source file. 606 foreach( char[]lFile; vCmdLineSourceFiles)622 foreach( string lFile; vCmdLineSourceFiles) 607 623 { 608 624 lFile = GetFullPathname(lFile, vSourceScanList); 609 if (std.path.getExt(lFile) == vMacroExten tion)625 if (std.path.getExt(lFile) == vMacroExtension) 610 626 { 611 627 version(BuildVerbose) … … 615 631 } 616 632 617 char[] lAltFile = std.path.addExt( lFile, vSrcExtention); // Make it a D source file.633 string lAltFile = std.path.addExt( lFile, vSrcExtension); // Make it a D source file. 618 634 if (util.macro.ConvertFile(lFile, "build", lAltFile)) 619 635 lFile = lAltFile; … … 692 708 if (vLibraryAction == LibOpt.Build) 693 709 // Target is a library. 694 lTargetName = util.pathex.ReplaceExten tion(vTargetName, vLibExtention);710 lTargetName = util.pathex.ReplaceExtension(vTargetName, vLibExtension); 695 711 696 712 else if (vNoLink == False) … … 699 715 if (source.Source.WasMainDLL) 700 716 // Target is a shared library. 701 lTargetName = util.pathex.ReplaceExten tion(vTargetName, vShrLibExtention);717 lTargetName = util.pathex.ReplaceExtension(vTargetName, vShrLibExtension); 702 718 else 703 719 { 704 720 // Target is an executable 705 lTargetName = util.pathex.ReplaceExten tion(vTargetName, vExeExtention);721 lTargetName = util.pathex.ReplaceExtension(vTargetName, vExeExtension); 706 722 vTargetExe = lTargetName; 707 723 } … … 711 727 // so assume they know what they are doing and also assume an 712 728 // executable is required. 713 lTargetName = util.pathex.ReplaceExten tion(vTargetName, vExeExtention);729 lTargetName = util.pathex.ReplaceExtension(vTargetName, vExeExtension); 714 730 vTargetExe = lTargetName; 715 731 } … … 773 789 // No files to compile, just link files, so collect 774 790 // all the object files to link in. 775 foreach( char[]lFileName; vLinkFiles.keys)791 foreach( string lFileName; vLinkFiles.keys) 776 792 { 777 793 // Only include OBJECT files. 778 if (util.str.ends(lFileName , vObjExten tion) == True)794 if (util.str.ends(lFileName , vObjExtension) == True) 779 795 lFilesToLink ~= lFileName; 780 796 } … … 804 820 // Check each source to see if we need to recompile it. 805 821 Bool lNeedsCompiling; 806 char[]lShortFileName;807 char[]lFileType;822 string lShortFileName; 823 string lFileType; 808 824 809 825 lNeedsCompiling = vForceCompile; … … 814 830 lShortFileName = util.pathex.AbbreviateFileName(lCurrentSource.FileName); 815 831 lFileType = std.path.getExt(lShortFileName); 816 if (lFileType != vSrcExten tion && lFileType != vDdocExtention)832 if (lFileType != vSrcExtension && lFileType != vDdocExtension) 817 833 return 0; 818 834 819 835 // Only source files are examined from here on. 820 if (lCurrentSource.NoLink || lFileType == vDdocExten tion)836 if (lCurrentSource.NoLink || lFileType == vDdocExtension) 821 837 { 822 838 lNonLinkingSources ~= lCurrentSource; … … 848 864 lBuildRequired = True; 849 865 lCompiling = True; 850 lFilesToCompile ~= lShortFileName; 866 867 if (lCurrentSource.NoCompile == false) 868 lFilesToCompile ~= lShortFileName; 851 869 852 870 // Check to see if I'm allowed to link this file. … … 885 903 } 886 904 887 foreach( char[]lFileName; lFilesToCompile)905 foreach(string lFileName; lFilesToCompile) 888 906 { 889 907 lSourcesToCompile ~= util.str.enquote(lFileName) ~ "\n"; … … 934 952 if ((vNoDef == False) && (vBuildDef.length > 0)) 935 953 { 936 lDefName = util.pathex.ReplaceExten tion(lTargetName, "def");954 lDefName = util.pathex.ReplaceExtension(lTargetName, "def"); 937 955 if (vTemporaryPath.length != 0) 938 956 { … … 947 965 // Add any library and any external object files required. 948 966 lLibraryFiles.length = 0; 949 foreach ( char[]lFileName; vLinkFiles.keys)950 { 951 char[]lCmdItem;967 foreach (string lFileName; vLinkFiles.keys) 968 { 969 string lCmdItem; 952 970 953 971 if (lFileName.length > 0) 954 972 { 955 973 lCmdItem = lFileName; 956 if ( util.str.ends(lCmdItem, "." ~ vLibExten tion) == True)957 { 958 // Cut off exten tion.959 lCmdItem.length = lCmdItem.length - vLibExten tion.length - 1;974 if ( util.str.ends(lCmdItem, "." ~ vLibExtension) == True) 975 { 976 // Cut off extension. 977 lCmdItem.length = lCmdItem.length - vLibExtension.length - 1; 960 978 lLibraryFiles ~= lCmdItem; 961 979 } … … 973 991 { 974 992 // Ok, I have some compiling to do! 975 char[]lCommandLine;993 string lCommandLine; 976 994 977 995 lCommandLine = GatherCompilerArgs(lLinking) ~ lSourcesToCompile; … … 979 997 if (vUseResponseFile == True) 980 998 { 981 lDResponseFileName = util.pathex.ReplaceExten tion(lTargetName, "rsp");999 lDResponseFileName = util.pathex.ReplaceExtension(lTargetName, "rsp"); 982 1000 if (vTemporaryPath.length != 0) 983 1001 { … … 1009 1027 if ( (lRunResult == 0) && (lFilesToLink.length > 0) && (lLinking == True)) 1010 1028 { 1011 char[]lCommandLine;1012 char[]lLinkerSwitches;1029 string lCommandLine; 1030 string lLinkerSwitches; 1013 1031 Bool IsMapping = False; 1014 1032 … … 1020 1038 vUDResTypes ~= "res"; 1021 1039 } 1022 foreach( char[]lResType; vUDResTypes)1040 foreach( string lResType; vUDResTypes) 1023 1041 { 1024 1042 vResourceFileTypes[lResType] = true; … … 1031 1049 { 1032 1050 // Transfer linker switches from Compiler switches. 1033 foreach ( char[]lCompileArg; vCompilerArgs)1051 foreach (string lCompileArg; vCompilerArgs) 1034 1052 { 1035 1053 if (util.str.begins(lCompileArg, "-L") == True) … … 1038 1056 } 1039 1057 } 1040 foreach( char[]lSwitch; std.string.split(vLinkerDefs ~ lLinkerSwitches, "/"))1058 foreach( string lSwitch; std.string.split(vLinkerDefs ~ lLinkerSwitches, "/")) 1041 1059 { 1042 1060 if (lSwitch == "nomap") … … 1051 1069 1052 1070 // (1) Gather the object file names 1053 foreach(char[] lFile; lFilesToLink) 1054 { 1055 // Only include OBJECT files. 1056 if (std.path.getExt(lFile) == vObjExtention) 1057 lCommandLine ~= lFile ~ vArgFileDelim; 1058 } 1059 if (lCommandLine.length > 0) 1060 lCommandLine[$-1] = '\n'; 1071 { 1072 int lCnt = 0; 1073 foreach(string lFile; lFilesToLink) 1074 { 1075 // Only include OBJECT files. 1076 if (std.path.getExt(lFile) == vObjExtension) 1077 { 1078 if (lCnt > 0) 1079 lCommandLine ~= vArgFileDelim; 1080 lCommandLine ~= lFile; 1081 lCnt++; 1082 } 1083 } 1084 lCommandLine ~= "\n"; 1085 } 1061 1086 1062 1087 // (2) Set the output file name … … 1065 1090 // (3) Set the map name 1066 1091 if (IsMapping == True) 1067 lCommandLine ~= util.pathex.ReplaceExten tion(lTargetName, "map");1092 lCommandLine ~= util.pathex.ReplaceExtension(lTargetName, "map"); 1068 1093 1069 1094 lCommandLine ~= "\n"; … … 1074 1099 if (lLibraryFiles.length > 0) 1075 1100 { 1076 foreach( char[] lLib; lLibraryFiles) 1077 { 1078 lLib = std.path.addExt(lLib, vLibExtention); 1079 lCommandLine ~= vLinkLibSwitch ~ util.str.enquote(lLib) ~ "\n"; 1080 } 1081 } 1082 else 1083 lCommandLine ~= "\n"; 1101 foreach( int i, string lLib; lLibraryFiles) 1102 { 1103 lLib = std.path.addExt(lLib, vLibExtension); 1104 if (i > 0) 1105 lCommandLine ~= vArgFileDelim; 1106 lCommandLine ~= vLinkLibSwitch ~ 1107 util.str.enquote(lLib); 1108 } 1109 } 1110 lCommandLine ~= "\n"; 1084 1111 1085 1112 // Include the explictly named libraries. … … 1106 1133 // (6) Gather the resource file names 1107 1134 { 1108 int lCnt ;1109 1110 foreach( char[]lFile; lFilesToLink)1111 { 1112 char[]lExt;1135 int lCnt = 0; 1136 1137 foreach(string lFile; lFilesToLink) 1138 { 1139 string lExt; 1113 1140 1114 1141 lExt = std.path.getExt(lFile); 1115 lCnt = 0; 1116 // Only include fiels with the correct extention type. 1142 // Only include fiels with the correct extension type. 1117 1143 if (lExt in vResourceFileTypes) 1118 1144 { 1145 if (lCnt > 0) 1146 lCommandLine ~= vArgFileDelim; 1119 1147 lCommandLine ~= lFile; 1120 1148 lCnt++; 1121 1149 } 1122 if (lCnt > 0) 1123 lCommandLine ~= vArgFileDelim; 1124 } 1125 if (lCnt > 0) 1126 lCommandLine[$-1] = '\n'; 1127 else 1128 lCommandLine ~= "\n"; 1150 } 1151 lCommandLine ~= "\n"; 1129 1152 } 1130 1153 … … 1136 1159 { 1137 1160 // Transfer linker switches from Compiler switches. 1138 foreach ( char[]lCompileArg; vCompilerArgs)1161 foreach (string lCompileArg; vCompilerArgs) 1139 1162 { 1140 1163 if (util.str.begins(lCompileArg, "-L") == True) … … 1145 1168 1146 1169 // (1) Gather the object and resource file names 1147 foreach( char[]lFile; lFilesToLink)1170 foreach(string lFile; lFilesToLink) 1148 1171 { 1149 1172 lCommandLine ~= lFile ~ "\n"; … … 1159 1182 // (4) Gather the libraries names. 1160 1183 // Include the default libraries first. 1161 foreach( char[]lLib; vDefaultLibs ~ lLibraryFiles)1184 foreach( string lLib; vDefaultLibs ~ lLibraryFiles) 1162 1185 { 1163 1186 lCommandLine ~= vLinkLibSwitch ~ util.str.enquote(lLib) ~ "\n"; … … 1176 1199 } 1177 1200 1178 char[][] lLibPaths;1201 string[] lLibPaths; 1179 1202 lLibPaths = std.string.split(vLibPaths, vConfigSep); 1180 foreach( char[]lLib; lLibPaths)1203 foreach(string lLib; lLibPaths) 1181 1204 { 1182 1205 if (lLib.length > 0) … … 1191 1214 if (vUseResponseFile == True) 1192 1215 { 1193 lLinkResponseFileName = util.pathex.ReplaceExten tion(lTargetName, "ksp");1216 lLinkResponseFileName = util.pathex.ReplaceExtension(lTargetName, "ksp"); 1194 1217 if (vTemporaryPath.length != 0) 1195 1218 { … … 1261 1284 if ( (source.Source.WasMainDLL) && (lRunResult == 0) ) 1262 1285 { 1263 char[]lTargetFileName;1264 char[]lImpLibPath;1265 char[]lImpLibArgs;1286 string lTargetFileName; 1287 string lImpLibPath; 1288 string lImpLibArgs; 1266 1289 ulong[] lImpManf; 1267 1290 … … 1292 1315 lOutText ~= lTargetName ~ std.path.linesep; // Create a new library 1293 1316 1294 foreach( char[]lFileName; lFilesToLink)1295 { 1296 char[]lFileDir;1317 foreach( string lFileName; lFilesToLink) 1318 { 1319 string lFileDir; 1297 1320 1298 1321 lFileDir = std.path.getDirName(lFileName); 1299 1322 if ((vAllObjects == True) || lFileDir == "" || lFileDir == lTargetDir) 1300 1323 { 1301 if (lFileName.length > 1 + vSrcExten tion.length)1302 { 1303 if (lFileName[$-vSrcExten tion.length .. $] == vSrcExtention)1304 { 1305 lFileName = lFileName[0..$-vSrcExten tion.length] ~ vObjExtention;1324 if (lFileName.length > 1 + vSrcExtension.length) 1325 { 1326 if (lFileName[$-vSrcExtension.length .. $] == vSrcExtension) 1327 { 1328 lFileName = lFileName[0..$-vSrcExtension.length] ~ vObjExtension; 1306 1329 } 1307 1330 } … … 1314 1337 { 1315 1338 if (vUseResponseFile == True) { 1316 lLResponseFileName = util.pathex.ReplaceExten tion(lTargetName, "lsp");1339 lLResponseFileName = util.pathex.ReplaceExtension(lTargetName, "lsp"); 1317 1340 if (vTemporaryPath.length != 0) 1318 1341 { … … 1340 1363 if (vCleanup == True) 1341 1364 { 1342 char[][] lHitList;1365 string[] lHitList; 1343 1366 1344 1367 version(BuildVerbose) … … 1368 1391 1369 1392 // Possible ones created by compiler, linker, and librarian. 1370 lHitList ~= util.pathex.ReplaceExten tion(lTargetName, "map");1371 lHitList ~= util.pathex.ReplaceExten tion(lTargetName, "bak");1372 lHitList ~= util.pathex.ReplaceExten tion(lTargetName, "lst");1373 1374 foreach( char[]lFilename; lHitList)1393 lHitList ~= util.pathex.ReplaceExtension(lTargetName, "map"); 1394 lHitList ~= util.pathex.ReplaceExtension(lTargetName, "bak"); 1395 lHitList ~= util.pathex.ReplaceExtension(lTargetName, "lst"); 1396 1397 foreach(string lFilename; lHitList) 1375 1398 { 1376 1399 if (lFilename.length > 0) … … 1390 1413 } 1391 1414 1392 foreach(char[] lFinal; vFinalProc) 1393 { 1394 char[] lCommandLine; 1395 1396 lCommandLine = util.str.Expand(lFinal, "Target=" ~ lTargetName ~ 1397 ",TargetPath=" ~ std.path.getDirName(lTargetName) ~ 1398 ",TargetBase=" ~ std.path.getBaseName(lTargetName) 1399 ); 1400 if (lCommandLine.length > 0) 1401 { 1402 util.fileex.RunCommand(lCommandLine); 1403 } 1404 } 1415 if (lRunResult == 0 && (vUseFinal == True)) 1416 { 1417 foreach(string lFinal; vFinalProc) 1418 { 1419 string lCommandLine; 1420 lCommandLine = util.str.Expand(lFinal, "Target=" ~ lTargetName ~ 1421 ",TargetPath=" ~ std.path.getDirName(lTargetName) ~ 1422 ",TargetBase=" ~ std.path.getBaseName(lTargetName) 1423 ); 1424 if (lCommandLine.length > 0) 1425 { 1426 lRunResult = util.fileex.RunCommand(lCommandLine); 1427 if (lRunResult != 0) 1428 break; 1429 } 1430 } 1431 } 1432 1405 1433 return lRunResult; 1406 1434 … … 1411 1439 // ------------------------------------------- 1412 1440 { 1413 char[]lOutText;1441 string lOutText; 1414 1442 1415 1443 foreach(char [] lRoot; vImportRoots) … … 1422 1450 1423 1451 // Build command files for compilation. 1424 foreach ( char[]lCompileArg; vCompilerArgs)1452 foreach (string lCompileArg; vCompilerArgs) 1425 1453 { 1426 1454 // Ignore empty args … … 1467 1495 1468 1496 // ------------------------------------------- 1469 char[][] ModulesToIgnore()1497 string[] ModulesToIgnore() 1470 1498 // ------------------------------------------- 1471 1499 { … … 1475 1503 1476 1504 // ------------------------------------------- 1477 void AddLink( char[]pPath)1505 void AddLink(string pPath) 1478 1506 // ------------------------------------------- 1479 1507 { … … 1485 1513 1486 1514 // ------------------------------------------- 1487 void AddTarget( char[]pPath)1515 void AddTarget(string pPath) 1488 1516 // ------------------------------------------- 1489 1517 { … … 1509 1537 1510 1538 // ------------------------------------------- 1511 void AddBuildDef( char[]pText, bool pReplace = false)1539 void AddBuildDef(string pText, bool pReplace = false) 1512 1540 // ------------------------------------------- 1513 1541 { 1514 1542 int lPos; 1515 char[]lLowerText;1516 static uint[ char[]] lElementIdx;1543 string lLowerText; 1544 static uint[ string ] lElementIdx; 1517 1545 1518 1546 if (vNoDef == True) … … 1538 1566 1539 1567 // ------------------------------------------- 1540 void AddCompilerArg( char[]pArg)1568 void AddCompilerArg(string pArg) 1541 1569 // ------------------------------------------- 1542 1570 { … … 1553 1581 1554 1582 lFound = false; 1555 foreach( char[]lArg; vCompilerArgs)1583 foreach(string lArg; vCompilerArgs) 1556 1584 { 1557 1585 if (lArg == pArg) … … 1567 1595 1568 1596 // ------------------------------------------- 1569 char[] AddRoot(char[]pRootName)1597 string AddRoot(string pRootName) 1570 1598 // ------------------------------------------- 1571 1599 { 1572 static bool [ char[]] lRootHash;1573 char[]lFullName;1574 char[]lSearchName;1600 static bool [string] lRootHash; 1601 string lFullName; 1602 string lSearchName; 1575 1603 1576 1604 if(pRootName.length == 0) … … 1596 1624 } 1597 1625 1598 char[][] GetImportRoots()1626 string[] GetImportRoots() 1599 1627 { 1600 1628 return vImportRoots; 1601 1629 } 1602 1630 1603 void Process_DFLAGS( char[]pText)1631 void Process_DFLAGS(string pText) 1604 1632 { 1605 1633 int lPos; 1606 1634 int lEndPos; 1607 char[]lRootName;1608 char[][] lRoots;1609 char[][] lArgs;1635 string lRootName; 1636 string[] lRoots; 1637 string[] lArgs; 1610 1638 int lArg; 1611 1639 bool lInArg; … … 1651 1679 } 1652 1680 1653 foreach( char[]lSwitch; lArgs)1681 foreach(string lSwitch; lArgs) 1654 1682 { 1655 1683 if ((lSwitch.length > 0) && (lSwitch[0] == '-')) … … 1673 1701 { 1674 1702 lRoots = std.string.split(lSwitch[2..length], vConfigSep); 1675 foreach( char[]lRoot; lRoots)1703 foreach(string lRoot; lRoots) 1676 1704 { 1677 1705 lRootName = AddRoot(lRoot); … … 1705 1733 } 1706 1734 1707 if (util.str.IsLike(lSwitch, std.utf.toUTF32(vOutputPath ~ "*")) == True)1708 { 1709 char[]lbRoot;1735 if (util.str.IsLike(lSwitch, vOutputPath ~ "*") == True) 1736 { 1737 string lbRoot; 1710 1738 1711 1739 vTemporaryPath = lSwitch[vOutputPath.length .. $]; … … 1744 1772 // ------------------------------------------- 1745 1773 { 1746 char[]lSymValue;1774 string lSymValue; 1747 1775 1748 1776 // Check for a environment flag before config file. … … 1764 1792 // ------------------------------------------- 1765 1793 { 1766 char[]lConfigPath;1767 char[][] lTextLines;1794 string lConfigPath; 1795 string[] lTextLines; 1768 1796 int lPos; 1769 1797 … … 1783 1811 std.stdio.writefln("Reading from config: %s", lConfigPath); 1784 1812 } 1785 util.fileex.GetTextLines(lConfigPath, lTextLines, util.fileex.GetOpt.Exists);1786 1787 1788 foreach(int i, char[]lLine; lTextLines)1813 lTextLines = util.fileex.GetTextLines(lConfigPath, util.fileex.GetOpt.Exists); 1814 1815 1816 foreach(int i, string lLine; lTextLines) 1789 1817 { 1790 1818 // Strip off trailing whitespace. … … 1811 1839 if(lPos == 0) 1812 1840 { 1813 char[][] lPaths;1841 string[] lPaths; 1814 1842 lLine = lLine[lPos+4 .. length]; 1815 1843 lPaths.length = 1; … … 1830 1858 } 1831 1859 1832 foreach( char[]lPath; lPaths)1860 foreach( string lPath; lPaths) 1833 1861 { 1834 1862 if (lPath.length > 0) … … 1872 1900 1873 1901 1874 void SetFileLocation( char[] pCmdValue, inout char[] pFilePath, inout char[] pFileExe, char[]pType)1902 void SetFileLocation(string pCmdValue, inout string pFilePath, inout string pFileExe, string pType) 1875 1903 { 1876 char[]lCmdValue;1904 string lCmdValue; 1877 1905 int lPos; 1878 1906 … … 1885 1913 } 1886 1914 1887 if (vExeExten tion.length > 0)1915 if (vExeExtension.length > 0) 1888 1916 { 1889 1917 if (std.path.getExt(lCmdValue).length == 0) 1890 lCmdValue ~= "." ~ vExeExten tion;1918 lCmdValue ~= "." ~ vExeExtension; 1891 1919 } 1892 1920 … … 1918 1946 // Display each entry in the supplied list. 1919 1947 // ------------------------------------------- 1920 void DisplayItems( char[][] pList, char[]pTitle = "")1948 void DisplayItems(string[] pList, string pTitle = "") 1921 1949 // ------------------------------------------- 1922 1950 { … … 1925 1953 std.stdio.writefln("\n%s",pTitle); 1926 1954 1927 foreach(int lIndex, char[]lListEntry; pList) {1955 foreach(int lIndex, string lListEntry; pList) { 1928 1956 std.stdio.writefln(" [%2d]: %s",lIndex,lListEntry); 1929 1957 } … … 1932 1960 1933 1961 // ------------------------------------------- 1934 void DisplayItems(source.ExternRef[] pList, char[]pTitle = "")1962 void DisplayItems(source.ExternRef[] pList, string pTitle = "") 1935 1963 // ------------------------------------------- 1936 1964 { … … 1943 1971 std.stdio.writef(" [%2d]: %s",lIndex,lListEntry.FilePath); 1944 1972 if (lListEntry.ToolOpts.length > 0) 1945 foreach( char[]lOpt; lListEntry.ToolOpts)1973 foreach(string lOpt; lListEntry.ToolOpts) 1946 1974 std.stdio.writef(" [%s]",lOpt); 1947 1975 std.stdio.writefln(""); … … 1951 1979 1952 1980 // ------------------------------------------- 1953 void DisplayItems(CmdLineArg[] pList, char[]pTitle = "")1981 void DisplayItems(CmdLineArg[] pList, string pTitle = "") 1954 1982 // ------------------------------------------- 1955 1983 { … … 1974 2002 1975 2003 // ------------------------------------------------ 1976 char[]GetAppPath()2004 string GetAppPath() 1977 2005 { 1978 2006 return vAppPath.dup; … … 1980 2008 1981 2009 // ------------------------------------------------ 1982 char[] GetFullPathnameScan(char[]pFileName, int pScanList)2010 string GetFullPathnameScan(string pFileName, int pScanList) 1983 2011 // ------------------------------------------- 1984 2012 { … … 1990 2018 1991 2019 // ------------------------------------------------ 1992 char[] GetFullPathname(char[] pFileName, char[][] pScanList = null)2020 string GetFullPathname(string pFileName, string[] pScanList = null) 1993 2021 // ------------------------------------------- 1994 2022 { 1995 char[]lPossiblePath;1996 char[]lLocalPath;1997 char[]lFileBase;1998 char[][] lFileExtList;2023 string lPossiblePath; 2024 string lLocalPath; 2025 string lFileBase; 2026 string[] lFileExtList; 1999 2027 2000 2028 lFileExtList ~= std.file.getExt(pFileName); 2001 if (lFileExtList[0] == vSrcExten tion)2002 { 2003 lFileExtList ~= vSrcExten tion;2029 if (lFileExtList[0] == vSrcExtension) 2030 { 2031 lFileExtList ~= vSrcExtension; 2004 2032 lFileExtList[0] = vSrcDInterfaceExt; 2005 2033 } 2006 2034 lFileBase = std.path.getName(pFileName); 2007 foreach ( char[]lExt; lFileExtList)2008 { 2009 char[]lTestFileName;2035 foreach (string lExt; lFileExtList) 2036 { 2037 string lTestFileName; 2010 2038 2011 2039 lTestFileName = lFileBase ~ "." ~ lExt; … … 2013 2041 { 2014 2042 // Do explicit scanning of supplied paths. 2015 foreach( char[]lNextRoot; pScanList) {2043 foreach(string lNextRoot; pScanList) { 2016 2044 lPossiblePath = ( lNextRoot ~ lTestFileName ); 2017 2045 if(util.file2.FileExists(lPossiblePath)) { … … 2031 2059 2032 2060 // Examine each known import root to see if the file lives there. 2033 foreach( char[]lNextRoot; vImportRoots)2061 foreach(string lNextRoot; vImportRoots) 2034 2062 { 2035 2063 lPossiblePath = ( lNextRoot ~ lTestFileName ); … … 2044 2072 } 2045 2073 2046 void RemoveRecdArg( char[]pArg)2074 void RemoveRecdArg(string pArg) 2047 2075 { 2048 2076 // Remove all matching received args. … … 2066 2094 2067 2095 // ------------------------------- 2068 void ExamineArgs( char[][] pArgGroup)2096 void ExamineArgs(string[] pArgGroup) 2069 2097 // ------------------------------- 2070 2098 { … … 2075 2103 pArgGroup[j][0..2] == "--") 2076 2104 { 2077 char[]lArg;2105 string lArg; 2078 2106 lArg = pArgGroup[j][1..$]; 2079 2107 for(int i = j-1; i >= 0; i--) … … 2097 2125 } 2098 2126 2099 foreach( char[]lArg; pArgGroup)2127 foreach(string lArg; pArgGroup) 2100 2128 { 2101 2129 if (lArg.length > 0) … … 2113 2141 2114 2142 // ------------------------------------------- 2115 int main( char[][] pArgs)2143 int main(string[] pArgs) 2116 2144 // ------------------------------------------- 2117 2145 { 2118 2146 int lBuildResult; 2119 char[]lCompPath;2147 string lCompPath; 2120 2148 bool lSetPath = false; 2121 2149 … … 2137 2165 source.vPathId = vPathId; 2138 2166 util.fileex.vPathId = vPathId; 2139 util.fileex.vExeExtention = vExeExtention; 2140 2167 util.fileex.vExeExtension = vExeExtension; 2168 2169 // Strip off application's path from arglist. 2170 vAppPath = pArgs[0]; 2171 vAppName = std.path.getBaseName(vAppPath); 2172 version (Windows) 2173 { 2174 int DotPos; 2175 DotPos = std.string.rfind(vAppName, '.'); 2176 if (DotPos != -1) 2177 { 2178 vAppName.length = DotPos; 2179 } 2180 } 2181 util.str.SetEnv("@S", std.path.getDirName(vAppPath)); 2182 2183 pArgs=pArgs[1..pArgs.length]; 2184 if (pArgs.length == 0) { 2185 if (util.file2.FileExists(vDefResponseFile) == false) 2186 { 2187 // No other arguments so show usage message. 2188 DisplayUsage (); 2189 return 0; 2190 } 2191 else 2192 { 2193 pArgs ~= "@" ~ vDefResponseFile; 2194 } 2195 } 2196 2197 2198 vCFGPath = util.str.GetEnv("BCFPATH"); 2199 GatherArgs( pArgs ); 2200 version(BuildVerbose) 2201 { 2202 source.vVerboseMode = vVerbose; 2203 2204 util.fileex.vVerbose = vVerbose; 2205 2206 if (vVerbose == True) 2207 std.stdio.writefln("*** build v%s (build %d)***", vAppVersion, build_bn.auto_build_number); 2208 } 2209 2210 ExamineArgs( vCombinedArgs ); 2141 2211 2142 2212 // Scan the PATH env symbol to locate the D compiler. 2213 if (vExeExtension.length > 0 && std.path.getExt(vCompilerExe).length == 0) 2214 { 2215 vCompilerExe = std.path.addExt(vCompilerExe, vExeExtension); 2216 } 2143 2217 lCompPath = util.pathex.FindFileInPathList(vPathId, vCompilerExe); 2144 2218 if (lCompPath.length > 0){ … … 2156 2230 } 2157 2231 2158 // Strip off application's path from arglist.2159 vAppPath = pArgs[0];2160 vAppName = std.path.getBaseName(vAppPath);2161 version (Windows)2162 {2163 int DotPos;2164 DotPos = std.string.rfind(vAppName, '.');2165 if (DotPos != -1)2166 {2167 vAppName.length = DotPos;2168 }2169 }2170 util.str.SetEnv("@S", std.path.getDirName(vAppPath));2171 2172 pArgs=pArgs[1..pArgs.length];2173 if (pArgs.length == 0) {2174 if (util.file2.FileExists(vDefResponseFile) == false)2175 {2176 // No other arguments so show usage message.2177 DisplayUsage ();2178 return 0;2179 }2180 else2181 {2182 pArgs ~= "@" ~ vDefResponseFile;2183 }2184 }2185 2186 2187 GatherArgs( pArgs );2188 version(BuildVerbose)2189 {2190 source.vVerboseMode = vVerbose;2191 2192 util.fileex.vVerbose = vVerbose;2193 2194 if (vVerbose == True)2195 std.stdio.writefln("*** build v%s (build %d)***", vAppVersion, build_bn.auto_build_number);2196 }2197 2198 ExamineArgs( vCombinedArgs );2199 2200 2232 util.fileex.vTestRun = vTestRun; 2201 2233 source.mCollectUses = vCollectUses; 2202 2234 source.vForceCompile = vForceCompile; 2203 2235 source.ObjWritePath = vTemporaryPath; 2236 source.vExplicit = vExplicit; 2204 2237 2205 2238 // Grab the external macro definitions unless otherwise told not to. … … 2245 2278 if (vConfigFile.length > 0) 2246 2279 { 2247 char[][] lPotentialPaths;2280 string[] lPotentialPaths; 2248 2281 2249 2282 lPotentialPaths ~= "." ~ std.path.sep; … … 2251 2284 version(Windows) 2252 2285 { 2253 char[]lTemp;2286 string lTemp; 2254 2287 lTemp = util.str.GetEnv("HOMEDRIVE"); 2255 2288 if (lTemp.length > 0) … … 2258 2291 } 2259 2292 } 2293 if (vOverrideConfigPath.length > 0) 2294 lPotentialPaths ~= vOverrideConfigPath; 2260 2295 lPotentialPaths ~= vCompilerPath; 2261 2296 if (vEtcPath.length > 0) 2262 2297 lPotentialPaths ~= vEtcPath; 2263 2298 2264 foreach( char[]p; lPotentialPaths)2299 foreach( int lCnt, string p; lPotentialPaths) 2265 2300 { 2266 2301 if (p.length > 0) … … 2275 2310 } 2276 2311 } 2277 } 2278 } 2279 2280 if (vExeExtention.length > 0) 2312 if (lCnt+1 == lPotentialPaths.length) 2313 { 2314 // Scan all paths for config file but couldn't find one. 2315 throw new BuildException( std.string.format("Unable to find Config File '%s' in \n%s", 2316 vConfigFile, lPotentialPaths)); 2317 } 2318 } 2319 } 2320 2321 if (vExeExtension.length > 0) 2281 2322 { 2282 2323 if (std.path.getExt(vCompilerExe).length == 0) 2283 vCompilerExe ~= "." ~ vExeExten tion;2324 vCompilerExe ~= "." ~ vExeExtension; 2284 2325 } 2285 2326 if (util.file2.FileExists(vCompilerPath ~ vCompilerExe) == false) … … 2326 2367 2327 2368 // Rationalize the ignored modules list. 2328 foreach( char[]m; vModulesToNotice) {2369 foreach(string m; vModulesToNotice) { 2329 2370 for (int i=0; i < vModulesToIgnore.length; i++) { 2330 2371 if (vModulesToIgnore[i] == m) { … … 2343 2384 2344 2385 // List all missing files (if any). 2345 foreach( char[]lFile; vCmdLineSourceFiles)2386 foreach( string lFile; vCmdLineSourceFiles) 2346 2387 { 2347 2388 if (! util.file2.FileExists( GetFullPathname(lFile, vSourceScanList)) ) … … 2382 2423 if(vSymbols == True) 2383 2424 { 2384 char[]lSymbolData;2425 string lSymbolData; 2385 2426 int lModuleCount; 2386 char[]lSymbolOutName;2427 string lSymbolOutName; 2387 2428 2388 2429 source.Source.AllFiles( … … 2437 2478 if (vCollectUses == True) 2438 2479 { 2439 char[]lPrevLine;2440 char[]lFile;2480 string lPrevLine; 2481 string lFile; 2441 2482 2442 2483 lPrevLine.length = 0; 2443 2484 lFile ~= "[USES]\n"; 2444 foreach( char[]lLine; source.Source.Uses.sort)2485 foreach(string lLine; source.Source.Uses.sort) 2445 2486 { 2446 2487 if (lLine != lPrevLine) … … 2453 2494 lPrevLine.length = 0; 2454 2495 lFile ~= "[USEDBY]\n"; 2455 foreach( char[]lLine; source.Source.UsedBy.sort)2496 foreach(string lLine; source.Source.UsedBy.sort) 2456 2497 { 2457 2498 if (lLine != lPrevLine) … … 2496 2537 } 2497 2538 2498 void ProcessResponseFile( char[]pArg, Bool pVerbose)2539 void ProcessResponseFile(string pArg, Bool pVerbose) 2499 2540 { 2500 2541 // A response file is being used. 2501 char[]lRespFileName;2502 char[][] lRespLines;2542 string lRespFileName; 2543 string[] lRespLines; 2503 2544 2504 2545 if (pArg.length == 0) … … 2523 2564 2524 2565 lRespLines = util.fileex.GetTextLines(lRespFileName, util.fileex.GetOpt.Exists); 2525 foreach( char[]lArg; lRespLines)2566 foreach(string lArg; lRespLines) 2526 2567 { 2527 2568 // Locate any comment text in the line. … … 2548 2589 struct CmdLineArg 2549 2590 { 2550 char[]ArgText;2591 string ArgText; 2551 2592 Bool CompilerArg; 2552 2593 Bool DFlag; … … 2554 2595 CmdLineArg[] vReceivedArgs; 2555 2596 2556 void ProcessCmdLineArg( char[]pArg )2597 void ProcessCmdLineArg( string pArg ) 2557 2598 { 2558 static char[]lImportSwitch;2599 static string lImportSwitch; 2559 2600 2560 2601 // Handle a version switch on the command line by 2561 2602 if(util.str.begins(pArg, vVersionSwitch) == True) 2562 2603 { 2563 char[]lVersionString;2604 string lVersionString; 2564 2605 2565 2606 lVersionString=pArg [vVersionSwitch.length .. $]; … … 2577 2618 else if(util.str.begins(pArg, vDebugSwitch) == True) 2578 2619 { 2579 char[]lDebugString;2620 string lDebugString; 2580 2621 2581 2622 lDebugString = pArg [vDebugSwitch.length .. $]; … … 2677 2718 break; 2678 2719 2720 case "-explicit": 2721 vExplicit = True; 2722 // Not passed thru. 2723 break; 2724 2679 2725 case "-cleanup": 2680 2726 // drop through ... … … 2706 2752 2707 2753 // Test for Librarian options. 2708 if (util.str.IsLike(pArg, "-LIBOPT*" d) == True)2754 if (util.str.IsLike(pArg, "-LIBOPT*"c) == True) 2709 2755 { 2710 2756 vLibrarianOpts ~= " " ~ pArg[7..$].dup; … … 2721 2767 if (util.str.begins(pArg, "-CFG=") == True) 2722 2768 { 2723 char[]lFile;2724 char[]lSubSection;2725 char[][] lLocalArgs;2769 string lFile; 2770 string lSubSection; 2771 string[] lLocalArgs; 2726 2772 lFile = pArg[5..$]; 2727 2773 lSubSection = ""; … … 2742 2788 2743 2789 // Check if a list of modules has been requested. 2744 if (util.str.IsLike(pArg, "-modules*" d) == True)2790 if (util.str.IsLike(pArg, "-modules*"c) == True) 2745 2791 { 2746 2792 vSymbols = True; … … 2762 2808 2763 2809 // Test for alternate install locations. 2764 if (util.str.IsLike(pArg, "-DCPATH?*" d) == True)2765 { 2766 char[]lNewPath = pArg[7..length].dup;2810 if (util.str.IsLike(pArg, "-DCPATH?*"c) == True) 2811 { 2812 string lNewPath = pArg[7..length].dup; 2767 2813 if (util.str.ends(lNewPath, std.path.sep) == False) 2768 2814 lNewPath ~= std.path.sep; … … 2778 2824 } 2779 2825 2780 if (util.str.IsLike(pArg, "-CFPATH?*" d) == True)2781 { 2782 char[]lNewPath = pArg[7..length].dup;2826 if (util.str.IsLike(pArg, "-CFPATH?*"c) == True) 2827 { 2828 string lNewPath = pArg[7..length].dup; 2783 2829 if (util.str.ends(lNewPath, std.path.sep) == False) 2784 2830 lNewPath ~= std.path.sep; … … 2794 2840 } 2795 2841 2796 if (util.str.IsLike(pArg, "-PP?*"d) == True) 2797 { 2798 char[] lNewPath = pArg[3..length].dup; 2842 if (util.str.IsLike(pArg, "-BCFPATH?*"c) == True) 2843 { 2844 string lNewPath = pArg[8..length].dup; 2845 if (util.str.ends(lNewPath, std.path.sep) == False) 2846 lNewPath ~= std.path.sep; 2847 version(BuildVerbose) 2848 { 2849 if (vVerbose == True) 2850 std.stdio.writefln("BCFPATH was '%s' now '%s'", vCFGPath, lNewPath); 2851 } 2852 vCFGPath = lNewPath; 2853 break; 2854 2855 } 2856 2857 if (util.str.IsLike(pArg, "-PP?*"c) == True) 2858 { 2859 string lNewPath = pArg[3..length].dup; 2799 2860 version(BuildVerbose) 2800 2861 { … … 2810 2871 } 2811 2872 2812 if (util.str.IsLike(pArg, "-RDF?*" d) == True)2873 if (util.str.IsLike(pArg, "-RDF?*"c) == True) 2813 2874 { 2814 2875 version(BuildVerbose) … … 2823 2884 } 2824 2885 2825 if (util.str.IsLike(pArg, "-MDF?*" d) == True)2886 if (util.str.IsLike(pArg, "-MDF?*"c) == True) 2826 2887 { 2827 2888 version(BuildVerbose) … … 2844 2905 { 2845 2906 char [] lRoot; 2846 foreach( char[]lCmdRoot; std.string.split(pArg[vBuildImportPath.length .. $],2907 foreach(string lCmdRoot; std.string.split(pArg[vBuildImportPath.length .. $], 2847 2908 vImportPathDelim)) 2848 2909 { … … 2860 2921 } 2861 2922 2862 if (util.str.IsLike(pArg, std.utf.toUTF32(vRunSwitch ~ "*")) == True)2923 if (util.str.IsLike(pArg, vRunSwitch ~ "*") == True) 2863 2924 { 2864 2925 vRunParms ~= pArg[vRunSwitch.length .. $] ~ " "; … … 2867 2928 } 2868 2929 2869 if (util.str.IsLike(pArg, "-uses*" d) == True)2930 if (util.str.IsLike(pArg, "-uses*"c) == True) 2870 2931 { 2871 2932 … … 2881 2942 } 2882 2943 2883 if (util.str.IsLike(pArg, "-UMB*" d) == True)2944 if (util.str.IsLike(pArg, "-UMB*"c) == True) 2884 2945 { 2885 2946 … … 2890 2951 version(Windows) 2891 2952 { 2892 if (util.str.IsLike(pArg, "-AutoWinLibs*" d) == True)2953 if (util.str.IsLike(pArg, "-AutoWinLibs*"c) == True) 2893 2954 { 2894 2955 … … 2897 2958 } 2898 2959 } 2960 2961 if (util.str.IsLike(pArg, "-usefinal*"c) == True) 2962 { 2963 2964 vUseFinal = new Bool(util.str.YesNo(pArg, true)); 2965 break; 2966 } 2967 2968 if (util.str.IsLike(pArg, "-emptyargs*"c) == True) 2969 { 2970 2971 vEmptyArgs = new Bool(util.str.YesNo(pArg, true)); 2972 break; 2973 } 2974 2975 2899 2976 // Special check for Object Write Path 2900 2977 version(DigitalMars) 2901 2978 { 2902 if (util.str.IsLike(pArg, std.utf.toUTF32(vOutputPath ~ "*")) == True)2903 { 2904 char[]lRoot;2979 if (util.str.IsLike(pArg, vOutputPath ~ "*") == True) 2980 { 2981 string lRoot; 2905 2982 2906 2983 vTemporaryPath = pArg[vOutputPath.length .. $]; … … 2928 3005 } 2929 3006 2930 if (util.str.IsLike(pArg, "-X?*" d) == True)3007 if (util.str.IsLike(pArg, "-X?*"c) == True) 2931 3008 { 2932 3009 // Modules to ignore (eg. -Xmylib) … … 2935 3012 } 2936 3013 2937 if (util.str.IsLike(pArg, "-M?*" d) == True)3014 if (util.str.IsLike(pArg, "-M?*"c) == True) 2938 3015 { 2939 3016 // Modules to notice (eg. -Mphobos) … … 2942 3019 } 2943 3020 2944 if (util.str.IsLike(pArg, "-T?*" d) == True)3021 if (util.str.IsLike(pArg, "-T?*"c) == True) 2945 3022 { 2946 3023 // Target name (eg. -Ttestapp) 2947 3024 2948 vCommandTargetName = util.str.Expand(pArg[2..$], 3025 if (vCommandTargetName.length > 0) 3026 { 3027 vCommandTargetName = util.str.Expand(pArg[2..$], 2949 3028 "Target=" ~ 2950 3029 util.pathex.GetBaseName(vCommandTargetName)); 3030 } 3031 else 3032 vCommandTargetName = pArg[2..$].dup; 3033 2951 3034 break; 2952 3035 } … … 2972 3055 } 2973 3056 2974 if (util.str.IsLike(pArg, "-R*" d) == True)3057 if (util.str.IsLike(pArg, "-R*"c) == True) 2975 3058 { 2976 3059 char lValue; … … 2984 3067 2985 3068 version(Windows) { 2986 if (util.str.IsLike(pArg, "-gui*" d) == True)3069 if (util.str.IsLike(pArg, "-gui*"c) == True) 2987 3070 { 2988 3071 source.Source.WasMainGUI = true; … … 3014 3097 { 3015 3098 char [] lRoot; 3016 foreach( char[]lCmdRoot; std.string.split(pArg, ";"))3099 foreach(string lCmdRoot; std.string.split(pArg, ";")) 3017 3100 { 3018 3101 lRoot = AddRoot(lCmdRoot); … … 3045 3128 if (lArgExt == "") 3046 3129 { 3047 pArg ~= "." ~ vSrcExten tion;3130 pArg ~= "." ~ vSrcExtension; 3048 3131 vCmdLineSourceFiles ~= pArg; 3049 3132 } 3050 else if (lArgExt == vSrcExten tion ||3051 lArgExt == vMacroExten tion ||3052 lArgExt == vDdocExten tion)3133 else if (lArgExt == vSrcExtension || 3134 lArgExt == vMacroExtension || 3135 lArgExt == vDdocExtension) 3053 3136 { 3054 3137 vCmdLineSourceFiles ~= pArg; … … 3063 3146 3064 3147 if(vTargetName is null && 3065 ((std.path.getExt(pArg) == vSrcExten tion) ||3066 (std.path.getExt(pArg) == vMacroExten tion)3148 ((std.path.getExt(pArg) == vSrcExtension) || 3149 (std.path.getExt(pArg) == vMacroExtension) 3067 3150 ) 3068 3151 ) 3069 3152 { 3070 vTargetName = pArg;3153 vTargetName = std.path.getName(pArg.dup); 3071 3154 version(BuildVerbose) 3072 3155 { 3073 3156 if(vVerbose == True) 3074 std.stdio.writefln("Default target is '%s'", std.path.getName(vTargetName));3157 std.stdio.writefln("Default target is '%s'", vTargetName); 3075 3158 } 3076 3159 } … … 3081 3164 } 3082 3165 3083 void GatherOneArg( char[] pArg, inout char[][] pArgGroup )3166 void GatherOneArg( string pArg, inout string[] pArgGroup ) 3084 3167 { 3085 static bool[ char[]] lKnownArgs;3168 static bool[string] lKnownArgs; 3086 3169 3087 3170 pArg = std.string.strip(pArg); 3088 3171 if (pArg.length == 0) 3089 return; 3172 { 3173 if (vEmptyArgs == False) 3174 throw new BuildException("Empty arguments are not allowed"); 3175 else 3176 return; 3177 } 3090 3178 3091 3179 version(BuildVerbose) … … 3137 3225 } 3138 3226 3139 void GatherArgs( char[][] pArgs )3227 void GatherArgs( string[] pArgs ) 3140 3228 { 3141 3229 /* This collects together all the original command line arguments, … … 3204 3292 3205 3293 // Collect from original command line. 3206 foreach( char[] lArg; vCompilerDefs ~ pArgs) 3207 { 3208 GatherOneArg( lArg, vCombinedArgs ); 3294 foreach( string lArg; vCompilerDefs ~ pArgs) 3295 { 3296 string[] lSplitArgs; 3297 3298 lSplitArgs = std.string.split(lArg); 3299 foreach(string lOneArg; lSplitArgs) 3300 { 3301 GatherOneArg( lOneArg, vCombinedArgs ); 3302 } 3209 3303 } 3210 3304 … … 3224 3318 } 3225 3319 3226 void ProcessOneMacroDef(Bool pVerbose, char[]pPath)3320 void ProcessOneMacroDef(Bool pVerbose, string pPath) 3227 3321 { 3228 char[]lMacroDefFileName;3229 char[][] lMacroDefLines;3230 char[][] lMessages;3231 3232 static bool[ char[]] lUsedPaths;3322 string lMacroDefFileName; 3323 string[] lMacroDefLines; 3324 string[] lMessages; 3325 3326 static bool[ string ] lUsedPaths; 3233 3327 3234 3328 lMacroDefFileName = pPath.dup; … … 3257 3351 if (pVerbose == True) 3258 3352 { 3259 foreach( char[]lMsg; lMessages)3353 foreach(string lMsg; lMessages) 3260 3354 { 3261 3355 std.stdio.writefln("%s", lMsg); … … 3266 3360 } 3267 3361 3268 void ProcessBuildConfig( char[] pArg, Bool pVerbose, inout char[][] pArgGroup)3362 void ProcessBuildConfig(string pArg, Bool pVerbose, inout string[] pArgGroup) 3269 3363 { 3270 3364 // From build.exe location 3271 3365 ProcessOneBuildConfig(pArg, pVerbose, std.path.getDirName(vAppPath), pArgGroup); 3272 3366 3273 // From compiler location 3367 // From alternate location 3368 if (vCFGPath.length > 0) 3369 ProcessOneBuildConfig(pArg, pVerbose, vCFGPath, pArgGroup); 3370 3371 // compiler path 3274 3372 ProcessOneBuildConfig(pArg, pVerbose, vCompilerPath, pArgGroup); 3275 3373 … … 3279 3377 } 3280 3378 3281 void ProcessOneBuildConfig( char[] pArg, Bool pVerbose, char[] pPath, inout char[][] pArgGroup)3379 void ProcessOneBuildConfig(string pArg, Bool pVerbose, string pPath, inout string[] pArgGroup) 3282 3380 { 3283 char[]lConfigFileName;3284 char[][] lConfigLines;3381 string lConfigFileName; 3382 string[] lConfigLines; 3285 3383 bool lFoundGroup; 3286 static bool[ char[]] lUsedPaths;3384 static bool[ string ] lUsedPaths; 3287 3385 3288 3386 version(BuildVerbose) … … 3303 3401 } 3304 3402 3403 lConfigFileName = util.pathex.CanonicalPath(lConfigFileName, false); 3305 3404 if (pArg.length == 0) 3306 3405 pArg = "+"; … … 3322 3421 } 3323 3422 3324 foreach( char[]lArg; lConfigLines)3423 foreach(string lArg; lConfigLines) 3325 3424 { 3326 3425 if (lArg.length == 0) … … 3436 3535 } 3437 3536 3438 void SetInternalString( char[]pCommand)3537 void SetInternalString(string pCommand) 3439 3538 { 3440 char[]lName;3441 char[]lValue;3539 string lName; 3540 string lValue; 3442 3541 int lPos; 3443 3542 … … 3465 3564 switch(lName) 3466 3565 { 3467 case "ExeExten tion" : { vExeExtention = lValue.dup;3468 util.fileex.vExeExten tion = vExeExtention;3566 case "ExeExtension" : { vExeExtension = lValue.dup; 3567 util.fileex.vExeExtension = vExeExtension; 3469 3568 break; 3470 3569 } 3471 case "LibExten tion" : { vLibExtention = lValue.dup; break; }3472 case "ObjExten tion" : { vObjExtention = lValue.dup; break; }3473 case "ShrLibExten tion" : { vShrLibExtention = lValue.dup; break; }3474 case "SrcExten tion" : { vSrcExtention = lValue.dup; break; }3475 case "MacroExten tion" : { vMacroExtention = lValue.dup; break; }3476 case "DdocExten tion" : { vDdocExtention = lValue.dup; break; }3570 case "LibExtension" : { vLibExtension = lValue.dup; break; } 3571 case "ObjExtension" : { vObjExtension = lValue.dup; break; } 3572 case "ShrLibExtension" : { vShrLibExtension = lValue.dup; break; } 3573 case "SrcExtension" : { vSrcExtension = lValue.dup; break; } 3574 case "MacroExtension" : { vMacroExtension = lValue.dup; break; } 3575 case "DdocExtension" : { vDdocExtension = lValue.dup; break; } 3477 3576 case "CompilerExe" : { vCompilerExe = lValue.dup; break; } 3478 3577 case "CompileOnly" : { vCompileOnly = lValue.dup; break; } … … 3480 3579 case "ConfigFile" : { vConfigFile = lValue.dup; break; } 3481 3580 case "CompilerPath" : { vCompilerPath = lValue.dup; 3482 util.str.SetEnv("@D", std.path.getDirName(vCompilerPath)); 3581 if (vCompilerPath.length > 0) 3582 { 3583 if (util.str.ends(vCompilerPath, std.path.sep) == False) 3584 vCompilerPath ~= std.path.sep; 3585 util.str.SetEnv("@D", std.path.getDirName(vCompilerPath)); 3586 } 3483 3587 break; } 3484 3588 case "LinkerPath" : { vLinkerPath = lValue.dup; break; } 3485 3589 case "LinkerDefs" : { vLinkerDefs = lValue.dup; break; } 3486 3590 case "ConfigPath" : { vOverrideConfigPath = lValue.dup; 3487 util.str.SetEnv("@P", std.path.getDirName(vOverrideConfigPath)); 3591 if (vOverrideConfigPath.length > 0) 3592 { 3593 if (util.str.ends(vOverrideConfigPath, std.path.sep) == False) 3594 vOverrideConfigPath ~= std.path.sep; 3595 util.str.SetEnv("@P", std.path.getDirName(vOverrideConfigPath)); 3596 } 3488 3597 break; } 3489 3598 case "LibPaths" : { vLibPaths = lValue.dup; break; } … … 3530 3639 case "ArgDelim" : { vArgDelim = lValue.dup; break; } 3531 3640 case "ArgFileDelim" : { vArgFileDelim = lValue.dup; break; } 3641 // These cater for spelling mistakes used in an earlier version. 3642 case "ExeExtention" : { vExeExtension = lValue.dup; 3643 util.fileex.vExeExtension = vExeExtension; 3644 break; 3645 } 3646 case "LibExtention" : { vLibExtension = lValue.dup; break; } 3647 case "ObjExtention" : { vObjExtension = lValue.dup; break; } 3648 case "ShrLibExtention" : { vShrLibExtension = lValue.dup; break; } 3649 case "SrcExtention" : { vSrcExtension = lValue.dup; break; } 3650 case "MacroExtention" : { vMacroExtension = lValue.dup; break; } 3651 case "DdocExtention" : { vDdocExtension = lValue.dup; break; } 3532 3652 default: 3533 3653 std.stdio.writefln("Set Internal String '%s' ignored ... unknown name.", pCommand); trunk/Source/build_bn.d
r49 r50 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 2 371;4 long auto_build_number = 2514; trunk/Source/debug.brf
r36 r50 1 1 # This creates the 'debugging' edition of Build 2 2 build.d # Starting file. 3 -Tbud 3 4 +dbg 4 5 # --Derek Parnell-- May 07, 2005 10:43:00 PM trunk/Source/default.rdf
r48 r50 18 18 TEST 19 19 ------------------------------------- 20 rule= test21 in= d20 rule=DIndent 21 in=id 22 22 out=d 23 tool=mklines {@IN} {@OUT} 24 use_in=compile 25 use_out=compile 26 23 tool=dindent {@IN} {@OUT} 24 out_use=compile trunk/Source/docsrc/User_Manual.d
r49 r50 3 3 $(TOPIC_H description, Description) 4 4 $(SECTION 5 Buildis a tool to assist building applications and libraries written5 $(I Bud) is a tool to assist building applications and libraries written 6 6 using the D programming language. 7 7 ) … … 10 10 $(ABSTRACT 11 11 It is an effective replacement for 12 the general 'make' tools. The primary difference between $(I Bu ild) and13 other tools is that $(I Bu ild) does not need you to create and maintain12 the general 'make' tools. The primary difference between $(I Bud) and 13 other tools is that $(I Bud) does not need you to create and maintain 14 14 'makefiles'. Instead, it analyses the source code files to determine 15 15 all dependancies and constructs the appropriate calls to the compiler, 16 16 linker and librarian. 17 17 $(BL) 18 The aim of $(I Bu ild) is to create a target file from the source file(s)18 The aim of $(I Bud) is to create a target file from the source file(s) 19 19 supplied to it. This is usually an executable file but could also be 20 20 a library. In both cases, source files are converted to object files, and … … 33 33 34 34 $(TOC pragmas, Pragmas) 35 $(TOC_SUB pragmas,pragma_build, Build)36 $(TOC_SUB pragmas,pragma_build_def, Build Def)37 $(TOC_SUB pragmas,pragma_export_version, Export Version)38 $(TOC_SUB pragmas,pragma_ignore, Ignore)39 $(TOC_SUB pragmas,pragma_include, Include)40 $(TOC_SUB pragmas,pragma_link, Link)41 $(TOC_SUB pragmas,pragma_nolink, Nolink)42 $(TOC_SUB pragmas,pragma_target, Target)35 $(TOC_SUB pragmas,pragma_build, build) 36 $(TOC_SUB pragmas,pragma_build_def, build def) 37 $(TOC_SUB pragmas,pragma_export_version, export version) 38 $(TOC_SUB pragmas,pragma_ignore, ignore) 39 $(TOC_SUB pragmas,pragma_include, include) 40 $(TOC_SUB pragmas,pragma_link, link) 41 $(TOC_SUB pragmas,pragma_nolink, nolink) 42 $(TOC_SUB pragmas,pragma_target, target) 43 43 44 $(TOC autobuild, Auto Build Number)44 $(TOC autobuild, Automatic build number) 45 45 46 46 $(TOC rules, Rule Definition File) … … 54 54 $(TOC_SUB switches,switch_allobj,-allobj) 55 55 $(TOC_SUB switches,switch_autowinlibs,-AutoWinLibs) 56 $(TOC_SUB switches,switch_BCFPATH,-BCFPATH) 56 57 $(TOC_SUB switches,switch_CFPATH,-CFPATH) 57 58 $(TOC_SUB switches,switch_cleanup,-clean) … … 59 60 $(TOC_SUB switches,switch_DCPATH,-DCPATH) 60 61 $(TOC_SUB switches,switch_dll,-dll) 62 $(TOC_SUB switches,switch_emptyargs,-emptyargs) 61 63 $(TOC_SUB switches,switch_exec,-exec$(ANG args)) 64 $(TOC_SUB switches,switch_explicit,-explicit) 62 65 $(TOC_SUB switches,switch_full,-full) 63 66 $(TOC_SUB switches,switch_gui,-gui) … … 87 90 $(TOC_SUB switches,switch_uses, -uses) 88 91 $(TOC_SUB switches,switch_UMB, -UMB) 92 $(TOC_SUB switches,switch_usefinal,-usefinal=$(ANG yes/no)) 89 93 $(TOC_SUB switches,switch_v,-v (lowercase)) 90 94 $(TOC_SUB switches,switch_V,-V (uppercase)) … … 103 107 $(SECTION $(SECTIONDEF_H authors, Authors:, Derek Parnell - Melbourne)) 104 108 $(SECTION $(SECTIONDEF_H create, Initial Creation:, January 2005)) 105 $(SECTION $(SECTIONDEF_H version, Version:, 3.0 3))106 $(SECTION $(SECTIONDEF_H date, Date:, 20 September 2006))109 $(SECTION $(SECTIONDEF_H version, Version:, 3.04)) 110 $(SECTION $(SECTIONDEF_H date, Date:, 16 October 2006)) 107 111 $(SECTION $(SECTION_H license, License:) 108 112 $(CITE … … 134 138 Macros: 135 139 Copyright = © 2006, Derek Parnell, Melbourne 136 Title = User Manual for B UILD137 Product = BuildUtility140 Title = User Manual for Bud 141 Product = $(I Bud) Utility trunk/Source/docsrc/autobuild.d
r41 r50 1 1 Ddoc 2 2 3 $(TOPIC_H autobuild,Auto Build Number)3 $(TOPIC_H autobuild,Automatic build number) 4 4 $(SECTION 5 Automatically Incremented Build Numbering for Modules5 Automatically incremented build numbering for Modules 6 6 You can optionally specify that the $(I build) utility automatically 7 7 increments a build number for any module. You do this by supplying … … 31 31 32 32 $(CODE 33 writefln(" Build number is %d", auto_build_number);33 writefln("The application build number is %d", auto_build_number); 34 34 ) 35 35 You can access the build numbers of other modules in you application … … 50 50 $(CODE 51 51 module parser_bn; 52 /// This file is automatically maintained by the B UILDutility,52 /// This file is automatically maintained by the Bud utility, 53 53 /// Please refrain from manually editing it. 54 54 long auto_build_number = 77; … … 56 56 57 57 Of course the number $(I 77) is just an example. This number would actually 58 start at 1 and increment whenever $(I Bu ild) needed to create a new object58 start at 1 and increment whenever $(I Bud) needed to create a new object 59 59 file for the module. 60 60 ) … … 63 63 Macros: 64 64 Copyright = © 2006, Derek Parnell, Melbourne 65 Title = User Manual for B UILD66 Product = Bu ild Utility65 Title = User Manual for Bud 66 Product = Bud Utility trunk/Source/docsrc/change_log.d
r49 r50 4 4 $(SECTION 5 5 A list of changes and fixes that have been made. 6 7 $(SUBSECTION_H ,v3.04 -- /October/2006 ) 8 $(LIST 9 $(ITEM ** $(B FIX:) Correctly handle INIT:CompilerExe from configuration file 10 ) 11 $(ITEM ** $(B FIX:) Correctly handles version platform statements. 12 ) 13 $(ITEM ** $(B FIX:) Correctly handles the #! arguments. 14 ) 15 $(ITEM ** $(B FIX:) Sets default OutFileSwitch for GDC to "-o " 16 ) 17 $(ITEM ** $(B FIX:) Sets default Shared Library Extension for unix to "so" 18 ) 19 $(ITEM ** $(B FIX:) Sets default Linker 'lib' switch for GNU tools to "-l" 20 ) 21 $(ITEM ** $(B FIX:) The auto-build-number facility has been repaired. 22 ) 23 $(ITEM ** $(B FIX:) No longer runs any FINAL commands if the compile failed. 24 ) 25 $(ITEM ** $(B FIX: Ticket #38) Now correctly handles paths enclosed in quotes. 26 ) 27 $(ITEM ** $(B ENH:) A new $(I -explicit) switch will cause only the 28 files explicitly named on the command line to be compiled. All other 29 files, such as imported ones, are processed but not compiled. 30 ) 31 $(ITEM ** $(B ENH:) A new $(I -usefinal) switch to control the usage of 32 FINAL statements defined in the configuration file. 33 ) 34 $(ITEM ** $(B ENH:) A new $(I -emptyargs) switch to control whether or 35 not to abort if there are any empty arguments on the command line. 36 ) 37 $(ITEM ** $(B ENH:) A new $(I -BCFPATH) switch to define an alternative 38 location for $(I Bud) configuration files. This can also be supplied as 39 an environment switch. 40 ) 41 ) 6 42 7 43 $(SUBSECTION_H ,v3.03 -- 20/September/2006 ) … … 112 148 ) 113 149 $(ITEM ** $(B FIX: Ticket #9 ) Now, if the output file created by the 114 rule ends with the library exten tion, it is presented to the linker150 rule ends with the library extension, it is presented to the linker 115 151 as a library rather than an object file. 116 152 ) … … 136 172 'std' modules.) 137 173 138 $(ITEM ** $(B ENH: ) Any file name on the command line with an exten tion139 of $(I ".brf" ) will be used as a $(EXREF response_file.html, BuildResponse File)174 $(ITEM ** $(B ENH: ) Any file name on the command line with an extension 175 of $(I ".brf" ) will be used as a $(EXREF response_file.html, $(I Bud) Response File) 140 176 ) 141 177 142 178 $(ITEM ** $(B ENH: ) If there is nothing on the command line and the 143 179 file 'build.brf' exists in the current directory, then it will be 144 used as the $(EXREF response_file.html, BuildResponse File) for this run.180 used as the $(EXREF response_file.html, $(I Bud) Response File) for this run. 145 181 ) 146 182 … … 213 249 $(SUBSECTION_H ,v2.10 -- 06/Apr/2006 ) 214 250 $(LIST 215 $(ITEM ** $(B FIX: ) The default BuildResponse File invoked when just251 $(ITEM ** $(B FIX: ) The default $(I Bud) Response File invoked when just 216 252 placing '@' on the command line is now correctly named "build.brf") 217 253 $(ITEM ** $(B ENH: ) For Windows environments, command line files can now use … … 220 256 invoked via DMD. ) 221 257 $(ITEM ** $(B ENH: ) You can now specify the default linker switches in 222 the BuildConfiguration File. )258 the $(I Bud) Configuration File. ) 223 259 $(ITEM ** $(B ENH: ) Using the new switch $(I -PP ), you can now 224 260 specify additional paths to search for files.) trunk/Source/docsrc/command_line.d
r45 r50 3 3 $(TOPIC_H command_line,Command Line) 4 4 $(SECTION 5 The $(I Bu ild) utility supplies the source file and optional switches via6 the command line. The typical format of the $(I Bu ild) utility's command5 The $(I Bud) utility supplies the source file and optional switches via 6 the command line. The typical format of the $(I Bud) utility's command 7 7 line is ... 8 8 $(CODE … … 12 12 You can however specify the files and switches in any order you like. 13 13 $(BL) 14 Normally you would only supply a single file name to $(I Bu ild), that being14 Normally you would only supply a single file name to $(I Bud), that being 15 15 the source file of the top-level file in the application. Typically 16 16 the one that has the 'main()' or 'WinMain()' function, though this is … … 23 23 If you run the utility without any files and without any switches, it 24 24 display a $(I help) screen with some details about the switches. That looks 25 something likethis ...25 something similar to this ... 26 26 $(CODE 27 27 Path and Version : C:\Program Files\build.exe v3.6(339) … … 90 90 Note that the default for Windows $(I DigitalMars) is to use a response file 91 91 but for all other environments it is to use command line arguments. 92 $(B -info) Displays the version and path of the Buildapplication92 $(B -info) Displays the version and path of the $(I Bud) application 93 93 $(B -help) Displays the full 'usage' help text. 94 94 $(B -h) Same as /-help, displays the full 'usage' help text. … … 121 121 Macros: 122 122 Copyright = © 2006, Derek Parnell, Melbourne 123 Title = User Manual for B UILD124 Product = BuildUtility123 Title = User Manual for Bud 124 Product = $(I Bud) Utility trunk/Source/docsrc/configuration_file.d
r49 r50 5 5 The utility's configuration file is used to specify your default options 6 6 for the utility. The file is called $(B build.cfg). You can have from zero 7 to three configuration files because the $(I Build) utility looks in each 8 of three places for a configuration file, and it uses each one that it finds. 9 It looks in the folder that $(I Build) is installed, then in the folder 7 to four configuration files because the $(I Bud) utility looks in each 8 of four places for a configuration file, and it uses each one that it finds. 9 It looks in the folder that $(I Bud) is installed, then in a user defined 10 alternative path (defined by -BCFPATH switch), then in the folder 10 11 that the compiler is installed, and finally in the current folder. 12 $(BL) 13 $(B Note:) The alternative location is optional. It can be specified in 14 an environment switch called BCFPATH or in a command line switch 15 of the same name, -BCFPATH. 11 16 $(BL) 12 17 The configuration file consists of one or more command lines. … … 84 89 $(INDENT 85 90 $(SECTION The identifiers for the settable strings are detailed below.) 86 $(TABROW ExeExten tion, The file extention for executable files. $(EG exe))87 $(TABROW LibExten tion, The file extention for library files.$(EG lib))88 $(TABROW ObjExten tion, The file extention for object files.$(EG obj))89 $(TABROW ShrLibExten tion, The file extention for shared libraries files.$(EG dll))90 $(TABROW SrcExten tion , The file extention for D source files.$(EG d))91 $(TABROW MacroExten tion , The file extention for macro files.$(EG mac))92 $(TABROW DdocExten tion , The file extention for D Documentation files.$(EG ddoc))91 $(TABROW ExeExtension, The file extension for executable files. $(EG exe)) 92 $(TABROW LibExtension, The file extension for library files.$(EG lib)) 93 $(TABROW ObjExtension, The file extension for object files.$(EG obj)) 94 $(TABROW ShrLibExtension, The file extension for shared libraries files.$(EG dll)) 95 $(TABROW SrcExtension , The file extension for D source files.$(EG d)) 96 $(TABROW MacroExtension , The file extension for macro files.$(EG mac)) 97 $(TABROW DdocExtension , The file extension for D Documentation files.$(EG ddoc)) 93 98 $(TABROW CompilerExe , The file name of the compiler.$(EG dmd.exe)) 94 99 $(TABROW CompileOnly , The switch that is passed to the compiler to tell … … 127 132 you don't specify any CompilerDefs, "-op" is 128 133 assumed.) 129 $(TABROW OutFileSwitch , The switch tells $(I Bu ild)134 $(TABROW OutFileSwitch , The switch tells $(I Bud) 130 135 where to create the executable file. $(EG -of)) 131 136 $(TABROW ImportPath , This is the switch for the compiler to tell it where … … 142 147 to insert symbolic debugging information into 143 148 the executable.$(EG /co)) 144 $(TABROW BuildImportPath, This is the switch for $(I Bu ild) to tell it149 $(TABROW BuildImportPath, This is the switch for $(I Bud) to tell it 145 150 a path to scan for imported modules. $(EG -I)) 146 $(TABROW ImportPathDelim, This is the switch for $(I Bu ild) to tell it151 $(TABROW ImportPathDelim, This is the switch for $(I Bud) to tell it 147 152 which character is used to delimit paths on 148 153 a BuildImportPath list. $(EG ;)) 149 $(TABROW OutputPath , This is the switch for $(I Bu ild) to tell it154 $(TABROW OutputPath , This is the switch for $(I Bud) to tell it 150 155 the path to use for all temporary output files. $(EG -od)) 151 $(TABROW RunSwitch , This is the switch for $(I Bu ild) to tell it156 $(TABROW RunSwitch , This is the switch for $(I Bud) to tell it 152 157 to run the application once it successfully 153 158 compiles. $(EG -exec)) … … 156 161 by a 'LIBCMD=' in the configuration file or 157 162 on the commandline. $(EG c:\tools\)) 158 $(TABROW ResponseExt , This is the file exten tion that Buildwill use163 $(TABROW ResponseExt , This is the file extension that $(I Bud) will use 159 164 for its response files. $(EG brf)) 160 $(TABROW DefResponseFile, This is the name of $(I Build's) default165 $(TABROW DefResponseFile, This is the name of the $(I Bud) default 161 166 response file. $(EG build.brf)) 162 $(TABROW RDFName , This is the name of $(I Build's) default167 $(TABROW RDFName , This is the name of the $(I Bud) default 163 168 Rules Definition File. $(EG default.rdf)) 164 $(TABROW DefMacroDefFile, This is the name of $(I Build's) default169 $(TABROW DefMacroDefFile, This is the name of the $(I Bud) default 165 170 Macro Definition File. $(EG build.mdf)) 166 171 $(TABROW LinkerStdOut , This is the commandline option given to the linker 167 when the $(I Bu ild) commandline has the $(I "-silent")172 when the $(I Bud) commandline has the $(I "-silent") 168 173 switch. $(EG >nul)) 169 174 $(TABROW IgnoredModules , This is a comma delimited list of modules or packages 170 to ignore. $(I Bu ild) will not scan these modules and175 to ignore. $(I Bud) will not scan these modules and 171 176 packages for dependancies. $(EG std,dfl,dui) 172 177 If none is specified by this configuration item then … … 205 210 ) 206 211 ) 207 $(TABROW PathId , The name of the environment symbol used by $(I Bu ild)212 $(TABROW PathId , The name of the environment symbol used by $(I Bud) 208 213 when scanning for executables. $(EG PATH)) 209 $(TABROW HomePathId , The name of the environment symbol used by $(I Bu ild)214 $(TABROW HomePathId , The name of the environment symbol used by $(I Bud) 210 215 when scanning for configuration file. $(EG HOME)) 211 $(TABROW EtcPath , The name of an alternative path used by $(I Bu ild)216 $(TABROW EtcPath , The name of an alternative path used by $(I Bud) 212 217 when scanning for configuration file. $(EG c:\etc\)) 213 $(TABROW GenDebugInfo , The switch that tells $(I Bu ild) and the compiler218 $(TABROW GenDebugInfo , The switch that tells $(I Bud) and the compiler 214 219 to insert debugging information into the object 215 220 files. $(EG -g)) 216 $(TABROW ModOutPrefix , If the $(I Bu ild) switch $(I $(QUOTE -modules)) was217 used, this defines the string which $(I Bu ild) will221 $(TABROW ModOutPrefix , If the $(I Bud) switch $(I $(QUOTE -modules)) was 222 used, this defines the string which $(I Bud) will 218 223 begin the Modules List output file with. 219 224 $(EG MODULES = \n)) 220 $(TABROW ModOutSuffix , If the $(I Bu ild) switch $(I $(QUOTE -modules)) was221 used, this defines the string which $(I Bu ild) will225 $(TABROW ModOutSuffix , If the $(I Bud) switch $(I $(QUOTE -modules)) was 226 used, this defines the string which $(I Bud) will 222 227 end the Modules List output file with. 223 228 $(EG )) 224 $(TABROW ModOutBody , If the $(I Bu ild) switch $(I $(QUOTE -modules)) was225 used, this defines the string which $(I Bu ild) will229 $(TABROW ModOutBody , If the $(I Bud) switch $(I $(QUOTE -modules)) was 230 used, this defines the string which $(I Bud) will 226 231 use as a template for each module being listed. 227 232 $(EG $(DOLLAR)(MODULE {mod})) $(BL) … … 229 234 name and {src} will be replaced with the source 230 235 file's name.) 231 $(TABROW ModOutDelim , If the $(I Bu ild) switch $(I $(QUOTE -modules)) was232 used, this defines the string which $(I Bu ild) will236 $(TABROW ModOutDelim , If the $(I Bud) switch $(I $(QUOTE -modules)) was 237 used, this defines the string which $(I Bud) will 233 238 insert in between each listed module. 234 239 $(EG \n)) 235 $(TABROW ModOutFile , If the $(I Bu ild) switch $(I $(QUOTE -modules)) was240 $(TABROW ModOutFile , If the $(I Bud) switch $(I $(QUOTE -modules)) was 236 241 used, this defines the output file's suffix. This 237 242 is only used if the $(I $(QUOTE -modules)) switch … … 261 266 262 267 $(EXAMPLE , 263 INIT:MacroExten tion = bmc268 INIT:MacroExtension = bmc 264 269 INIT:LinkerPath = /u2/qwerty/ 265 270 INIT:AssumedLibs = c,kde,mgui … … 271 276 $(THCELLS $(I INIT:) item,DigitalMars-Windows,GDC-Windows,DigitalMars-Unix,GDC-Unix) 272 277 ) 273 $(ROW $(CELLS ExeExten tion,exe,exe,,))274 $(ROW $(CELLS LibExten tion,lib,lib,a,a))275 $(ROW $(CELLS ObjExten tion,obj,obj,o,o))276 $(ROW $(CELLS ShrLibExten tion,dll,dll,s,s))277 $(ROW $(CELLS SrcExten tion,d,d,d,d))278 $(ROW $(CELLS MacroExten tion,mac,mac,mac,mac))279 $(ROW $(CELLS DdocExten tion,ddoc,ddoc,ddoc,ddoc))278 $(ROW $(CELLS ExeExtension,exe,exe,,)) 279 $(ROW $(CELLS LibExtension,lib,lib,a,a)) 280 $(ROW $(CELLS ObjExtension,obj,obj,o,o)) 281 $(ROW $(CELLS ShrLibExtension,dll,dll,s,s)) 282 $(ROW $(CELLS SrcExtension,d,d,d,d)) 283 $(ROW $(CELLS MacroExtension,mac,mac,mac,mac)) 284 $(ROW $(CELLS DdocExtension,ddoc,ddoc,ddoc,ddoc)) 280 285 $(ROW $(CELLS CompilerExe,dmd.exe,gdc.exe,dmd,gdc)) 281 286 $(ROW $(CELLS CompileOnly,-c,-c,-c,-c)) … … 435 440 Macros: 436 441 Copyright = © 2006, Derek Parnell, Melbourne 437 Title = User Manual for B UILD438 Product = BuildUtility442 Title = User Manual for Bud 443 Product = $(I Bud) Utility 439 444 EG = <span class="eg">Example: "$0"</span> 440 445 MYTITLE = $(Title) trunk/Source/docsrc/dlls.d
r41 r50 3 3 $(TOPIC_H dll_libraries,DLL Libraries) 4 4 $(SECTION 5 $(SHORT_TITLE How to create a DLL library using Build.)5 $(SHORT_TITLE How to create a DLL library using $(I Bud).) 6 6 $(BR) 7 When Buildfinds a $(B DllMain()) function, or the $(B -dll) switch is used, it7 When $(I Bud) finds a $(B DllMain()) function, or the $(B -dll) switch is used, it 8 8 creates a special type of Module Definition file, and sets the target to 9 9 to be a DLL file. The Module Definition file generated takes the form ... … … 21 21 Also, if you have the program $(B implib) in your path, it will be run 22 22 after the DLL file is created, in order to also create a $(B .lib) 23 library to interface with the DLL. Buildcurrently supports both the
