Changeset 37

Show
Ignore:
Timestamp:
05/29/05 20:51:44 (7 years ago)
Author:
Derek Parnell
Message:

Upload on version 2.08 (Build #1137)

See Docs/CHANGE_LOG.htm for details
modified trunk/Docs/AUTO_BUILD_NUMBER.htm
modified trunk/Docs/CHANGE_LOG.htm
modified trunk/Docs/COMMAND_LINE.htm
modified trunk/Docs/CONFIGURATION_FILE.htm
modified trunk/Docs/DLL_LIBRARIES.htm
modified trunk/Docs/index.htm
modified trunk/Docs/PRAGMA.htm
modified trunk/Docs/RESPONSE_FILE.htm
modified trunk/Docs/RULE_DEFINITION_FILE.htm
modified trunk/Docs/SWITCHES.htm
modified trunk/Docs/TO_DO.htm
modified trunk/Source/build.cfg
modified trunk/Source/build.d
modified trunk/Source/build_bn.d
modified trunk/Source/Makefile.dos
modified trunk/Source/Makefile.unix
modified trunk/Source/source.d
modified trunk/Source/source_bn.d
modified trunk/Source/util/bmscanner_bn.d
modified trunk/Source/util/fdt.d
modified trunk/Source/util/fdt_bn.d
modified trunk/Source/util/fileex_bn.d
modified trunk/Source/util/linetoken_bn.d
modified trunk/Source/util/pathex_bn.d
modified trunk/Source/util/str.d
modified trunk/Source/util/str_bn.d
added downloads/build-2.08.doc.zip
added downloads/build-2.08.src.zip
added downloads/build_win_2.08.exe
added trunk/Source/util/macro.d

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Docs/AUTO_BUILD_NUMBER.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m56 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="AUTO_BUILD_NUMBER">Auto Build Number</a></h1> 
  • trunk/Docs/CHANGE_LOG.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m56 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="CHANGE_LOG">Change Log</a></h1> 
    1212<p><h3>A list of changes and fixes that have been made. 
    1313</h3><br> 
     14<p> 
     15 <strong> -- v2.08 -- 29/May/2005 </strong> 
     16<ul> 
     17 <li> ** <strong>FIX</strong>: <em>thanks to teqdruid</em>: In Unix environments, 
     18any pragma(link, &lt;name&gt;) statements were not sending the correct 
     19syntax to the compiler's command line. The "&lt;name&gt;" is now prefixed 
     20with "-L-l" for Unix systems. 
     21 <li> ** <strong>FIX</strong>: <em>thanks to Carlos</em>: In Unix environments, any "-version" 
     22switch on the Utility's command line was not being converted to the correct Unix 
     23format of "-fversion...". So now, if the Build tool gets 
     24either "-version..." or "-fversion=..." on its command line, it will 
     25 recognise it as a 'Version' request for the compiler <strong>and</strong> output 
     26it on the command line in the correct format for the environment it 
     27is running in, namely "-fversion..." for GNU (gdc) and "-version..." 
     28 for Windows. <br> 
     29 <strong>Note:</strong> The same applies to the "-debug..." and "-fdebug..." switches. 
     30 <li> ** <strong>FIX</strong>: The pragma(nolink) was being ignored under some circumstances. 
     31Now it splits the compilation phase 
     32from the linking phase and excludes the 'nolink' files from the linker's 
     33command line. 
     34 <li> ** <strong>FIX</strong>: <em>thanks to kris</em>: 'debug' statements were not being taken into account when 
     35examining code for import statements. 
     36 <li> ** <strong>FIX</strong>: 'debug' and 'version' levels are now being taken into account. 
     37 <li> ** <strong>FIX</strong>: 'debug' and 'version' values being set inside a source file 
     38were being made global rather than module scoped. 
     39 <li> ** <strong>FIX</strong>: <em>thanks to carlos</em>: The utility was not processing the 
     40-I switch correctly when using GDC compiler. 
     41 <li> ** <strong>ENH</strong>: The utility can now accept the -I switch in two forms: 
     42 <strong>-I&lt;path&gt;</strong> and <strong>-I &lt;path&gt;</strong> on its command line, regardless of which 
     43compiler is being used. When invoking the compiler, it uses the correct 
     44format on the command line of the compiler being used, namely "-I&lt;path&gt;" to 
     45DMD compiler and "-I &lt;path&gt;" to GDC. 
     46 <li> ** <strong>ENH</strong>: The path of any source file that imports a module 
     47will be added to the list of root paths to search for module source 
     48files. This means that you can now have module source files referenced 
     49relative to the source file that imports them. This is the new default 
     50behaviour but it can be turned off by using the new -noautoimport switch 
     51or for individual files by placing them inside parenthesis. 
     52 <li> ** <strong>ENH</strong>: New switch <em>-noautoimport</em> is used to turn off the 
     53automatic adding of search roots based on the path of the source files 
     54being compiled. 
     55 <li> ** <strong>ENH</strong>: New switch <em>-LIBPATH=</em> is used to add search paths for 
     56library files. 
     57 <li> ** <strong>WARN</strong>: The utility only does a single scan of each source file 
     58and thus if an file sets a 'debug' or 'version' value after a function 
     59which uses that value, it will be ignored. You are requested to ensure that 
     60all your 'debug' and 'version' setting is done prior to the first module 
     61member. 
     62 </ul>  
    1463<p> 
    1564 <strong> -- v2.07 -- 06/May/2005 </strong> 
  • trunk/Docs/COMMAND_LINE.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m56 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="COMMAND_LINE">Command Line</a></h1> 
     
    7474(Only needed if DllMain is not found in the source files. 
    7575 <strong>-LIBOPT&lt;opt&gt;</strong> Allows you to pass &lt;opt&gt; to the librarian 
     76 <strong>-LIBPATH=&lt;pathlist&gt;</strong> Used to add a semi-colon delimited list 
     77of search paths for library files. 
    7678 <strong>-X&lt;module&gt;</strong> Packages and Modules to ignore (eg. -Xmylib) 
    7779 <strong>-M&lt;module&gt;</strong> Packages and Modules to notice (eg. -Mphobos) 
     
    9193 <strong>-?   </strong>      Same as -help, displays the full 'usage' help text. 
    9294 <strong>-silent</strong>    Avoids unnecessary messages being displayed. 
     95 <strong>-noautoimport</strong> Turns off the automatic addition of source paths 
     96to the list of Import Roots. 
    9397 <strong>-od&lt;path&gt;</strong>  Nominate the directory where temporary (work) files 
    9498are to be created. By default they are created in 
  • trunk/Docs/CONFIGURATION_FILE.htm

    • Property svn:mime-type set to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m56 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="CONFIGURATION_FILE">Configuration File</a></h1> 
  • trunk/Docs/DLL_LIBRARIES.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m57 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="DLL_LIBRARIES">DLL Libraries</a></h1> 
  • trunk/Docs/PRAGMA.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m57 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="PRAGMA">Pragma</a></h1> 
     
    3939<li><a href="#TARGET"><i>pragma</i> target</a> &nbsp;&nbsp;This identifies the basename of the target file. 
    4040<hr> 
    41 <h4><br> 
     41<h4>Documentation for Build v2.08<br> 
    4242<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    4343<h2><a name="BUILD">[<i>pragma</i>]<br>build</a> </h2> 
     
    104104<a href="#TARGET">target</a> 
    105105<hr> 
    106 <h4><br> 
     106<h4>Documentation for Build v2.08<br> 
    107107<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    108108<h2><a name="BUILD_DEF">[<i>pragma</i>]<br>build_def</a> </h2> 
     
    149149<a href="#TARGET">target</a> 
    150150<hr> 
    151 <h4><br> 
     151<h4>Documentation for Build v2.08<br> 
    152152<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    153153<h2><a name="INCLUDE">[<i>pragma</i>]<br>include</a> </h2> 
     
    172172<a href="#TARGET">target</a> 
    173173<hr> 
    174 <h4><br> 
     174<h4>Documentation for Build v2.08<br> 
    175175<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    176176<h2><a name="LINK">[<i>pragma</i>]<br>link</a> </h2> 
     
    199199<a href="#TARGET">target</a> 
    200200<hr> 
    201 <h4><br> 
     201<h4>Documentation for Build v2.08<br> 
    202202<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    203203<h2><a name="NOLINK">[<i>pragma</i>]<br>nolink</a> </h2> 
     
    219219<a href="#TARGET">target</a> 
    220220<hr> 
    221 <h4><br> 
     221<h4>Documentation for Build v2.08<br> 
    222222<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    223223<h2><a name="TARGET">[<i>pragma</i>]<br>target</a> </h2> 
  • trunk/Docs/RESPONSE_FILE.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m57 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="RESPONSE_FILE">Response File</a></h1> 
  • trunk/Docs/RULE_DEFINITION_FILE.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m57 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="RULE_DEFINITION_FILE">Rule Definition File</a></h1> 
  • trunk/Docs/SWITCHES.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m57 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="SWITCHES">Switches</a></h1> 
     
    2525<li><a href="#_LIB"><i>switch</i> -lib</a> &nbsp;&nbsp;Forces the object files to be placed in a library. 
    2626<li><a href="#_LIBOPT"><i>switch</i> -LIBOPT</a> &nbsp;&nbsp;Allows commandline options to be passed to the librarian. 
     27<li><a href="#_LIBPATH"><i>switch</i> -LIBPATH</a> &nbsp;&nbsp;Used to add a list of search paths for library files. 
    2728<li><a href="#_LINK"><i>switch</i> -link</a> &nbsp;&nbsp;Forces the linker to be called instead of the librarian. 
    2829<li><a href="#_M"><i>switch</i> -M</a> &nbsp;&nbsp;Identifies a module or a package to notice (not ignore) 
    2930<li><a href="#_NAMES"><i>switch</i> -names</a> &nbsp;&nbsp;Displays the names of the files used in building the target. 
     31<li><a href="#_NOAUTOIMPORT"><i>switch</i> -noautoimport</a> &nbsp;&nbsp;Prevents source file paths from being added to the list of Import Roots 
    3032<li><a href="#_NODEF"><i>switch</i> -nodef</a> &nbsp;&nbsp;Prevent a Module Definition File being created. 
    3133<li><a href="#_NOLIB"><i>switch</i> -nolib</a> &nbsp;&nbsp;Ensures that the object files are not used to form a library. 
     
    3840<li><a href="#_T"><i>switch</i> -T</a> &nbsp;&nbsp;Identifies the target name to build. 
    3941<li><a href="#_TEST"><i>switch</i> -test</a> &nbsp;&nbsp;Does a test run only. No compiling, linking or library work is done. 
     42<li><a href="#_V"><i>switch</i> -V</a> &nbsp;&nbsp; Set <em>verbose</em> mode on for just <em>build</em> and not for the compiler 
    4043<li><a href="#_V"><i>switch</i> -v</a> &nbsp;&nbsp; Set <em>verbose</em> mode on for both <em>build</em> and for the compiler 
    41 <li><a href="#_V"><i>switch</i> -V</a> &nbsp;&nbsp; Set <em>verbose</em> mode on for just <em>build</em> and not for the compiler 
    4244<li><a href="#_X"><i>switch</i> -X</a> &nbsp;&nbsp;Identifies a module or package to ignore 
    4345<hr> 
    44 <h4><br> 
     46<h4>Documentation for Build v2.08<br> 
    4547<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    4648<h2><a name="_ALLOBJ">[<i>switch</i>]<br>-allobj</a> </h2> 
     
    6264<a href="#_LIB">-lib</a>, 
    6365<a href="#_LIBOPT">-LIBOPT</a>, 
    64 <a href="#_LINK">-link</a>, 
    65 <a href="#_M">-M</a>, 
    66 <a href="#_NAMES">-names</a>, 
    67 <a href="#_NODEF">-nodef</a>, 
    68 <a href="#_NOLIB">-nolib</a>, 
    69 <a href="#_NOLINK">-nolink</a>, 
    70 <a href="#_OBJ">-obj</a>, 
    71 <a href="#_OD">-od</a>, 
    72 <a href="#_R">-R</a>, 
    73 <a href="#_RDF">-RDF</a>, 
    74 <a href="#_SILENT">-silent</a>, 
    75 <a href="#_T">-T</a>, 
    76 <a href="#_TEST">-test</a>, 
    77 <a href="#_V">-v</a>, 
    78 <a href="#_V">-V</a>, 
    79 <a href="#_X">-X</a> 
    80 <hr> 
    81 <h4><br> 
     66<a href="#_LIBPATH">-LIBPATH</a>, 
     67<a href="#_LINK">-link</a>, 
     68<a href="#_M">-M</a>, 
     69<a href="#_NAMES">-names</a>, 
     70<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     71<a href="#_NODEF">-nodef</a>, 
     72<a href="#_NOLIB">-nolib</a>, 
     73<a href="#_NOLINK">-nolink</a>, 
     74<a href="#_OBJ">-obj</a>, 
     75<a href="#_OD">-od</a>, 
     76<a href="#_R">-R</a>, 
     77<a href="#_RDF">-RDF</a>, 
     78<a href="#_SILENT">-silent</a>, 
     79<a href="#_T">-T</a>, 
     80<a href="#_TEST">-test</a>, 
     81<a href="#_V">-V</a>, 
     82<a href="#_V">-v</a>, 
     83<a href="#_X">-X</a> 
     84<hr> 
     85<h4>Documentation for Build v2.08<br> 
    8286<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    8387<h2><a name="_CFPATH">[<i>switch</i>]<br>-CFPATH</a> </h2> 
     
    104108<a href="#_LIB">-lib</a>, 
    105109<a href="#_LIBOPT">-LIBOPT</a>, 
    106 <a href="#_LINK">-link</a>, 
    107 <a href="#_M">-M</a>, 
    108 <a href="#_NAMES">-names</a>, 
    109 <a href="#_NODEF">-nodef</a>, 
    110 <a href="#_NOLIB">-nolib</a>, 
    111 <a href="#_NOLINK">-nolink</a>, 
    112 <a href="#_OBJ">-obj</a>, 
    113 <a href="#_OD">-od</a>, 
    114 <a href="#_R">-R</a>, 
    115 <a href="#_RDF">-RDF</a>, 
    116 <a href="#_SILENT">-silent</a>, 
    117 <a href="#_T">-T</a>, 
    118 <a href="#_TEST">-test</a>, 
    119 <a href="#_V">-v</a>, 
    120 <a href="#_V">-V</a>, 
    121 <a href="#_X">-X</a> 
    122 <hr> 
    123 <h4><br> 
     110<a href="#_LIBPATH">-LIBPATH</a>, 
     111<a href="#_LINK">-link</a>, 
     112<a href="#_M">-M</a>, 
     113<a href="#_NAMES">-names</a>, 
     114<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     115<a href="#_NODEF">-nodef</a>, 
     116<a href="#_NOLIB">-nolib</a>, 
     117<a href="#_NOLINK">-nolink</a>, 
     118<a href="#_OBJ">-obj</a>, 
     119<a href="#_OD">-od</a>, 
     120<a href="#_R">-R</a>, 
     121<a href="#_RDF">-RDF</a>, 
     122<a href="#_SILENT">-silent</a>, 
     123<a href="#_T">-T</a>, 
     124<a href="#_TEST">-test</a>, 
     125<a href="#_V">-V</a>, 
     126<a href="#_V">-v</a>, 
     127<a href="#_X">-X</a> 
     128<hr> 
     129<h4>Documentation for Build v2.08<br> 
    124130<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    125131<h2><a name="_CLEANUP">[<i>switch</i>]<br>-cleanup</a> </h2> 
     
    143149<a href="#_LIB">-lib</a>, 
    144150<a href="#_LIBOPT">-LIBOPT</a>, 
    145 <a href="#_LINK">-link</a>, 
    146 <a href="#_M">-M</a>, 
    147 <a href="#_NAMES">-names</a>, 
    148 <a href="#_NODEF">-nodef</a>, 
    149 <a href="#_NOLIB">-nolib</a>, 
    150 <a href="#_NOLINK">-nolink</a>, 
    151 <a href="#_OBJ">-obj</a>, 
    152 <a href="#_OD">-od</a>, 
    153 <a href="#_R">-R</a>, 
    154 <a href="#_RDF">-RDF</a>, 
    155 <a href="#_SILENT">-silent</a>, 
    156 <a href="#_T">-T</a>, 
    157 <a href="#_TEST">-test</a>, 
    158 <a href="#_V">-v</a>, 
    159 <a href="#_V">-V</a>, 
    160 <a href="#_X">-X</a> 
    161 <hr> 
    162 <h4><br> 
     151<a href="#_LIBPATH">-LIBPATH</a>, 
     152<a href="#_LINK">-link</a>, 
     153<a href="#_M">-M</a>, 
     154<a href="#_NAMES">-names</a>, 
     155<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     156<a href="#_NODEF">-nodef</a>, 
     157<a href="#_NOLIB">-nolib</a>, 
     158<a href="#_NOLINK">-nolink</a>, 
     159<a href="#_OBJ">-obj</a>, 
     160<a href="#_OD">-od</a>, 
     161<a href="#_R">-R</a>, 
     162<a href="#_RDF">-RDF</a>, 
     163<a href="#_SILENT">-silent</a>, 
     164<a href="#_T">-T</a>, 
     165<a href="#_TEST">-test</a>, 
     166<a href="#_V">-V</a>, 
     167<a href="#_V">-v</a>, 
     168<a href="#_X">-X</a> 
     169<hr> 
     170<h4>Documentation for Build v2.08<br> 
    163171<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    164172<h2><a name="_DCPATH">[<i>switch</i>]<br>-DCPATH</a> </h2> 
     
    191199<a href="#_LIB">-lib</a>, 
    192200<a href="#_LIBOPT">-LIBOPT</a>, 
    193 <a href="#_LINK">-link</a>, 
    194 <a href="#_M">-M</a>, 
    195 <a href="#_NAMES">-names</a>, 
    196 <a href="#_NODEF">-nodef</a>, 
    197 <a href="#_NOLIB">-nolib</a>, 
    198 <a href="#_NOLINK">-nolink</a>, 
    199 <a href="#_OBJ">-obj</a>, 
    200 <a href="#_OD">-od</a>, 
    201 <a href="#_R">-R</a>, 
    202 <a href="#_RDF">-RDF</a>, 
    203 <a href="#_SILENT">-silent</a>, 
    204 <a href="#_T">-T</a>, 
    205 <a href="#_TEST">-test</a>, 
    206 <a href="#_V">-v</a>, 
    207 <a href="#_V">-V</a>, 
    208 <a href="#_X">-X</a> 
    209 <hr> 
    210 <h4><br> 
     201<a href="#_LIBPATH">-LIBPATH</a>, 
     202<a href="#_LINK">-link</a>, 
     203<a href="#_M">-M</a>, 
     204<a href="#_NAMES">-names</a>, 
     205<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     206<a href="#_NODEF">-nodef</a>, 
     207<a href="#_NOLIB">-nolib</a>, 
     208<a href="#_NOLINK">-nolink</a>, 
     209<a href="#_OBJ">-obj</a>, 
     210<a href="#_OD">-od</a>, 
     211<a href="#_R">-R</a>, 
     212<a href="#_RDF">-RDF</a>, 
     213<a href="#_SILENT">-silent</a>, 
     214<a href="#_T">-T</a>, 
     215<a href="#_TEST">-test</a>, 
     216<a href="#_V">-V</a>, 
     217<a href="#_V">-v</a>, 
     218<a href="#_X">-X</a> 
     219<hr> 
     220<h4>Documentation for Build v2.08<br> 
    211221<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    212222<h2><a name="_DLL">[<i>switch</i>]<br>-dll</a> </h2> 
     
    229239<a href="#_LIB">-lib</a>, 
    230240<a href="#_LIBOPT">-LIBOPT</a>, 
    231 <a href="#_LINK">-link</a>, 
    232 <a href="#_M">-M</a>, 
    233 <a href="#_NAMES">-names</a>, 
    234 <a href="#_NODEF">-nodef</a>, 
    235 <a href="#_NOLIB">-nolib</a>, 
    236 <a href="#_NOLINK">-nolink</a>, 
    237 <a href="#_OBJ">-obj</a>, 
    238 <a href="#_OD">-od</a>, 
    239 <a href="#_R">-R</a>, 
    240 <a href="#_RDF">-RDF</a>, 
    241 <a href="#_SILENT">-silent</a>, 
    242 <a href="#_T">-T</a>, 
    243 <a href="#_TEST">-test</a>, 
    244 <a href="#_V">-v</a>, 
    245 <a href="#_V">-V</a>, 
    246 <a href="#_X">-X</a> 
    247 <hr> 
    248 <h4><br> 
     241<a href="#_LIBPATH">-LIBPATH</a>, 
     242<a href="#_LINK">-link</a>, 
     243<a href="#_M">-M</a>, 
     244<a href="#_NAMES">-names</a>, 
     245<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     246<a href="#_NODEF">-nodef</a>, 
     247<a href="#_NOLIB">-nolib</a>, 
     248<a href="#_NOLINK">-nolink</a>, 
     249<a href="#_OBJ">-obj</a>, 
     250<a href="#_OD">-od</a>, 
     251<a href="#_R">-R</a>, 
     252<a href="#_RDF">-RDF</a>, 
     253<a href="#_SILENT">-silent</a>, 
     254<a href="#_T">-T</a>, 
     255<a href="#_TEST">-test</a>, 
     256<a href="#_V">-V</a>, 
     257<a href="#_V">-v</a>, 
     258<a href="#_X">-X</a> 
     259<hr> 
     260<h4>Documentation for Build v2.08<br> 
    249261<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    250262<h2><a name="_FULL">[<i>switch</i>]<br>-full</a> </h2> 
     
    267279<a href="#_LIB">-lib</a>, 
    268280<a href="#_LIBOPT">-LIBOPT</a>, 
    269 <a href="#_LINK">-link</a>, 
    270 <a href="#_M">-M</a>, 
    271 <a href="#_NAMES">-names</a>, 
    272 <a href="#_NODEF">-nodef</a>, 
    273 <a href="#_NOLIB">-nolib</a>, 
    274 <a href="#_NOLINK">-nolink</a>, 
    275 <a href="#_OBJ">-obj</a>, 
    276 <a href="#_OD">-od</a>, 
    277 <a href="#_R">-R</a>, 
    278 <a href="#_RDF">-RDF</a>, 
    279 <a href="#_SILENT">-silent</a>, 
    280 <a href="#_T">-T</a>, 
    281 <a href="#_TEST">-test</a>, 
    282 <a href="#_V">-v</a>, 
    283 <a href="#_V">-V</a>, 
    284 <a href="#_X">-X</a> 
    285 <hr> 
    286 <h4><br> 
     281<a href="#_LIBPATH">-LIBPATH</a>, 
     282<a href="#_LINK">-link</a>, 
     283<a href="#_M">-M</a>, 
     284<a href="#_NAMES">-names</a>, 
     285<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     286<a href="#_NODEF">-nodef</a>, 
     287<a href="#_NOLIB">-nolib</a>, 
     288<a href="#_NOLINK">-nolink</a>, 
     289<a href="#_OBJ">-obj</a>, 
     290<a href="#_OD">-od</a>, 
     291<a href="#_R">-R</a>, 
     292<a href="#_RDF">-RDF</a>, 
     293<a href="#_SILENT">-silent</a>, 
     294<a href="#_T">-T</a>, 
     295<a href="#_TEST">-test</a>, 
     296<a href="#_V">-V</a>, 
     297<a href="#_V">-v</a>, 
     298<a href="#_X">-X</a> 
     299<hr> 
     300<h4>Documentation for Build v2.08<br> 
    287301<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    288302<h2><a name="_GUI">[<i>switch</i>]<br>-gui</a> </h2> 
     
    312326<a href="#_LIB">-lib</a>, 
    313327<a href="#_LIBOPT">-LIBOPT</a>, 
    314 <a href="#_LINK">-link</a>, 
    315 <a href="#_M">-M</a>, 
    316 <a href="#_NAMES">-names</a>, 
    317 <a href="#_NODEF">-nodef</a>, 
    318 <a href="#_NOLIB">-nolib</a>, 
    319 <a href="#_NOLINK">-nolink</a>, 
    320 <a href="#_OBJ">-obj</a>, 
    321 <a href="#_OD">-od</a>, 
    322 <a href="#_R">-R</a>, 
    323 <a href="#_RDF">-RDF</a>, 
    324 <a href="#_SILENT">-silent</a>, 
    325 <a href="#_T">-T</a>, 
    326 <a href="#_TEST">-test</a>, 
    327 <a href="#_V">-v</a>, 
    328 <a href="#_V">-V</a>, 
    329 <a href="#_X">-X</a> 
    330 <hr> 
    331 <h4><br> 
     328<a href="#_LIBPATH">-LIBPATH</a>, 
     329<a href="#_LINK">-link</a>, 
     330<a href="#_M">-M</a>, 
     331<a href="#_NAMES">-names</a>, 
     332<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     333<a href="#_NODEF">-nodef</a>, 
     334<a href="#_NOLIB">-nolib</a>, 
     335<a href="#_NOLINK">-nolink</a>, 
     336<a href="#_OBJ">-obj</a>, 
     337<a href="#_OD">-od</a>, 
     338<a href="#_R">-R</a>, 
     339<a href="#_RDF">-RDF</a>, 
     340<a href="#_SILENT">-silent</a>, 
     341<a href="#_T">-T</a>, 
     342<a href="#_TEST">-test</a>, 
     343<a href="#_V">-V</a>, 
     344<a href="#_V">-v</a>, 
     345<a href="#_X">-X</a> 
     346<hr> 
     347<h4>Documentation for Build v2.08<br> 
    332348<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    333349<h2><a name="_HELP">[<i>switch</i>]<br>-help</a> </h2> 
     
    346362<a href="#_LIB">-lib</a>, 
    347363<a href="#_LIBOPT">-LIBOPT</a>, 
    348 <a href="#_LINK">-link</a>, 
    349 <a href="#_M">-M</a>, 
    350 <a href="#_NAMES">-names</a>, 
    351 <a href="#_NODEF">-nodef</a>, 
    352 <a href="#_NOLIB">-nolib</a>, 
    353 <a href="#_NOLINK">-nolink</a>, 
    354 <a href="#_OBJ">-obj</a>, 
    355 <a href="#_OD">-od</a>, 
    356 <a href="#_R">-R</a>, 
    357 <a href="#_RDF">-RDF</a>, 
    358 <a href="#_SILENT">-silent</a>, 
    359 <a href="#_T">-T</a>, 
    360 <a href="#_TEST">-test</a>, 
    361 <a href="#_V">-v</a>, 
    362 <a href="#_V">-V</a>, 
    363 <a href="#_X">-X</a> 
    364 <hr> 
    365 <h4><br> 
     364<a href="#_LIBPATH">-LIBPATH</a>, 
     365<a href="#_LINK">-link</a>, 
     366<a href="#_M">-M</a>, 
     367<a href="#_NAMES">-names</a>, 
     368<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     369<a href="#_NODEF">-nodef</a>, 
     370<a href="#_NOLIB">-nolib</a>, 
     371<a href="#_NOLINK">-nolink</a>, 
     372<a href="#_OBJ">-obj</a>, 
     373<a href="#_OD">-od</a>, 
     374<a href="#_R">-R</a>, 
     375<a href="#_RDF">-RDF</a>, 
     376<a href="#_SILENT">-silent</a>, 
     377<a href="#_T">-T</a>, 
     378<a href="#_TEST">-test</a>, 
     379<a href="#_V">-V</a>, 
     380<a href="#_V">-v</a>, 
     381<a href="#_X">-X</a> 
     382<hr> 
     383<h4>Documentation for Build v2.08<br> 
    366384<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    367385<h2><a name="_INFO">[<i>switch</i>]<br>-info</a> </h2> 
     
    379397<a href="#_LIB">-lib</a>, 
    380398<a href="#_LIBOPT">-LIBOPT</a>, 
    381 <a href="#_LINK">-link</a>, 
    382 <a href="#_M">-M</a>, 
    383 <a href="#_NAMES">-names</a>, 
    384 <a href="#_NODEF">-nodef</a>, 
    385 <a href="#_NOLIB">-nolib</a>, 
    386 <a href="#_NOLINK">-nolink</a>, 
    387 <a href="#_OBJ">-obj</a>, 
    388 <a href="#_OD">-od</a>, 
    389 <a href="#_R">-R</a>, 
    390 <a href="#_RDF">-RDF</a>, 
    391 <a href="#_SILENT">-silent</a>, 
    392 <a href="#_T">-T</a>, 
    393 <a href="#_TEST">-test</a>, 
    394 <a href="#_V">-v</a>, 
    395 <a href="#_V">-V</a>, 
    396 <a href="#_X">-X</a> 
    397 <hr> 
    398 <h4><br> 
     399<a href="#_LIBPATH">-LIBPATH</a>, 
     400<a href="#_LINK">-link</a>, 
     401<a href="#_M">-M</a>, 
     402<a href="#_NAMES">-names</a>, 
     403<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     404<a href="#_NODEF">-nodef</a>, 
     405<a href="#_NOLIB">-nolib</a>, 
     406<a href="#_NOLINK">-nolink</a>, 
     407<a href="#_OBJ">-obj</a>, 
     408<a href="#_OD">-od</a>, 
     409<a href="#_R">-R</a>, 
     410<a href="#_RDF">-RDF</a>, 
     411<a href="#_SILENT">-silent</a>, 
     412<a href="#_T">-T</a>, 
     413<a href="#_TEST">-test</a>, 
     414<a href="#_V">-V</a>, 
     415<a href="#_V">-v</a>, 
     416<a href="#_X">-X</a> 
     417<hr> 
     418<h4>Documentation for Build v2.08<br> 
    399419<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    400420<h2><a name="_LIB">[<i>switch</i>]<br>-lib</a> </h2> 
     
    419439<a href="#_INFO">-info</a>, 
    420440<a href="#_LIBOPT">-LIBOPT</a>, 
    421 <a href="#_LINK">-link</a>, 
    422 <a href="#_M">-M</a>, 
    423 <a href="#_NAMES">-names</a>, 
    424 <a href="#_NODEF">-nodef</a>, 
    425 <a href="#_NOLIB">-nolib</a>, 
    426 <a href="#_NOLINK">-nolink</a>, 
    427 <a href="#_OBJ">-obj</a>, 
    428 <a href="#_OD">-od</a>, 
    429 <a href="#_R">-R</a>, 
    430 <a href="#_RDF">-RDF</a>, 
    431 <a href="#_SILENT">-silent</a>, 
    432 <a href="#_T">-T</a>, 
    433 <a href="#_TEST">-test</a>, 
    434 <a href="#_V">-v</a>, 
    435 <a href="#_V">-V</a>, 
    436 <a href="#_X">-X</a> 
    437 <hr> 
    438 <h4><br> 
     441<a href="#_LIBPATH">-LIBPATH</a>, 
     442<a href="#_LINK">-link</a>, 
     443<a href="#_M">-M</a>, 
     444<a href="#_NAMES">-names</a>, 
     445<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     446<a href="#_NODEF">-nodef</a>, 
     447<a href="#_NOLIB">-nolib</a>, 
     448<a href="#_NOLINK">-nolink</a>, 
     449<a href="#_OBJ">-obj</a>, 
     450<a href="#_OD">-od</a>, 
     451<a href="#_R">-R</a>, 
     452<a href="#_RDF">-RDF</a>, 
     453<a href="#_SILENT">-silent</a>, 
     454<a href="#_T">-T</a>, 
     455<a href="#_TEST">-test</a>, 
     456<a href="#_V">-V</a>, 
     457<a href="#_V">-v</a>, 
     458<a href="#_X">-X</a> 
     459<hr> 
     460<h4>Documentation for Build v2.08<br> 
    439461<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    440462<h2><a name="_LIBOPT">[<i>switch</i>]<br>-LIBOPT</a> </h2> 
     
    460482<a href="#_INFO">-info</a>, 
    461483<a href="#_LIB">-lib</a>, 
    462 <a href="#_LINK">-link</a>, 
    463 <a href="#_M">-M</a>, 
    464 <a href="#_NAMES">-names</a>, 
    465 <a href="#_NODEF">-nodef</a>, 
    466 <a href="#_NOLIB">-nolib</a>, 
    467 <a href="#_NOLINK">-nolink</a>, 
    468 <a href="#_OBJ">-obj</a>, 
    469 <a href="#_OD">-od</a>, 
    470 <a href="#_R">-R</a>, 
    471 <a href="#_RDF">-RDF</a>, 
    472 <a href="#_SILENT">-silent</a>, 
    473 <a href="#_T">-T</a>, 
    474 <a href="#_TEST">-test</a>, 
    475 <a href="#_V">-v</a>, 
    476 <a href="#_V">-V</a>, 
    477 <a href="#_X">-X</a> 
    478 <hr> 
    479 <h4><br> 
     484<a href="#_LIBPATH">-LIBPATH</a>, 
     485<a href="#_LINK">-link</a>, 
     486<a href="#_M">-M</a>, 
     487<a href="#_NAMES">-names</a>, 
     488<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     489<a href="#_NODEF">-nodef</a>, 
     490<a href="#_NOLIB">-nolib</a>, 
     491<a href="#_NOLINK">-nolink</a>, 
     492<a href="#_OBJ">-obj</a>, 
     493<a href="#_OD">-od</a>, 
     494<a href="#_R">-R</a>, 
     495<a href="#_RDF">-RDF</a>, 
     496<a href="#_SILENT">-silent</a>, 
     497<a href="#_T">-T</a>, 
     498<a href="#_TEST">-test</a>, 
     499<a href="#_V">-V</a>, 
     500<a href="#_V">-v</a>, 
     501<a href="#_X">-X</a> 
     502<hr> 
     503<h4>Documentation for Build v2.08<br> 
     504<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
     505<h2><a name="_LIBPATH">[<i>switch</i>]<br>-LIBPATH</a> </h2> 
     506<h3>Used to add a list of search paths for library files.</h3> 
     507Category: <a href="#SWITCHES">Switches</a><br> 
     508<p><p>This might be used when you don't want to permanently update the 
     509standard search paths. 
     510Example: 
     511<pre> 
     512-LIBPATH=c:\mylibs;d:\3rdparty;c:\lib\debuglibs 
     513</pre> 
     514<p>See Also:  
     515<a href="#_ALLOBJ">-allobj</a>, 
     516<a href="#_CFPATH">-CFPATH</a>, 
     517<a href="#_CLEANUP">-cleanup</a>, 
     518<a href="#_DCPATH">-DCPATH</a>, 
     519<a href="#_DLL">-dll</a>, 
     520<a href="#_FULL">-full</a>, 
     521<a href="#_GUI">-gui</a>, 
     522<a href="#_HELP">-help</a>, 
     523<a href="#_INFO">-info</a>, 
     524<a href="#_LIB">-lib</a>, 
     525<a href="#_LIBOPT">-LIBOPT</a>, 
     526<a href="#_LINK">-link</a>, 
     527<a href="#_M">-M</a>, 
     528<a href="#_NAMES">-names</a>, 
     529<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     530<a href="#_NODEF">-nodef</a>, 
     531<a href="#_NOLIB">-nolib</a>, 
     532<a href="#_NOLINK">-nolink</a>, 
     533<a href="#_OBJ">-obj</a>, 
     534<a href="#_OD">-od</a>, 
     535<a href="#_R">-R</a>, 
     536<a href="#_RDF">-RDF</a>, 
     537<a href="#_SILENT">-silent</a>, 
     538<a href="#_T">-T</a>, 
     539<a href="#_TEST">-test</a>, 
     540<a href="#_V">-V</a>, 
     541<a href="#_V">-v</a>, 
     542<a href="#_X">-X</a> 
     543<hr> 
     544<h4>Documentation for Build v2.08<br> 
    480545<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    481546<h2><a name="_LINK">[<i>switch</i>]<br>-link</a> </h2> 
     
    501566<a href="#_LIB">-lib</a>, 
    502567<a href="#_LIBOPT">-LIBOPT</a>, 
    503 <a href="#_M">-M</a>, 
    504 <a href="#_NAMES">-names</a>, 
    505 <a href="#_NODEF">-nodef</a>, 
    506 <a href="#_NOLIB">-nolib</a>, 
    507 <a href="#_NOLINK">-nolink</a>, 
    508 <a href="#_OBJ">-obj</a>, 
    509 <a href="#_OD">-od</a>, 
    510 <a href="#_R">-R</a>, 
    511 <a href="#_RDF">-RDF</a>, 
    512 <a href="#_SILENT">-silent</a>, 
    513 <a href="#_T">-T</a>, 
    514 <a href="#_TEST">-test</a>, 
    515 <a href="#_V">-v</a>, 
    516 <a href="#_V">-V</a>, 
    517 <a href="#_X">-X</a> 
    518 <hr> 
    519 <h4><br> 
     568<a href="#_LIBPATH">-LIBPATH</a>, 
     569<a href="#_M">-M</a>, 
     570<a href="#_NAMES">-names</a>, 
     571<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     572<a href="#_NODEF">-nodef</a>, 
     573<a href="#_NOLIB">-nolib</a>, 
     574<a href="#_NOLINK">-nolink</a>, 
     575<a href="#_OBJ">-obj</a>, 
     576<a href="#_OD">-od</a>, 
     577<a href="#_R">-R</a>, 
     578<a href="#_RDF">-RDF</a>, 
     579<a href="#_SILENT">-silent</a>, 
     580<a href="#_T">-T</a>, 
     581<a href="#_TEST">-test</a>, 
     582<a href="#_V">-V</a>, 
     583<a href="#_V">-v</a>, 
     584<a href="#_X">-X</a> 
     585<hr> 
     586<h4>Documentation for Build v2.08<br> 
    520587<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    521588<h2><a name="_M">[<i>switch</i>]<br>-M</a> </h2> 
     
    543610<a href="#_LIB">-lib</a>, 
    544611<a href="#_LIBOPT">-LIBOPT</a>, 
    545 <a href="#_LINK">-link</a>, 
    546 <a href="#_NAMES">-names</a>, 
    547 <a href="#_NODEF">-nodef</a>, 
    548 <a href="#_NOLIB">-nolib</a>, 
    549 <a href="#_NOLINK">-nolink</a>, 
    550 <a href="#_OBJ">-obj</a>, 
    551 <a href="#_OD">-od</a>, 
    552 <a href="#_R">-R</a>, 
    553 <a href="#_RDF">-RDF</a>, 
    554 <a href="#_SILENT">-silent</a>, 
    555 <a href="#_T">-T</a>, 
    556 <a href="#_TEST">-test</a>, 
    557 <a href="#_V">-v</a>, 
    558 <a href="#_V">-V</a>, 
    559 <a href="#_X">-X</a> 
    560 <hr> 
    561 <h4><br> 
     612<a href="#_LIBPATH">-LIBPATH</a>, 
     613<a href="#_LINK">-link</a>, 
     614<a href="#_NAMES">-names</a>, 
     615<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     616<a href="#_NODEF">-nodef</a>, 
     617<a href="#_NOLIB">-nolib</a>, 
     618<a href="#_NOLINK">-nolink</a>, 
     619<a href="#_OBJ">-obj</a>, 
     620<a href="#_OD">-od</a>, 
     621<a href="#_R">-R</a>, 
     622<a href="#_RDF">-RDF</a>, 
     623<a href="#_SILENT">-silent</a>, 
     624<a href="#_T">-T</a>, 
     625<a href="#_TEST">-test</a>, 
     626<a href="#_V">-V</a>, 
     627<a href="#_V">-v</a>, 
     628<a href="#_X">-X</a> 
     629<hr> 
     630<h4>Documentation for Build v2.08<br> 
    562631<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    563632<h2><a name="_NAMES">[<i>switch</i>]<br>-names</a> </h2> 
     
    576645<a href="#_LIB">-lib</a>, 
    577646<a href="#_LIBOPT">-LIBOPT</a>, 
    578 <a href="#_LINK">-link</a>, 
    579 <a href="#_M">-M</a>, 
    580 <a href="#_NODEF">-nodef</a>, 
    581 <a href="#_NOLIB">-nolib</a>, 
    582 <a href="#_NOLINK">-nolink</a>, 
    583 <a href="#_OBJ">-obj</a>, 
    584 <a href="#_OD">-od</a>, 
    585 <a href="#_R">-R</a>, 
    586 <a href="#_RDF">-RDF</a>, 
    587 <a href="#_SILENT">-silent</a>, 
    588 <a href="#_T">-T</a>, 
    589 <a href="#_TEST">-test</a>, 
    590 <a href="#_V">-v</a>, 
    591 <a href="#_V">-V</a>, 
    592 <a href="#_X">-X</a> 
    593 <hr> 
    594 <h4><br> 
     647<a href="#_LIBPATH">-LIBPATH</a>, 
     648<a href="#_LINK">-link</a>, 
     649<a href="#_M">-M</a>, 
     650<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     651<a href="#_NODEF">-nodef</a>, 
     652<a href="#_NOLIB">-nolib</a>, 
     653<a href="#_NOLINK">-nolink</a>, 
     654<a href="#_OBJ">-obj</a>, 
     655<a href="#_OD">-od</a>, 
     656<a href="#_R">-R</a>, 
     657<a href="#_RDF">-RDF</a>, 
     658<a href="#_SILENT">-silent</a>, 
     659<a href="#_T">-T</a>, 
     660<a href="#_TEST">-test</a>, 
     661<a href="#_V">-V</a>, 
     662<a href="#_V">-v</a>, 
     663<a href="#_X">-X</a> 
     664<hr> 
     665<h4>Documentation for Build v2.08<br> 
     666<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
     667<h2><a name="_NOAUTOIMPORT">[<i>switch</i>]<br>-noautoimport</a> </h2> 
     668<h3>Prevents source file paths from being added to the list of Import Roots</h3> 
     669Category: <a href="#SWITCHES">Switches</a><br> 
     670<p><p>By default, for each source file that imports a module, it's path is added 
     671to the list of paths that will be searched for module source files. If you 
     672do not wish that behaviour, you will need to use this switch. In that case, 
     673the compiler will only search the paths specified in the compiler's 
     674configuration file, the current directory, and any explicitly added paths 
     675on the command line. 
     676<p> 
     677Example: 
     678<pre> 
     679build myApp -noautoimport 
     680</pre> 
     681<p>See Also:  
     682<a href="#_ALLOBJ">-allobj</a>, 
     683<a href="#_CFPATH">-CFPATH</a>, 
     684<a href="#_CLEANUP">-cleanup</a>, 
     685<a href="#_DCPATH">-DCPATH</a>, 
     686<a href="#_DLL">-dll</a>, 
     687<a href="#_FULL">-full</a>, 
     688<a href="#_GUI">-gui</a>, 
     689<a href="#_HELP">-help</a>, 
     690<a href="#_INFO">-info</a>, 
     691<a href="#_LIB">-lib</a>, 
     692<a href="#_LIBOPT">-LIBOPT</a>, 
     693<a href="#_LIBPATH">-LIBPATH</a>, 
     694<a href="#_LINK">-link</a>, 
     695<a href="#_M">-M</a>, 
     696<a href="#_NAMES">-names</a>, 
     697<a href="#_NODEF">-nodef</a>, 
     698<a href="#_NOLIB">-nolib</a>, 
     699<a href="#_NOLINK">-nolink</a>, 
     700<a href="#_OBJ">-obj</a>, 
     701<a href="#_OD">-od</a>, 
     702<a href="#_R">-R</a>, 
     703<a href="#_RDF">-RDF</a>, 
     704<a href="#_SILENT">-silent</a>, 
     705<a href="#_T">-T</a>, 
     706<a href="#_TEST">-test</a>, 
     707<a href="#_V">-V</a>, 
     708<a href="#_V">-v</a>, 
     709<a href="#_X">-X</a> 
     710<hr> 
     711<h4>Documentation for Build v2.08<br> 
    595712<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    596713<h2><a name="_NODEF">[<i>switch</i>]<br>-nodef</a> </h2> 
     
    614731<a href="#_LIB">-lib</a>, 
    615732<a href="#_LIBOPT">-LIBOPT</a>, 
    616 <a href="#_LINK">-link</a>, 
    617 <a href="#_M">-M</a>, 
    618 <a href="#_NAMES">-names</a>, 
    619 <a href="#_NOLIB">-nolib</a>, 
    620 <a href="#_NOLINK">-nolink</a>, 
    621 <a href="#_OBJ">-obj</a>, 
    622 <a href="#_OD">-od</a>, 
    623 <a href="#_R">-R</a>, 
    624 <a href="#_RDF">-RDF</a>, 
    625 <a href="#_SILENT">-silent</a>, 
    626 <a href="#_T">-T</a>, 
    627 <a href="#_TEST">-test</a>, 
    628 <a href="#_V">-v</a>, 
    629 <a href="#_V">-V</a>, 
    630 <a href="#_X">-X</a> 
    631 <hr> 
    632 <h4><br> 
     733<a href="#_LIBPATH">-LIBPATH</a>, 
     734<a href="#_LINK">-link</a>, 
     735<a href="#_M">-M</a>, 
     736<a href="#_NAMES">-names</a>, 
     737<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     738<a href="#_NOLIB">-nolib</a>, 
     739<a href="#_NOLINK">-nolink</a>, 
     740<a href="#_OBJ">-obj</a>, 
     741<a href="#_OD">-od</a>, 
     742<a href="#_R">-R</a>, 
     743<a href="#_RDF">-RDF</a>, 
     744<a href="#_SILENT">-silent</a>, 
     745<a href="#_T">-T</a>, 
     746<a href="#_TEST">-test</a>, 
     747<a href="#_V">-V</a>, 
     748<a href="#_V">-v</a>, 
     749<a href="#_X">-X</a> 
     750<hr> 
     751<h4>Documentation for Build v2.08<br> 
    633752<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    634753<h2><a name="_NOLIB">[<i>switch</i>]<br>-nolib</a> </h2> 
     
    653772<a href="#_LIB">-lib</a>, 
    654773<a href="#_LIBOPT">-LIBOPT</a>, 
    655 <a href="#_LINK">-link</a>, 
    656 <a href="#_M">-M</a>, 
    657 <a href="#_NAMES">-names</a>, 
    658 <a href="#_NODEF">-nodef</a>, 
    659 <a href="#_NOLINK">-nolink</a>, 
    660 <a href="#_OBJ">-obj</a>, 
    661 <a href="#_OD">-od</a>, 
    662 <a href="#_R">-R</a>, 
    663 <a href="#_RDF">-RDF</a>, 
    664 <a href="#_SILENT">-silent</a>, 
    665 <a href="#_T">-T</a>, 
    666 <a href="#_TEST">-test</a>, 
    667 <a href="#_V">-v</a>, 
    668 <a href="#_V">-V</a>, 
    669 <a href="#_X">-X</a> 
    670 <hr> 
    671 <h4><br> 
     774<a href="#_LIBPATH">-LIBPATH</a>, 
     775<a href="#_LINK">-link</a>, 
     776<a href="#_M">-M</a>, 
     777<a href="#_NAMES">-names</a>, 
     778<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     779<a href="#_NODEF">-nodef</a>, 
     780<a href="#_NOLINK">-nolink</a>, 
     781<a href="#_OBJ">-obj</a>, 
     782<a href="#_OD">-od</a>, 
     783<a href="#_R">-R</a>, 
     784<a href="#_RDF">-RDF</a>, 
     785<a href="#_SILENT">-silent</a>, 
     786<a href="#_T">-T</a>, 
     787<a href="#_TEST">-test</a>, 
     788<a href="#_V">-V</a>, 
     789<a href="#_V">-v</a>, 
     790<a href="#_X">-X</a> 
     791<hr> 
     792<h4>Documentation for Build v2.08<br> 
    672793<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    673794<h2><a name="_NOLINK">[<i>switch</i>]<br>-nolink</a> </h2> 
     
    694815<a href="#_LIB">-lib</a>, 
    695816<a href="#_LIBOPT">-LIBOPT</a>, 
    696 <a href="#_LINK">-link</a>, 
    697 <a href="#_M">-M</a>, 
    698 <a href="#_NAMES">-names</a>, 
    699 <a href="#_NODEF">-nodef</a>, 
    700 <a href="#_NOLIB">-nolib</a>, 
    701 <a href="#_OBJ">-obj</a>, 
    702 <a href="#_OD">-od</a>, 
    703 <a href="#_R">-R</a>, 
    704 <a href="#_RDF">-RDF</a>, 
    705 <a href="#_SILENT">-silent</a>, 
    706 <a href="#_T">-T</a>, 
    707 <a href="#_TEST">-test</a>, 
    708 <a href="#_V">-v</a>, 
    709 <a href="#_V">-V</a>, 
    710 <a href="#_X">-X</a> 
    711 <hr> 
    712 <h4><br> 
     817<a href="#_LIBPATH">-LIBPATH</a>, 
     818<a href="#_LINK">-link</a>, 
     819<a href="#_M">-M</a>, 
     820<a href="#_NAMES">-names</a>, 
     821<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     822<a href="#_NODEF">-nodef</a>, 
     823<a href="#_NOLIB">-nolib</a>, 
     824<a href="#_OBJ">-obj</a>, 
     825<a href="#_OD">-od</a>, 
     826<a href="#_R">-R</a>, 
     827<a href="#_RDF">-RDF</a>, 
     828<a href="#_SILENT">-silent</a>, 
     829<a href="#_T">-T</a>, 
     830<a href="#_TEST">-test</a>, 
     831<a href="#_V">-V</a>, 
     832<a href="#_V">-v</a>, 
     833<a href="#_X">-X</a> 
     834<hr> 
     835<h4>Documentation for Build v2.08<br> 
    713836<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    714837<h2><a name="_OBJ">[<i>switch</i>]<br>-obj</a> </h2> 
     
    731854<a href="#_LIB">-lib</a>, 
    732855<a href="#_LIBOPT">-LIBOPT</a>, 
    733 <a href="#_LINK">-link</a>, 
    734 <a href="#_M">-M</a>, 
    735 <a href="#_NAMES">-names</a>, 
    736 <a href="#_NODEF">-nodef</a>, 
    737 <a href="#_NOLIB">-nolib</a>, 
    738 <a href="#_NOLINK">-nolink</a>, 
    739 <a href="#_OD">-od</a>, 
    740 <a href="#_R">-R</a>, 
    741 <a href="#_RDF">-RDF</a>, 
    742 <a href="#_SILENT">-silent</a>, 
    743 <a href="#_T">-T</a>, 
    744 <a href="#_TEST">-test</a>, 
    745 <a href="#_V">-v</a>, 
    746 <a href="#_V">-V</a>, 
    747 <a href="#_X">-X</a> 
    748 <hr> 
    749 <h4><br> 
     856<a href="#_LIBPATH">-LIBPATH</a>, 
     857<a href="#_LINK">-link</a>, 
     858<a href="#_M">-M</a>, 
     859<a href="#_NAMES">-names</a>, 
     860<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     861<a href="#_NODEF">-nodef</a>, 
     862<a href="#_NOLIB">-nolib</a>, 
     863<a href="#_NOLINK">-nolink</a>, 
     864<a href="#_OD">-od</a>, 
     865<a href="#_R">-R</a>, 
     866<a href="#_RDF">-RDF</a>, 
     867<a href="#_SILENT">-silent</a>, 
     868<a href="#_T">-T</a>, 
     869<a href="#_TEST">-test</a>, 
     870<a href="#_V">-V</a>, 
     871<a href="#_V">-v</a>, 
     872<a href="#_X">-X</a> 
     873<hr> 
     874<h4>Documentation for Build v2.08<br> 
    750875<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    751876<h2><a name="_OD">[<i>switch</i>]<br>-od</a> </h2> 
     
    776901<a href="#_LIB">-lib</a>, 
    777902<a href="#_LIBOPT">-LIBOPT</a>, 
    778 <a href="#_LINK">-link</a>, 
    779 <a href="#_M">-M</a>, 
    780 <a href="#_NAMES">-names</a>, 
    781 <a href="#_NODEF">-nodef</a>, 
    782 <a href="#_NOLIB">-nolib</a>, 
    783 <a href="#_NOLINK">-nolink</a>, 
    784 <a href="#_OBJ">-obj</a>, 
    785 <a href="#_R">-R</a>, 
    786 <a href="#_RDF">-RDF</a>, 
    787 <a href="#_SILENT">-silent</a>, 
    788 <a href="#_T">-T</a>, 
    789 <a href="#_TEST">-test</a>, 
    790 <a href="#_V">-v</a>, 
    791 <a href="#_V">-V</a>, 
    792 <a href="#_X">-X</a> 
    793 <hr> 
    794 <h4><br> 
     903<a href="#_LIBPATH">-LIBPATH</a>, 
     904<a href="#_LINK">-link</a>, 
     905<a href="#_M">-M</a>, 
     906<a href="#_NAMES">-names</a>, 
     907<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     908<a href="#_NODEF">-nodef</a>, 
     909<a href="#_NOLIB">-nolib</a>, 
     910<a href="#_NOLINK">-nolink</a>, 
     911<a href="#_OBJ">-obj</a>, 
     912<a href="#_R">-R</a>, 
     913<a href="#_RDF">-RDF</a>, 
     914<a href="#_SILENT">-silent</a>, 
     915<a href="#_T">-T</a>, 
     916<a href="#_TEST">-test</a>, 
     917<a href="#_V">-V</a>, 
     918<a href="#_V">-v</a>, 
     919<a href="#_X">-X</a> 
     920<hr> 
     921<h4>Documentation for Build v2.08<br> 
    795922<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    796923<h2><a name="_R">[<i>switch</i>]<br>-R</a> </h2> 
     
    846973<a href="#_LIB">-lib</a>, 
    847974<a href="#_LIBOPT">-LIBOPT</a>, 
    848 <a href="#_LINK">-link</a>, 
    849 <a href="#_M">-M</a>, 
    850 <a href="#_NAMES">-names</a>, 
    851 <a href="#_NODEF">-nodef</a>, 
    852 <a href="#_NOLIB">-nolib</a>, 
    853 <a href="#_NOLINK">-nolink</a>, 
    854 <a href="#_OBJ">-obj</a>, 
    855 <a href="#_OD">-od</a>, 
    856 <a href="#_RDF">-RDF</a>, 
    857 <a href="#_SILENT">-silent</a>, 
    858 <a href="#_T">-T</a>, 
    859 <a href="#_TEST">-test</a>, 
    860 <a href="#_V">-v</a>, 
    861 <a href="#_V">-V</a>, 
    862 <a href="#_X">-X</a> 
    863 <hr> 
    864 <h4><br> 
     975<a href="#_LIBPATH">-LIBPATH</a>, 
     976<a href="#_LINK">-link</a>, 
     977<a href="#_M">-M</a>, 
     978<a href="#_NAMES">-names</a>, 
     979<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     980<a href="#_NODEF">-nodef</a>, 
     981<a href="#_NOLIB">-nolib</a>, 
     982<a href="#_NOLINK">-nolink</a>, 
     983<a href="#_OBJ">-obj</a>, 
     984<a href="#_OD">-od</a>, 
     985<a href="#_RDF">-RDF</a>, 
     986<a href="#_SILENT">-silent</a>, 
     987<a href="#_T">-T</a>, 
     988<a href="#_TEST">-test</a>, 
     989<a href="#_V">-V</a>, 
     990<a href="#_V">-v</a>, 
     991<a href="#_X">-X</a> 
     992<hr> 
     993<h4>Documentation for Build v2.08<br> 
    865994<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    866995<h2><a name="_RDF">[<i>switch</i>]<br>-RDF</a> </h2> 
     
    8861015<a href="#_LIB">-lib</a>, 
    8871016<a href="#_LIBOPT">-LIBOPT</a>, 
    888 <a href="#_LINK">-link</a>, 
    889 <a href="#_M">-M</a>, 
    890 <a href="#_NAMES">-names</a>, 
    891 <a href="#_NODEF">-nodef</a>, 
    892 <a href="#_NOLIB">-nolib</a>, 
    893 <a href="#_NOLINK">-nolink</a>, 
    894 <a href="#_OBJ">-obj</a>, 
    895 <a href="#_OD">-od</a>, 
    896 <a href="#_R">-R</a>, 
    897 <a href="#_SILENT">-silent</a>, 
    898 <a href="#_T">-T</a>, 
    899 <a href="#_TEST">-test</a>, 
    900 <a href="#_V">-v</a>, 
    901 <a href="#_V">-V</a>, 
    902 <a href="#_X">-X</a> 
    903 <hr> 
    904 <h4><br> 
     1017<a href="#_LIBPATH">-LIBPATH</a>, 
     1018<a href="#_LINK">-link</a>, 
     1019<a href="#_M">-M</a>, 
     1020<a href="#_NAMES">-names</a>, 
     1021<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     1022<a href="#_NODEF">-nodef</a>, 
     1023<a href="#_NOLIB">-nolib</a>, 
     1024<a href="#_NOLINK">-nolink</a>, 
     1025<a href="#_OBJ">-obj</a>, 
     1026<a href="#_OD">-od</a>, 
     1027<a href="#_R">-R</a>, 
     1028<a href="#_SILENT">-silent</a>, 
     1029<a href="#_T">-T</a>, 
     1030<a href="#_TEST">-test</a>, 
     1031<a href="#_V">-V</a>, 
     1032<a href="#_V">-v</a>, 
     1033<a href="#_X">-X</a> 
     1034<hr> 
     1035<h4>Documentation for Build v2.08<br> 
    9051036<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    9061037<h2><a name="_SILENT">[<i>switch</i>]<br>-silent</a> </h2> 
     
    9211052<a href="#_LIB">-lib</a>, 
    9221053<a href="#_LIBOPT">-LIBOPT</a>, 
    923 <a href="#_LINK">-link</a>, 
    924 <a href="#_M">-M</a>, 
    925 <a href="#_NAMES">-names</a>, 
    926 <a href="#_NODEF">-nodef</a>, 
    927 <a href="#_NOLIB">-nolib</a>, 
    928 <a href="#_NOLINK">-nolink</a>, 
    929 <a href="#_OBJ">-obj</a>, 
    930 <a href="#_OD">-od</a>, 
    931 <a href="#_R">-R</a>, 
    932 <a href="#_RDF">-RDF</a>, 
    933 <a href="#_T">-T</a>, 
    934 <a href="#_TEST">-test</a>, 
    935 <a href="#_V">-v</a>, 
    936 <a href="#_V">-V</a>, 
    937 <a href="#_X">-X</a> 
    938 <hr> 
    939 <h4><br> 
     1054<a href="#_LIBPATH">-LIBPATH</a>, 
     1055<a href="#_LINK">-link</a>, 
     1056<a href="#_M">-M</a>, 
     1057<a href="#_NAMES">-names</a>, 
     1058<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     1059<a href="#_NODEF">-nodef</a>, 
     1060<a href="#_NOLIB">-nolib</a>, 
     1061<a href="#_NOLINK">-nolink</a>, 
     1062<a href="#_OBJ">-obj</a>, 
     1063<a href="#_OD">-od</a>, 
     1064<a href="#_R">-R</a>, 
     1065<a href="#_RDF">-RDF</a>, 
     1066<a href="#_T">-T</a>, 
     1067<a href="#_TEST">-test</a>, 
     1068<a href="#_V">-V</a>, 
     1069<a href="#_V">-v</a>, 
     1070<a href="#_X">-X</a> 
     1071<hr> 
     1072<h4>Documentation for Build v2.08<br> 
    9401073<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    9411074<h2><a name="_T">[<i>switch</i>]<br>-T</a> </h2> 
     
    9691102<a href="#_LIB">-lib</a>, 
    9701103<a href="#_LIBOPT">-LIBOPT</a>, 
    971 <a href="#_LINK">-link</a>, 
    972 <a href="#_M">-M</a>, 
    973 <a href="#_NAMES">-names</a>, 
    974 <a href="#_NODEF">-nodef</a>, 
    975 <a href="#_NOLIB">-nolib</a>, 
    976 <a href="#_NOLINK">-nolink</a>, 
    977 <a href="#_OBJ">-obj</a>, 
    978 <a href="#_OD">-od</a>, 
    979 <a href="#_R">-R</a>, 
    980 <a href="#_RDF">-RDF</a>, 
    981 <a href="#_SILENT">-silent</a>, 
    982 <a href="#_TEST">-test</a>, 
    983 <a href="#_V">-v</a>, 
    984 <a href="#_V">-V</a>, 
    985 <a href="#_X">-X</a> 
    986 <hr> 
    987 <h4><br> 
     1104<a href="#_LIBPATH">-LIBPATH</a>, 
     1105<a href="#_LINK">-link</a>, 
     1106<a href="#_M">-M</a>, 
     1107<a href="#_NAMES">-names</a>, 
     1108<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     1109<a href="#_NODEF">-nodef</a>, 
     1110<a href="#_NOLIB">-nolib</a>, 
     1111<a href="#_NOLINK">-nolink</a>, 
     1112<a href="#_OBJ">-obj</a>, 
     1113<a href="#_OD">-od</a>, 
     1114<a href="#_R">-R</a>, 
     1115<a href="#_RDF">-RDF</a>, 
     1116<a href="#_SILENT">-silent</a>, 
     1117<a href="#_TEST">-test</a>, 
     1118<a href="#_V">-V</a>, 
     1119<a href="#_V">-v</a>, 
     1120<a href="#_X">-X</a> 
     1121<hr> 
     1122<h4>Documentation for Build v2.08<br> 
    9881123<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    9891124<h2><a name="_TEST">[<i>switch</i>]<br>-test</a> </h2> 
     
    10041139<a href="#_LIB">-lib</a>, 
    10051140<a href="#_LIBOPT">-LIBOPT</a>, 
    1006 <a href="#_LINK">-link</a>, 
    1007 <a href="#_M">-M</a>, 
    1008 <a href="#_NAMES">-names</a>, 
    1009 <a href="#_NODEF">-nodef</a>, 
    1010 <a href="#_NOLIB">-nolib</a>, 
    1011 <a href="#_NOLINK">-nolink</a>, 
    1012 <a href="#_OBJ">-obj</a>, 
    1013 <a href="#_OD">-od</a>, 
    1014 <a href="#_R">-R</a>, 
    1015 <a href="#_RDF">-RDF</a>, 
    1016 <a href="#_SILENT">-silent</a>, 
    1017 <a href="#_T">-T</a>, 
    1018 <a href="#_V">-v</a>, 
    1019 <a href="#_V">-V</a>, 
    1020 <a href="#_X">-X</a> 
    1021 <hr> 
    1022 <h4><br> 
     1141<a href="#_LIBPATH">-LIBPATH</a>, 
     1142<a href="#_LINK">-link</a>, 
     1143<a href="#_M">-M</a>, 
     1144<a href="#_NAMES">-names</a>, 
     1145<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     1146<a href="#_NODEF">-nodef</a>, 
     1147<a href="#_NOLIB">-nolib</a>, 
     1148<a href="#_NOLINK">-nolink</a>, 
     1149<a href="#_OBJ">-obj</a>, 
     1150<a href="#_OD">-od</a>, 
     1151<a href="#_R">-R</a>, 
     1152<a href="#_RDF">-RDF</a>, 
     1153<a href="#_SILENT">-silent</a>, 
     1154<a href="#_T">-T</a>, 
     1155<a href="#_V">-V</a>, 
     1156<a href="#_V">-v</a>, 
     1157<a href="#_X">-X</a> 
     1158<hr> 
     1159<h4>Documentation for Build v2.08<br> 
     1160<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
     1161<h2><a name="_V">[<i>switch</i>]<br>-V</a> </h2> 
     1162<h3> Set <em>verbose</em> mode on for just <em>build</em> and not for the compiler</h3> 
     1163Category: <a href="#SWITCHES">Switches</a><br> 
     1164<p><p><p>See Also:  
     1165<a href="#_ALLOBJ">-allobj</a>, 
     1166<a href="#_CFPATH">-CFPATH</a>, 
     1167<a href="#_CLEANUP">-cleanup</a>, 
     1168<a href="#_DCPATH">-DCPATH</a>, 
     1169<a href="#_DLL">-dll</a>, 
     1170<a href="#_FULL">-full</a>, 
     1171<a href="#_GUI">-gui</a>, 
     1172<a href="#_HELP">-help</a>, 
     1173<a href="#_INFO">-info</a>, 
     1174<a href="#_LIB">-lib</a>, 
     1175<a href="#_LIBOPT">-LIBOPT</a>, 
     1176<a href="#_LIBPATH">-LIBPATH</a>, 
     1177<a href="#_LINK">-link</a>, 
     1178<a href="#_M">-M</a>, 
     1179<a href="#_NAMES">-names</a>, 
     1180<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     1181<a href="#_NODEF">-nodef</a>, 
     1182<a href="#_NOLIB">-nolib</a>, 
     1183<a href="#_NOLINK">-nolink</a>, 
     1184<a href="#_OBJ">-obj</a>, 
     1185<a href="#_OD">-od</a>, 
     1186<a href="#_R">-R</a>, 
     1187<a href="#_RDF">-RDF</a>, 
     1188<a href="#_SILENT">-silent</a>, 
     1189<a href="#_T">-T</a>, 
     1190<a href="#_TEST">-test</a>, 
     1191<a href="#_V">-v</a>, 
     1192<a href="#_X">-X</a> 
     1193<hr> 
     1194<h4>Documentation for Build v2.08<br> 
    10231195<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    10241196<h2><a name="_V">[<i>switch</i>]<br>-v</a> </h2> 
     
    10371209<a href="#_LIB">-lib</a>, 
    10381210<a href="#_LIBOPT">-LIBOPT</a>, 
    1039 <a href="#_LINK">-link</a>, 
    1040 <a href="#_M">-M</a>, 
    1041 <a href="#_NAMES">-names</a>, 
    1042 <a href="#_NODEF">-nodef</a>, 
    1043 <a href="#_NOLIB">-nolib</a>, 
    1044 <a href="#_NOLINK">-nolink</a>, 
    1045 <a href="#_OBJ">-obj</a>, 
    1046 <a href="#_OD">-od</a>, 
    1047 <a href="#_R">-R</a>, 
    1048 <a href="#_RDF">-RDF</a>, 
    1049 <a href="#_SILENT">-silent</a>, 
    1050 <a href="#_T">-T</a>, 
    1051 <a href="#_TEST">-test</a>, 
    1052 <a href="#_V">-V</a>, 
    1053 <a href="#_X">-X</a> 
    1054 <hr> 
    1055 <h4><br> 
    1056 <a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1057 <h2><a name="_V">[<i>switch</i>]<br>-V</a> </h2> 
    1058 <h3> Set <em>verbose</em> mode on for just <em>build</em> and not for the compiler</h3> 
    1059 Category: <a href="#SWITCHES">Switches</a><br> 
    1060 <p><p><p>See Also:  
    1061 <a href="#_ALLOBJ">-allobj</a>, 
    1062 <a href="#_CFPATH">-CFPATH</a>, 
    1063 <a href="#_CLEANUP">-cleanup</a>, 
    1064 <a href="#_DCPATH">-DCPATH</a>, 
    1065 <a href="#_DLL">-dll</a>, 
    1066 <a href="#_FULL">-full</a>, 
    1067 <a href="#_GUI">-gui</a>, 
    1068 <a href="#_HELP">-help</a>, 
    1069 <a href="#_INFO">-info</a>, 
    1070 <a href="#_LIB">-lib</a>, 
    1071 <a href="#_LIBOPT">-LIBOPT</a>, 
    1072 <a href="#_LINK">-link</a>, 
    1073 <a href="#_M">-M</a>, 
    1074 <a href="#_NAMES">-names</a>, 
    1075 <a href="#_NODEF">-nodef</a>, 
    1076 <a href="#_NOLIB">-nolib</a>, 
    1077 <a href="#_NOLINK">-nolink</a>, 
    1078 <a href="#_OBJ">-obj</a>, 
    1079 <a href="#_OD">-od</a>, 
    1080 <a href="#_R">-R</a>, 
    1081 <a href="#_RDF">-RDF</a>, 
    1082 <a href="#_SILENT">-silent</a>, 
    1083 <a href="#_T">-T</a>, 
    1084 <a href="#_TEST">-test</a>, 
    1085 <a href="#_V">-v</a>, 
    1086 <a href="#_X">-X</a> 
    1087 <hr> 
    1088 <h4><br> 
     1211<a href="#_LIBPATH">-LIBPATH</a>, 
     1212<a href="#_LINK">-link</a>, 
     1213<a href="#_M">-M</a>, 
     1214<a href="#_NAMES">-names</a>, 
     1215<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     1216<a href="#_NODEF">-nodef</a>, 
     1217<a href="#_NOLIB">-nolib</a>, 
     1218<a href="#_NOLINK">-nolink</a>, 
     1219<a href="#_OBJ">-obj</a>, 
     1220<a href="#_OD">-od</a>, 
     1221<a href="#_R">-R</a>, 
     1222<a href="#_RDF">-RDF</a>, 
     1223<a href="#_SILENT">-silent</a>, 
     1224<a href="#_T">-T</a>, 
     1225<a href="#_TEST">-test</a>, 
     1226<a href="#_V">-V</a>, 
     1227<a href="#_X">-X</a> 
     1228<hr> 
     1229<h4>Documentation for Build v2.08<br> 
    10891230<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    10901231<h2><a name="_X">[<i>switch</i>]<br>-X</a> </h2> 
     
    11141255<a href="#_LIB">-lib</a>, 
    11151256<a href="#_LIBOPT">-LIBOPT</a>, 
    1116 <a href="#_LINK">-link</a>, 
    1117 <a href="#_M">-M</a>, 
    1118 <a href="#_NAMES">-names</a>, 
    1119 <a href="#_NODEF">-nodef</a>, 
    1120 <a href="#_NOLIB">-nolib</a>, 
    1121 <a href="#_NOLINK">-nolink</a>, 
    1122 <a href="#_OBJ">-obj</a>, 
    1123 <a href="#_OD">-od</a>, 
    1124 <a href="#_R">-R</a>, 
    1125 <a href="#_RDF">-RDF</a>, 
    1126 <a href="#_SILENT">-silent</a>, 
    1127 <a href="#_T">-T</a>, 
    1128 <a href="#_TEST">-test</a>, 
    1129 <a href="#_V">-v</a>, 
    1130 <a href="#_V">-V</a> 
    1131 <hr> 
     1257<a href="#_LIBPATH">-LIBPATH</a>, 
     1258<a href="#_LINK">-link</a>, 
     1259<a href="#_M">-M</a>, 
     1260<a href="#_NAMES">-names</a>, 
     1261<a href="#_NOAUTOIMPORT">-noautoimport</a>, 
     1262<a href="#_NODEF">-nodef</a>, 
     1263<a href="#_NOLIB">-nolib</a>, 
     1264<a href="#_NOLINK">-nolink</a>, 
     1265<a href="#_OBJ">-obj</a>, 
     1266<a href="#_OD">-od</a>, 
     1267<a href="#_R">-R</a>, 
     1268<a href="#_RDF">-RDF</a>, 
     1269<a href="#_SILENT">-silent</a>, 
     1270<a href="#_T">-T</a>, 
     1271<a href="#_TEST">-test</a>, 
     1272<a href="#_V">-V</a>, 
     1273<a href="#_V">-v</a> 
     1274<hr> 
  • trunk/Docs/TO_DO.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m57 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><a name="TO_DO">To Do</a></h1> 
     
    1515listed here as a reminder. 
    1616<p> 
    17  <li> Support the syntax "version(n)" 
    18  <li> Be able to build a directory. 
    19 <ul> 
    20  <li> If no source file is supplied on the command line, 
    21 build will scan the current folder looking for a source file 
    22 that contains 'main'. 
    23  <li> If a directory name is supplied on the command line, 
    24 build will scan it looking for a source file that contains 'main'. 
    25  </ul>  
    26  <li> Be able to supply multiple 'main' source files on command line. 
    2717 <li> Be able to update a library rather than just create libraries. 
    2818 <li> Support the concept of a 'Plugin' block of code. <br> 
  • trunk/Docs/index.htm

    • Property svn:mime-type changed from text/html to html/text
    r36 r37  
    22<head> 
    33<!-- Generated by MAKEDOC v1.1, (c) 2000,2003 by David Cuny, Derek Parnell, Matt Lewis --> 
    4 <!-- on 2005/05/07 at 22h40m00 --> 
     4<!-- on 2005/05/30 at 10h23m56 --> 
    55<style>h4 {text-align: right}</style> 
    6 <title></title> 
     6<title>Documentation for Build v2.08</title> 
    77</head> 
    88<body> 
    9 <h4><br> 
     9<h4>Documentation for Build v2.08<br> 
    1010<a href="index.htm#makedocTOC">Table of Contents</a></h4> 
    1111<h1><b>Introduction</b></h1> 
     
    5959<a href="SWITCHES.htm#_LIB">-lib</a>  [<i><code>switch</code></i>] Forces the object files to be placed in a library.<br> 
    6060<a href="SWITCHES.htm#_LIBOPT">-LIBOPT</a>  [<i><code>switch</code></i>] Allows commandline options to be passed to the librarian.<br> 
     61<a href="SWITCHES.htm#_LIBPATH">-LIBPATH</a>  [<i><code>switch</code></i>] Used to add a list of search paths for library files.<br> 
    6162<a href="SWITCHES.htm#_LINK">-link</a>  [<i><code>switch</code></i>] Forces the linker to be called instead of the librarian.<br> 
    6263<a href="SWITCHES.htm#_M">-M</a>  [<i><code>switch</code></i>] Identifies a module or a package to notice (not ignore)<br> 
    6364<a href="SWITCHES.htm#_NAMES">-names</a>  [<i><code>switch</code></i>] Displays the names of the files used in building the target.<br> 
     65<a href="SWITCHES.htm#_NOAUTOIMPORT">-noautoimport</a>  [<i><code>switch</code></i>] Prevents source file paths from being added to the list of Import Roots<br> 
    6466<a href="SWITCHES.htm#_NODEF">-nodef</a>  [<i><code>switch</code></i>] Prevent a Module Definition File being created.<br> 
    6567<a href="SWITCHES.htm#_NOLIB">-nolib</a>  [<i><code>switch</code></i>] Ensures that the object files are not used to form a library.<br> 
  • trunk/Source/Makefile.dos

    r25 r37  
    1717SOURCES=$(SOURCES) util/bmscanner.d 
    1818SOURCES=$(SOURCES) util/bmscanner_bn.d 
     19SOURCES=$(SOURCES) util/macro.d 
     20 
    1921 
    2022all: build 
  • trunk/Source/Makefile.unix

    r25 r37  
    11DMD=dmd 
    22DFLAGS=-op -release -inline 
    3 SOURCES=build.d util/pathex_bn.d util/pathex.d source_bn.d util/str.d build_bn.d util/fdt_bn.d util/str_bn.d source.d util/fdt.d util/fileex.d util/fileex_bn.d util/linetoken.d util/linetoken_bn.d util/bmscanner.d util/bmscanner_bn.d 
     3SOURCES=build.d util/pathex_bn.d util/pathex.d source_bn.d util/str.d build_bn.d util/fdt_bn.d util/str_bn.d source.d util/fdt.d util/fileex.d util/fileex_bn.d util/linetoken.d util/linetoken_bn.d util/bmscanner.d util/bmscanner_bn.d util/macro.d 
    44 
    55all: build 
  • trunk/Source/build.cfg

    r36 r37  
    11CMDLINE=-info           # Show the version of build 
    2  
    3 CMDLINE=-Iz:\d_proj\build\trunk\source 
    4 CMDLINE=-Iz:\dlibs 
    52 
    63LIBCMD=%@D%\..\..\dm\bin\lib.exe 
  • trunk/Source/build.d

    r36 r37  
    5050 
    5151/* --------- CHANGE LOG -------------------- 
     52__ /makedoc title Documentation for Build v2.08 
     53 
    5254__ /topic Change Log 
    5355__ /info 
    5456__ A list of changes and fixes that have been made. 
     57__ 
     58__ /b"-- v2.08 -- 29/May/2005" 
     59__ <ul> 
     60__ /li ** /b FIX: /i"thanks to teqdruid": In Unix environments, 
     61__ any pragma(link, ~<name~>) statements were not sending the correct 
     62__ syntax to the compiler's command line. The "~<name~>" is now prefixed 
     63__ with "-L-l" for Unix systems. 
     64__ /li ** /b FIX: /i"thanks to Carlos": In Unix environments, any "-version" 
     65__ switch on the Utility's command line was not being converted to the correct Unix 
     66__ format of "-fversion...". So now, if the Build tool gets 
     67__ either "-version..." or "-fversion=..." on its command line, it will 
     68__ recognise it as a 'Version' request for the compiler /b and output 
     69__ it on the command line in the correct format for the environment it 
     70__ is running in, namely "-fversion..." for GNU (gdc) and "-version..." 
     71__ for Windows. /n 
     72__ /b"Note:" The same applies to the "-debug..." and "-fdebug..." switches. 
     73__ /li ** /b FIX: The pragma(nolink) was being ignored under some circumstances. 
     74__ Now it splits the compilation phase 
     75__ from the linking phase and excludes the 'nolink' files from the linker's 
     76__ command line. 
     77__ /li ** /b FIX: /i"thanks to kris": 'debug' statements were not being taken into account when 
     78__ examining code for import statements. 
     79__ /li ** /b FIX: 'debug' and 'version' levels are now being taken into account. 
     80__ /li ** /b FIX: 'debug' and 'version' values being set inside a source file 
     81__ were being made global rather than module scoped. 
     82__ /li ** /b FIX: /i"thanks to carlos": The utility was not processing the 
     83__ -I switch correctly when using GDC compiler. 
     84__ /li ** /b ENH: The utility can now accept the -I switch in two forms: 
     85__ /b"-I~<path~>" and /b"-I ~<path~>" on its command line, regardless of which 
     86__ compiler is being used. When invoking the compiler, it uses the correct 
     87__ format on the command line of the compiler being used, namely "-I~<path~>" to 
     88__ DMD compiler and "-I ~<path~>" to GDC. 
     89__ /li ** /b ENH: The path of any source file that imports a module 
     90__ will be added to the list of root paths to search for module source 
     91__ files. This means that you can now have module source files referenced 
     92__ relative to the source file that imports them. This is the new default 
     93__ behaviour but it can be turned off by using the new -noautoimport switch 
     94__ or for individual files by placing them inside parenthesis. 
     95__ /li ** /b ENH: New switch /i"-noautoimport" is used to turn off the 
     96__ automatic adding of search roots based on the path of the source files 
     97__ being compiled. 
     98__ /li ** /b ENH: New switch /i"-LIBPATH=" is used to add search paths for 
     99__ library files. 
     100__ /li ** /b WARN: The utility only does a single scan of each source file 
     101__ and thus if an file sets a 'debug' or 'version' value after a function 
     102__ which uses that value, it will be ignored. You are requested to ensure that 
     103__ all your 'debug' and 'version' setting is done prior to the first module 
     104__ member. 
     105__ </ul> 
    55106__ 
    56107__ /b"-- v2.07 -- 06/May/2005" 
     
    361412    version(Windows) { 
    362413        // OptLink Definition File 
    363         pragma (build_def, "VERSION 2.07"); 
     414        pragma (build_def, "VERSION 2.8"); 
    364415    } 
    365416} 
     
    375426    import util.fileex;    // Extended File routines. 
    376427    import util.bmscanner; // Boyer-Moore string find 
     428    import util.macro;     // Macro processing routines. 
    377429 
    378430    import std.c.stdio; 
     
    422474        } 
    423475        char[] kSrcExtention=`d`; 
     476        char[] kMacroExtention=`mac`; 
    424477 
    425478    } 
     
    429482        version(Windows) { 
    430483            char[] vCompiler=`dmd.exe`; 
     484            char[] vCompilerSwitch= ` -c`; 
     485            char[] vLinker=`dmd.exe`; 
    431486            char[] vConfigFile=`sc.ini`; 
    432487            char[] vCompilerPath=``; 
    433488            char[] vConfigPath=``; 
    434             char[] vLibPaths = `lib=c:\dmd\lib;c:\dm\lib`; 
     489            char[] vLibPaths = ``; 
    435490            char[] vConfigSep = ";"; 
    436491            char[] vLibrarian = `lib`; 
     
    440495        version(Posix) { 
    441496            char[] vCompiler=`dmd`; 
     497            char[] vCompilerSwitch= ` -c`; 
     498            char[] vLinker=`dmd`; 
    442499            char[] vConfigFile=`dmd.conf`; 
    443500            char[] vCompilerPath=``; 
    444501            char[] vConfigPath=`/etc/`; 
     502            char[] vLibPaths = ``; 
    445503            char[] vConfigSep = ":"; 
    446504            char[] vLibrarian = `ar`; 
     
    449507 
    450508        char[]     vVersionSwitch = "-version="; 
     509        char[]     vDebugSwitch = "-debug"; 
    451510        char[]     vKeepPathSwitch = "-op"; 
    452511        char[]     vOutFileSwitch = "-of"; 
     
    458517        version(Windows) { 
    459518            char[] vCompiler=`gdc.exe`; 
     519            char[] vCompilerSwitch= ` -c`; 
     520            char[] vLinker=`gdc.exe`; 
    460521            char[] vConfigFile=null; 
    461522            char[] vCompilerPath=``; 
    462523            char[] vConfigPath=null; 
    463             char[] vLibPaths = `lib=c:\gdc\lib;c:\gcc\lib`; 
     524            char[] vLibPaths = ``; 
    464525            char[] vConfigSep = ";"; 
    465526            char[] vLibrarian = `lib`; 
     
    469530        version(Posix) { 
    470531            char[] vCompiler=`gdc`; 
     532            char[] vCompilerSwitch= ` -c`; 
     533            char[] vLinker=`gdc`; 
    471534            char[] vConfigFile=null; 
    472535            char[] vCompilerPath=`/opt/gdc/bin`; 
    473536            char[] vConfigPath=null; 
     537            char[] vLibPaths = ``; 
    474538            char[] vConfigSep = ":"; 
    475539            char[] vLibrarian = `ar`; 
     
    477541        } 
    478542        char[]     vVersionSwitch = "-fversion="; 
     543        char[]     vDebugSwitch = "-fdebug"; 
    479544        char[]     vOutFileSwitch = "-o "; 
    480545        char[]     vKeepPathSwitch = ""; 
     
    483548    } 
    484549 
     550    char[]       vBuildImportPathSwitch = "-I"; 
    485551    char[]       vTemporaryPathSwitch = "-od"; 
    486552    char[]       vLibrarianPath = ""; 
     
    496562    bool         vAllObjects = false; 
    497563    bool         vNoDef = false; 
     564    bool         vAutoImports = true; 
     565    bool         vMacroInput = true; 
    498566    char[][]     vImportRoots; 
    499567    char[][]     vModulesToIgnore; 
     
    502570    char[][]     vDefaultLibs; 
    503571    char[][]     vDefaultCompArgs; 
    504     bool[char[]] vActiveVersions; 
    505     long         vVersionLevel = 0; 
    506572    LibOpt       vLibraryAction = LibOpt.Implicit; 
    507573    char[]       vAppPath; 
    508574    char[]       vAppName; 
    509     char[]       vAppVersion = "2.07"; 
     575    char[]       vAppVersion = "2.08"; 
    510576    char[]       vTargetName;           // Output name from first file name. 
    511577    char[]       vPragmaTargetName;     // Output name from pragma. 
    512578    char[]       vCommandTargetName;    // Output name from switches. 
    513     char[][]     vCmdLineFiles;         // List of source files from command line 
     579    char[][]     vCmdLineSourceFiles;   // List of source files from command line 
    514580    bool[char[]] vLinkFiles;            // List of non-source files from command line 
    515581    char[][]     vCombinedArgs;         // All the args are gathered here prior to processing. 
     
    519585    bool         vConsoleApp = true; 
    520586    char[]       vRDFName = "default.rdf"; 
     587    bool[char[]] vNestedDelim; 
    521588    struct ExternRef 
    522589    { 
    523590        char[]   FilePath; 
    524591        char[][] ToolOpts; 
    525     }; 
     592    } 
    526593    ExternRef[]  vExternals; 
     594 
     595    Substitute[] vSubstitutions; 
    527596 
    528597 version(Windows) { 
    529598    char[]       vWinVer = ""; 
    530599    ubyte        vWinVerNum; 
    531     version(build) pragma(link, kernel32.lib); 
    532600    } 
    533601 
     
    541609//------------------------------------------------------- 
    542610{ 
     611    source.ActivateVersion("build"); 
     612 
    543613    vDefaultCompArgs ~= vKeepPathSwitch;     // Keep object files in same folder as source. 
    544614    vModulesToIgnore ~= "phobos";  // Assume phobos will be ignored. 
     
    565635        vUseResponseFile = false; 
    566636     } 
     637 
     638    vNestedDelim["("] = true; 
     639    vNestedDelim["<"] = true; 
     640    vNestedDelim["{"] = true; 
     641    vNestedDelim["["] = true; 
    567642} 
    568643 
    569  
    570 //------------------------------------------------------- 
    571 bool begins(char[] pString, char[] pSubString) 
    572 //------------------------------------------------------- 
    573 { 
    574     if (pString.length < pSubString.length) 
    575         return false; 
    576     if (pSubString.length == 0) 
    577         return false; 
    578  
    579     if (pString[0..pSubString.length] == pSubString) 
    580         return true; 
    581     return false; 
    582 } 
    583644 
    584645//------------------------------------------------------- 
     
    641702 
    642703    writefln("  -LIBOPT<opt> Allows you to pass <opt> to the librarian."); 
     704    writefln("  -LIBPATH=<pathlist> Used to add a semi-colon delimited list"); 
     705    writefln("                of search paths for library files."); 
    643706    writefln("  -test      Does everything as normal except it displays the commands"); 
    644707    writefln("              instead of running them."); 
     
    671734    writefln("  -?        Same as -help, displays the full 'usage' help text."); 
    672735    writefln("  -silent   Avoids unnecessary messages being displayed."); 
     736    writefln("  -noautoimport Turns off the automatic addition of source paths"); 
     737    writefln("              to the list of Import Roots."); 
    673738    writefln("  -info      Displays the version and path of the Build application."); 
    674739    writefln("  -nodef    Prevents a Module Definition File from being created."); 
     
    736801        // Get the next Source object to examine. 
    737802        lSource = Source.SourceIndex[lFileName]; 
     803        if (lSource.Ignore) 
     804            continue; 
     805 
    738806        // Ensure that it has been processed. 
    739807        lSource.search(); 
     
    760828    } 
    761829 
    762     // Examine any link file depenancies too. 
     830    // Examine any link file dependancies too. 
    763831    foreach(int i, char[] lFileName; vLinkFiles.keys) 
    764832    { 
     
    814882    { 
    815883        lLine = std.string.strip(lLine); 
    816         if (util.str.Begins(lLine, "rule=")
     884        if (util.str.begins(lLine, "rule=") > 0
    817885        { 
    818886            lRules.length = lRules.length + 1; 
    819887            lRules[$-1].Name = lLine[5 .. $]; 
    820888        } 
    821         else if (util.str.Begins(lLine, "in=") && (lRules.length > 0)) 
    822             lRules[$-1].Input = lLine[3..$]; 
    823         else if (util.str.Begins(lLine, "out=") && (lRules.length > 0) ) 
    824             lRules[$-1].Output = lLine[4..$]; 
    825         else if (util.str.Begins(lLine, "tool=") && (lRules.length > 0) ) 
    826             lRules[$-1].Tool = lLine[5..$]; 
     889        else if (lRules.length > 0) 
     890        { 
     891            if (util.str.begins(lLine, "in=") > 0) 
     892                lRules[$-1].Input = lLine[3..$]; 
     893            else if (util.str.begins(lLine, "out=") > 0) 
     894                lRules[$-1].Output = lLine[4..$]; 
     895            else if (util.str.begins(lLine, "tool=") > 0) 
     896                lRules[$-1].Tool = lLine[5..$]; 
     897        } 
    827898    } 
    828899 
     
    919990//------------------------------------------------------- 
    920991{ 
    921     bool lBuildRequired; 
    922     char[][] lFilesToLink; 
    923     int lRunResult; 
    924     char[] lTargetName; 
    925     char[] lTargetDir; 
     992    bool        lBuildRequired; 
     993    char[][]    lFilesToLink; 
     994    char[][]    lFilesToCompile; 
     995    int         lRunResult; 
     996    char[]      lTargetName; 
     997    char[]      lTargetDir; 
    926998    FileDateTime lTargetTime; 
    927999    FileDateTime lMostRecentTime; 
    928     bool lCompiling; 
    929     bool lLinking; 
     1000    bool        lCompiling; 
     1001    bool        lLinking; 
     1002    Source[]    lNonLinkingSources; 
     1003    char[]      lDResponseFileName; 
     1004    char[]      lLinkResponseFileName; 
     1005    char[]      lLResponseFileName; 
     1006    char[]      lDefName; 
     1007    char[]      lOutText; 
     1008    char[]      lSourcesToCompile; 
     1009    char[]      lCommand; 
     1010 
     1011 
     1012    // Examine each supplied source file. 
     1013    foreach( char[] lFile; vCmdLineSourceFiles) 
     1014    { 
     1015        new Source(GetFullPathname(lFile)); 
     1016    } 
     1017 
     1018    // I'm linking if I'm not building a library, and a 'main' was 
     1019    // found, and I was not explicitly told not to link. 
     1020    lLinking =  (vLibraryAction == LibOpt.Build) || 
     1021                (Source.WasMainFound == false) || 
     1022                (vNoLink == true) 
     1023               ? false : true; 
    9301024 
    9311025    lMostRecentTime = GetNewestDateTime(); 
     
    9761070        lTargetName = ""; 
    9771071 
     1072    lTargetName = util.pathex.CanonicalPath(lTargetName, false); 
     1073    lTargetName = util.pathex.AbbreviateFileName(lTargetName); 
     1074 
    9781075    if(vVerbose || vNames) { 
    9791076        writefln("\nBuilding target '%s'", lTargetName); 
    9801077    } 
    981  
    9821078 
    9831079    if (lTargetName.length > 0 ) 
     
    10141110        */ 
    10151111 
    1016         // No files to compile, just link files. 
     1112        // No files to compile, just link files, so collect 
     1113        // all the object files to link in. 
    10171114        foreach( char[] lFileName; vLinkFiles.keys) 
    10181115        { 
    10191116            // Only include OBJECT files. 
    1020             if (std.path.getExt(lFileName) == kObjExtention
     1117            if (util.str.ends(lFileName , kObjExtention) >= 0
    10211118                lFilesToLink ~= lFileName; 
    10221119        } 
    10231120    } 
    1024     else foreach (int i, char[] lFileName; Source.SourceIndex.keys) { 
     1121    else foreach (int i, char[] lFileName; Source.SourceIndex.keys) 
     1122    { 
    10251123        // Check each source to see if we need to recompile it. 
    10261124        Source lCurrentSource; 
     
    10281126        char[] lShortFileName; 
    10291127 
     1128        lNeedsCompiling = vForceCompile; 
     1129 
     1130        lCurrentSource = Source.SourceIndex[lFileName]; 
     1131        if (lCurrentSource.Ignore) 
     1132            continue; 
     1133 
    10301134        lShortFileName = util.pathex.AbbreviateFileName(lFileName); 
    1031         lNeedsCompiling = vForceCompile; 
    1032  
    1033         lCurrentSource = Source.SourceIndex[lFileName]; 
    1034  
    1035         if(lCurrentSource.FilesTime > lCurrentSource.ObjectsTime) { 
    1036             if (vVerbose) writefln("%s newer than its object file", lShortFileName); 
     1135        if (std.path.getExt(lShortFileName) != kSrcExtention) 
     1136            continue; 
     1137 
     1138        // Only source files are examined from here on. 
     1139        if (lCurrentSource.NoLink) 
     1140            lNonLinkingSources ~= lCurrentSource; 
     1141 
     1142        if(lCurrentSource.FilesTime > lCurrentSource.ObjectsTime) 
     1143        { 
     1144            if (vVerbose) 
     1145                writefln("%s newer than its object file", lShortFileName); 
    10371146            lNeedsCompiling=true; 
    10381147 
    10391148        } else if(lCurrentSource.DependantsTime > lCurrentSource.ObjectsTime) { 
    10401149            if (vVerbose) 
    1041                     writefln("%s has newer dependants than its object file.", 
     1150                writefln("%s has newer dependants than its object file.", 
    10421151                                lShortFileName); 
    10431152 
     
    10451154        } 
    10461155 
    1047         if(lNeedsCompiling) { 
     1156        if(lNeedsCompiling) 
     1157        { 
    10481158            lBuildRequired = true; 
    1049             lFilesToLink ~= ReplaceExtention(lShortFileName, "d"); 
    10501159            lCompiling = true; 
     1160            lFilesToCompile ~= lShortFileName; 
     1161 
     1162            // Check to see if I'm allowed to link this file. 
     1163            if (lCurrentSource.NoLink == false) 
     1164                lFilesToLink ~= util.pathex.AbbreviateFileName(lCurrentSource.ObjectName); 
     1165 
    10511166            if (! vTestRun) 
    10521167            { 
     
    10601175                } 
    10611176            } 
    1062         } else if (lCurrentSource.NoLink == false) { 
    1063             lFilesToLink ~= lCurrentSource.ObjectName; 
    1064         } 
    1065  
    1066     } 
    1067  
    1068     foreach(char[] lArg; vDefaultCompArgs) 
    1069     { 
    1070         vCompilerArgs ~= lArg; 
    1071     } 
    1072  
    1073     char[] lDResponseFileName; 
    1074     char[] lLResponseFileName; 
    1075     char[] lDefName; 
    1076     char[] lOutText; 
    1077     char[] lCommand; 
    1078  
    1079  
    1080     if( lBuildRequired == false) { 
     1177        } 
     1178        else if (lCurrentSource.NoLink == false) 
     1179        { 
     1180            lFilesToLink ~= util.pathex.AbbreviateFileName(lCurrentSource.ObjectName); 
     1181        } 
     1182 
     1183    } 
     1184 
     1185    if( lBuildRequired == false ) 
     1186    { 
    10811187        if (vSilent == false) 
    10821188            writefln ("Files are up to date, no build required."); 
    10831189        return 0; 
    10841190    } 
    1085     else { 
    1086     // Build command files for compilation. 
    1087     foreach (char[] lCompileArg; vCompilerArgs) 
    1088     { 
    1089         // Ignore empty args 
    1090         if (lCompileArg.length > 0) 
    1091         { 
    1092             // Enclose in quotes if no quotes are currently present. 
    1093             if (bmfind(lCompileArg, "\"") == -1) 
    1094                 // Arguments containing a blank need to be quoted. 
    1095                 if (bmfind(lCompileArg, " ") != -1) 
    1096                 { 
    1097                     // Strip off any trailing shell escape lead-in character. 
    1098                     if (lCompileArg[$-1] == '\\') 
    1099                         lCompileArg.length = lCompileArg.length - 1; 
    1100                     lOutText ~= std.string.format(`"%s"`, lCompileArg); 
    1101                 } 
    1102                 else 
    1103                     lOutText ~= lCompileArg; 
    1104             else 
    1105                 lOutText ~= lCompileArg; 
    1106  
    1107             // Terminate with a newline char. 
    1108             lOutText ~= "\n"; 
    1109         } 
    1110     } 
    1111  
    1112     if (( vLibraryAction == LibOpt.Build) || 
    1113         (! Source.WasMainFound) || 
    1114          vNoLink 
    1115         ) { 
    1116         if (vNoLinkSwitch.length > 0) { 
    1117             if (bmfind(vNoLinkSwitch, " ") != -1) 
    1118             { 
    1119                 lOutText ~= std.string.format(`"%s"`,vNoLinkSwitch);  // No linking allowed. 
    1120             } 
    1121             else 
    1122                 lOutText ~= vNoLinkSwitch; 
    1123             // Terminate with a newline char. 
    1124             lOutText ~= "\n"; 
    1125  
    1126             vCompilerArgs ~= vNoLinkSwitch; 
    1127         } 
    1128         lLinking = false; 
    1129     } else { 
    1130         lLinking = true; 
    1131     } 
    1132  
    1133     foreach(char[] lFileName; lFilesToLink) { 
    1134         // Use all files if linking otherwise just the source code files. 
    1135         if (lLinking ||( getExt(lFileName) != kObjExtention)) { 
    1136             if (lFileName.length > 0) { 
    1137                 if (bmfind(lFileName, " ") != -1) 
    1138                 { 
    1139                     lOutText ~= std.string.format(`"%s"`,lFileName); 
    1140                 } 
    1141                 else 
    1142                     lOutText ~= lFileName; 
    1143                 // Terminate with a newline char. 
    1144                 lOutText ~= "\n"; 
    1145             } 
    1146         } 
     1191 
     1192    lOutText ~= GatherCompilerArgs(lLinking); 
     1193 
     1194    foreach(char[] lFileName; lFilesToCompile) 
     1195    { 
     1196        lSourcesToCompile ~= util.str.enquote(lFileName) ~ "\n"; 
    11471197    } 
    11481198 
    11491199    // Construct a Optlink Definition file if requested to. 
    1150     version(Windows) { 
     1200    version(Windows) 
     1201    { 
    11511202        if (Source.WasMainGUI) { 
    11521203            AddBuildDef("EXETYPE NT"); 
     
    11711222        } 
    11721223 
    1173     } 
    1174  
    1175     if ((vNoDef == false) && (vBuildDef.length > 0)) { 
    1176  
    1177         lDefName = ReplaceExtention(vTargetName, "def"); 
    1178         if (vTemporaryPath.length != 0) 
    1179         { 
    1180             lDefName = vTemporaryPath ~ std.path.getBaseName(lDefName); 
    1181         } 
    1182         util.fileex.CreateTextFile(lDefName, vBuildDef); 
    1183  
    1184         if (lDefName.length > 0) { 
    1185             if (bmfind(lDefName, " ") != -1) 
     1224        if ((vNoDef == false) && (vBuildDef.length > 0)) 
     1225        { 
     1226            lDefName = ReplaceExtention(lTargetName, "def"); 
     1227            if (vTemporaryPath.length != 0) 
    11861228            { 
    1187                 lOutText ~= std.string.format(`"%s"`,lDefName); 
    1188             } 
    1189             else 
    1190                 lOutText ~= lDefName; 
    1191             // Terminate with a newline char. 
    1192             lOutText ~= "\n"; 
    1193  
     1229                lDefName = vTemporaryPath ~ std.path.getBaseName(lDefName); 
     1230            } 
     1231            lDefName = util.pathex.AbbreviateFileName(lDefName); 
     1232            util.fileex.CreateTextFile(lDefName, vBuildDef); 
     1233 
     1234            lOutText ~= util.str.enquote(lDefName) ~ "\n"; 
    11941235        } 
    11951236    } 
     
    11971238    // Add any library or external obj files required. 
    11981239    if (lLinking) { 
    1199         foreach (char[] lFileName; vLinkFiles.keys) { 
     1240 
     1241        foreach (char[] lFileName; vLinkFiles.keys) 
     1242        { 
     1243            char[] lCmdItem; 
     1244            version(Posix) 
     1245                char[] lPrefix; 
     1246 
    12001247            if (lFileName.length > 0) { 
    1201                 if (bmfind(lFileName, " ") != -1) 
    1202                 { 
    1203                     lOutText ~= std.string.format(`"%s"`,lFileName); 
    1204                 } 
    1205                 else 
    1206                     lOutText ~= lFileName; 
    1207                 // Terminate with a newline char. 
    1208                 lOutText ~= "\n"; 
     1248                lCmdItem = lFileName; 
     1249                version(Posix) 
     1250                { 
     1251                    int lCut; 
     1252                    if ( (lCut = util.str.ends(lCmdItem, "." ~ kLibExtention)) >= 0) 
     1253                    { 
     1254                        lCmdItem = lCmdItem[0 .. lCut]; // Cut off extentsion. 
     1255                        lPrefix = "-L-l"; // Needed for linker to find the library. 
     1256                    } 
     1257                } 
     1258                lCmdItem = util.str.enquote(lCmdItem) ~ "\n"; 
     1259 
     1260                version(Posix) 
     1261                    lOutText ~= lPrefix ~ lCmdItem; 
     1262                version(Windows) 
     1263                    lOutText ~= lCmdItem; 
     1264 
    12091265            } 
    12101266        } 
     
    12141270    { 
    12151271 
    1216         if(lLinking) { 
     1272 
     1273        // COMPILE phase 
     1274        if (lSourcesToCompile.length > 0) 
     1275        { 
     1276            char[] lCommandLine; 
     1277 
     1278            lCommandLine = lOutText ~ lSourcesToCompile; 
     1279 
     1280            if (vUseResponseFile) { 
     1281                lDResponseFileName = ReplaceExtention(lTargetName, "rsp"); 
     1282                if (vTemporaryPath.length != 0) 
     1283                { 
     1284                    lDResponseFileName = vTemporaryPath ~ std.path.getBaseName(lDResponseFileName); 
     1285                } 
     1286                lDResponseFileName = util.pathex.AbbreviateFileName(lDResponseFileName); 
     1287                util.fileex.CreateTextFile(lDResponseFileName,lCommandLine); 
     1288                lCommand = vCompilerPath ~ vCompiler ~ vCompilerSwitch ~ " @" ~ lDResponseFileName; 
     1289            } 
     1290            else 
     1291            {   // using commandline; may run into limits 
     1292                lCommandLine=std.string.replace(lCommandLine, "\n", " "); 
     1293                lCommand = vCompilerPath ~ vCompiler  ~ vCompilerSwitch ~ " " ~ lCommandLine; 
     1294            } 
     1295 
     1296            if (vVerbose) { 
     1297                writefln("Compiling with ..........\n%s\n", lCommandLine); 
     1298            } 
     1299 
     1300            // Run Compiler to compile the source files that need it. 
     1301            lRunResult = RunCommand(lCommand); 
     1302        } 
     1303 
     1304        if ( (lRunResult == 0) && (lFilesToLink.length > 0) && (lLinking == true)) 
     1305        { 
     1306            char[] lCommandLine; 
     1307 
    12171308            // Ensure the linker gets the right executable name to create. 
    12181309            char[] lSmallName; 
     
    12351326            foreach( char[] lLib; vDefaultLibs) 
    12361327            { 
    1237                 if (lLib.length > 0) { 
    1238                     if (bmfind(lLib, " ") != -1) 
     1328                lLib = util.str.enquote(lLib) ~"\n"; 
     1329                version(Windows) 
     1330                    lOutText ~= lLib; 
     1331                version(Posix) 
     1332                    lOutText ~= "-L-l" ~ lLib; 
     1333            } 
     1334 
     1335            if (vLibPaths.length > 1) 
     1336            { 
     1337                vLibPaths = vLibPaths[1..$]; 
     1338 
     1339                // Include the paths to the libraries. 
     1340                version(Windows) { 
     1341 
     1342                    if (vVerbose) 
     1343                        writefln("Setting LIB=%s", vLibPaths); 
     1344                    putenv("LIB=" ~ vLibPaths[1..$]); 
     1345                } 
     1346                version(Posix) 
     1347                { 
     1348                    if (vVerbose) 
     1349                        writefln("Setting LIB=%s", vLibPaths); 
     1350                    char[][] lLibPaths; 
     1351                    lLibPaths = std.string.split(vLibPaths, vConfigSep); 
     1352                    foreach(char[] lLib; lLibPaths) 
    12391353                    { 
    1240                         lOutText ~= std.string.format(`"%s"`,lLib); 
     1354                        if (lLib.length > 0) 
     1355                            lOutText ~= "-L-L" ~ lLib ~ "\n"; 
    12411356                    } 
    1242                     else 
    1243                         lOutText ~= lLib; 
    1244                     // Terminate with a newline char. 
    1245                     lOutText ~= "\n"; 
    1246                 } 
    1247             } 
    1248         } 
    1249  
    1250         if (vUseResponseFile) { 
    1251             lDResponseFileName = ReplaceExtention(vTargetName, "rsp"); 
    1252             if (vTemporaryPath.length != 0) 
    1253             { 
    1254                 lDResponseFileName = vTemporaryPath ~ std.path.getBaseName(lDResponseFileName); 
    1255             } 
    1256             util.fileex.CreateTextFile(lDResponseFileName,lOutText); 
    1257             lCommand = vCompilerPath ~ vCompiler ~ " @" ~ lDResponseFileName; 
    1258         } 
    1259         else 
    1260         {   // using commandline; may run into limits 
    1261             lOutText=std.string.replace(lOutText, "\n", " "); 
    1262             //lOutText=std.string.replace(lOutText, "\""," "); 
    1263             lCommand = vCompilerPath ~ vCompiler ~ " " ~ lOutText; 
    1264         } 
    1265  
    1266         if (vVerbose) { 
    1267             writefln("Compiling with ..........\n%s\n", lOutText); 
    1268         } 
    1269  
    1270         // Run Compiler to compile the source files that need it. 
    1271         lRunResult = RunCommand(lCommand); 
     1357                } 
     1358            } 
     1359 
     1360 
     1361            lCommandLine = lOutText; 
     1362            foreach(char[] lFile; lFilesToLink) 
     1363                lCommandLine ~= lFile ~ "\n"; 
     1364 
     1365            if (vUseResponseFile) { 
     1366                lLinkResponseFileName = ReplaceExtention(lTargetName, "ksp"); 
     1367                if (vTemporaryPath.length != 0) 
     1368                { 
     1369                    lLinkResponseFileName = vTemporaryPath ~ std.path.getBaseName(lLinkResponseFileName); 
     1370                } 
     1371                lLinkResponseFileName = util.pathex.AbbreviateFileName(lLinkResponseFileName); 
     1372                util.fileex.CreateTextFile(lLinkResponseFileName,lCommandLine); 
     1373                lCommand = vCompilerPath ~ vLinker ~ " @" ~ lLinkResponseFileName; 
     1374            } 
     1375            else 
     1376            {   // using commandline; may run into limits 
     1377                lCommandLine=std.string.replace(lCommandLine, "\n", " "); 
     1378                lCommand = vCompilerPath ~ vLinker ~ " " ~ lCommandLine; 
     1379            } 
     1380 
     1381            if (vVerbose) { 
     1382                writefln("Linking with ..........\n%s\n", lCommandLine); 
     1383            } 
     1384 
     1385            // Run Linker 
     1386            lRunResult = RunCommand(lCommand); 
     1387        } 
    12721388 
    12731389    } 
     
    13261442 
    13271443        if (vUseResponseFile) { 
    1328             lLResponseFileName = ReplaceExtention(vTargetName, "lsp"); 
     1444            lLResponseFileName = ReplaceExtention(lTargetName, "lsp"); 
    13291445            if (vTemporaryPath.length != 0) 
    13301446            { 
     
    13571473            Source lSource; 
    13581474            lSource = Source.SourceIndex[lFileName]; 
     1475            if (lSource.Ignore) 
     1476                continue; 
     1477 
    13591478            if (lSource.ObjectName.length > 0) 
    13601479            { 
     
    13651484        // Build's own temprary files. 
    13661485        lHitList ~= lDResponseFileName; 
     1486        lHitList ~= lLinkResponseFileName; 
    13671487        lHitList ~= lLResponseFileName; 
    13681488        lHitList ~= lDefName; 
    13691489 
    13701490        // Possible ones created by compiler, linker, and librarian. 
    1371         lHitList ~= ReplaceExtention(vTargetName, "map"); 
    1372         lHitList ~= ReplaceExtention(vTargetName, "bak"); 
    1373         lHitList ~= ReplaceExtention(vTargetName, "lst"); 
     1491        lHitList ~= ReplaceExtention(lTargetName, "map"); 
     1492        lHitList ~= ReplaceExtention(lTargetName, "bak"); 
     1493        lHitList ~= ReplaceExtention(lTargetName, "lst"); 
    13741494 
    13751495        foreach(char[] lFilename; lHitList) 
     
    13901510 
    13911511    return lRunResult; 
     1512 
    13921513} 
    1393 } 
    1394  
    13951514 
    13961515// ------------------------------------------- 
    1397 void ActivateVersion(char[] pID
     1516char [] GatherCompilerArgs(bool pLinking
    13981517// ------------------------------------------- 
    13991518{ 
    1400     vActiveVersions [ pID ] = true; 
     1519    char[] lOutText; 
     1520 
     1521    foreach(char [] lRoot; vImportRoots) 
     1522    { 
     1523        version(Posix) 
     1524            vDefaultCompArgs ~= vImportPathSwitch ~ "\"" ~ lRoot ~ "\""; 
     1525        else 
     1526            vDefaultCompArgs ~= vImportPathSwitch ~ lRoot; 
     1527    } 
     1528 
     1529    foreach(char[] lArg; vDefaultCompArgs) 
     1530    { 
     1531        vCompilerArgs ~= lArg; 
     1532    } 
     1533 
     1534    // Build command files for compilation. 
     1535    foreach (char[] lCompileArg; vCompilerArgs) 
     1536    { 
     1537        // Ignore empty args 
     1538        if (lCompileArg.length > 0) 
     1539        { 
     1540            // Enclose in quotes if no quotes are currently present. 
     1541            if (bmfind(lCompileArg, "\"") == -1) 
     1542                // Arguments containing a blank need to be quoted. 
     1543                if (bmfind(lCompileArg, " ") != -1) 
     1544                { 
     1545                    // Strip off any trailing shell escape lead-in character. 
     1546                    if (lCompileArg[$-1] == '\\') 
     1547                        lCompileArg.length = lCompileArg.length - 1; 
     1548                    lOutText ~= std.string.format(`"%s"`, lCompileArg); 
     1549                } 
     1550                else 
     1551                    lOutText ~= lCompileArg; 
     1552            else 
     1553                lOutText ~= lCompileArg; 
     1554 
     1555            // Terminate with a newline char. 
     1556            lOutText ~= "\n"; 
     1557        } 
     1558    } 
     1559 
     1560    if (pLinking == false) 
     1561    { // No linking allowed. 
     1562        if (vNoLinkSwitch.length > 0) 
     1563        { 
     1564            if (bmfind(vNoLinkSwitch, " ") != -1) 
     1565                lOutText ~= std.string.format(`"%s"`,vNoLinkSwitch); 
     1566            else 
     1567                lOutText ~= vNoLinkSwitch; 
     1568            // Terminate with a newline char. 
     1569            lOutText ~= "\n"; 
     1570 
     1571            vCompilerArgs ~= vNoLinkSwitch; 
     1572        } 
     1573    } 
     1574 
     1575    return lOutText; 
    14011576} 
    14021577 
    1403 // ------------------------------------------- 
    1404 bool IsActiveVersion(char[] pID) 
    1405 // ------------------------------------------- 
    1406 { 
    1407     return (pID in vActiveVersions) !== null ? true : false ; 
    1408 } 
    14091578 
    14101579// ------------------------------------------- 
     
    14151584} 
    14161585 
    1417 // ------------------------------------------- 
    1418 void AddLib(char[] pLib) 
    1419 // ------------------------------------------- 
    1420 { 
    1421     version(GNU) { 
    1422         if (pLib.length > 0) { 
    1423             vDefaultCompArgs ~= "-L-l\"" ~ pLib ~ "\""; 
    1424         } 
    1425     } 
    1426 } 
    14271586 
    14281587// ------------------------------------------- 
     
    15251684} 
    15261685 
     1686bool AutoImports() 
     1687{ 
     1688    return vAutoImports; 
     1689} 
     1690 
    15271691char[][] GetImportRoots() 
    15281692{ 
     
    16481812                { 
    16491813                    lRootName = AddRoot(lRoot); 
     1814                    /* 
    16501815                    version(Posix) 
    16511816                        vDefaultCompArgs ~= vImportPathSwitch ~ "\"" ~ lRoot ~ "\""; 
    16521817                    else 
    16531818                        vDefaultCompArgs ~= vImportPathSwitch ~ lRoot; 
     1819                        */ 
    16541820                    if(vVerbose) { 
    16551821                        if (lRootName.length > 0){ 
     
    17131879 
    17141880// ------------------------------------------- 
    1715 void ReadEnviron() { 
     1881void ReadEnviron() 
    17161882// ------------------------------------------- 
     1883{ 
    17171884    char[]   lSymValue; 
    17181885 
     
    17281895 
    17291896// ------------------------------------------- 
    1730 void ReadConfigFile() { 
     1897void ReadConfigFile() 
    17311898// ------------------------------------------- 
     1899{ 
    17321900    char[]   lPath; 
    17331901    char[][] lTextLines; 
     
    17391907      return; 
    17401908    } 
    1741     else { 
     1909 
    17421910    lPath = vConfigPath ~ vConfigFile ; 
    17431911    lTextLines = util.fileex.GetTextLines(lPath, util.fileex.GetOpt.Exists); 
     
    17471915    } 
    17481916 
    1749     foreach(int i, char[] lLine; lTextLines) { 
     1917    foreach(int i, char[] lLine; lTextLines) 
     1918    { 
    17501919        // Strip off trailing whitespace. 
    17511920        while(lLine.length > 0 && lLine[lLine.length-1] <= ' ') { 
     
    17651934        } // end of DFLAGS processing. 
    17661935 
    1767         version(Windows){ 
    1768             // Examine LIB 
    1769             lPos = bmfind(lLine, "LIB="); 
    1770             if(lPos == 0) { 
    1771                 char[][] lPaths; 
    1772                 lLine = lLine[lPos+4 .. length]; 
    1773                 lPaths.length = 1; 
    1774                 foreach(char lChar; lLine) 
    1775                 { 
    1776                     if (lChar == '"') {} 
    1777                     else if (lChar == ';') 
    1778                     { 
    1779                         lPaths.length = lPaths.length + 1; 
     1936        // Examine LIB 
     1937        lPos = bmfind(lLine, "LIB="); 
     1938        if(lPos == 0) 
     1939        { 
     1940            char[][] lPaths; 
     1941            lLine = lLine[lPos+4 .. length]; 
     1942            lPaths.length = 1; 
     1943            foreach(char lChar; lLine) 
     1944            { 
     1945                if (lChar == '"') {} 
     1946                else if (lChar == ';') 
     1947                { 
     1948                    lPaths.length = lPaths.length + 1; 
     1949                } 
     1950                else 
     1951                    lPaths[$-1] ~= lChar; 
     1952 
     1953            } 
     1954            for(int i = 0; i < lPaths.length; i++) 
     1955            { 
     1956                lPaths[i] = std.string.strip(lPaths[i]); 
     1957            } 
     1958 
     1959            foreach( char[] lPath; lPaths) 
     1960            { 
     1961                if (lPath.length > 0) 
     1962                { 
     1963                    if (lPath[0] == '"' && lPath[length-1] == '"') { 
     1964                        lPath = lPath[1..length-1]; 
    17801965                    } 
    1781                     else 
    1782                         lPaths[$-1] ~= lChar; 
    1783  
    1784                 } 
    1785                 for(int i = 0; i < lPaths.length; i++) 
    1786                 { 
    1787                     lPaths[i] = std.string.strip(lPaths[i]); 
    1788                 } 
    1789  
    1790                 vLibPaths.length = 0; 
    1791                 vLibPaths ~= "LIB="; 
    1792                 foreach( char[] lPath; lPaths) 
    1793                 { 
    1794                     if (lPath.length > 0) 
    1795                     { 
    1796                         if (lPath[0] == '"' && lPath[length-1] == '"') { 
    1797                             lPath = lPath[1..length-1]; 
    1798                         } 
    1799                         vLibPaths ~= ("\"" ~ util.pathex.CanonicalPath(lPath) ~ "\""); 
    1800                         vLibPaths ~= vConfigSep; 
    1801                     } 
    1802                 } 
    1803                 // Strip off final semi-colon 
    1804                 vLibPaths.length = vLibPaths.length-1; 
    1805  
    1806                 if(vVerbose) { 
    1807                     writefln(" use %s",vLibPaths); 
    1808                 } 
    1809                 continue; 
    1810             } 
    1811  
    1812             // Examine LINKCMD 
    1813             lPos = bmfind(lLine, "LINKCMD="); 
    1814             if(lPos == 0) { 
    1815                 // Strip out any quotes 
    1816                 while( (lPos = bmfind(lLine, "\"")) != -1) 
    1817                 { 
    1818                     lLine = lLine[0..lPos] ~ lLine[lPos+1 .. $]; 
    1819                 } 
    1820  
    1821                 if (vLibrarianPath.length == 0) 
    1822                 { 
    1823                     vLibrarianPath = std.path.getDirName(lLine[8..$]) ~ std.path.sep; 
    1824                     vLibrarianPath = util.pathex.CanonicalPath(vLibrarianPath); 
    1825                     if(vVerbose) { 
    1826                         writefln(" librarian path %s",vLibrarianPath); 
    1827                     } 
    1828                 } 
    1829                 continue; 
    1830             } 
    1831  
    1832             lPos = bmfind(lLine, "LIBCMD="); 
    1833             if(lPos == 0) { 
    1834                 // Strip out any quotes 
    1835                 while( (lPos = bmfind(lLine, "\"")) != -1) 
    1836                 { 
    1837                     lLine = lLine[0..lPos] ~ lLine[lPos+1 .. $]; 
    1838                 } 
    1839                 vLibrarianPath = std.path.getDirName(lLine[7..$]) ~ std.path.sep; 
     1966                    vLibPaths ~= vConfigSep; 
     1967                    vLibPaths ~= ("\"" ~ util.pathex.CanonicalPath(lPath) ~ "\""); 
     1968                } 
     1969            } 
     1970            if(vVerbose) 
     1971            { 
     1972                writefln(" use %s",vLibPaths); 
     1973            } 
     1974            continue; 
     1975        } 
     1976 
     1977        // Examine LINKCMD 
     1978        lPos = bmfind(lLine, "LINKCMD="); 
     1979        if(lPos == 0) { 
     1980            // Strip out any quotes 
     1981            while( (lPos = bmfind(lLine, "\"")) != -1) 
     1982            { 
     1983                lLine = lLine[0..lPos] ~ lLine[lPos+1 .. $]; 
     1984            } 
     1985 
     1986            if (vLibrarianPath.length == 0) 
     1987            { 
     1988                vLibrarianPath = std.path.getDirName(lLine[8..$]) ~ std.path.sep; 
    18401989                vLibrarianPath = util.pathex.CanonicalPath(vLibrarianPath); 
    1841  
    1842                 vLibrarian = std.path.getBaseName(lLine[7..$]); 
    18431990                if(vVerbose) { 
    18441991                    writefln(" librarian path %s",vLibrarianPath); 
    1845                     writefln(" librarian is %s",vLibrarian); 
    1846                 } 
    1847             } 
    1848         } 
    1849     } 
    1850 
     1992                } 
     1993            } 
     1994            continue; 
     1995        } 
     1996 
     1997        lPos = bmfind(lLine, "LIBCMD="); 
     1998        if(lPos == 0) { 
     1999            // Strip out any quotes 
     2000            while( (lPos = bmfind(lLine, "\"")) != -1) 
     2001            { 
     2002                lLine = lLine[0..lPos] ~ lLine[lPos+1 .. $]; 
     2003            } 
     2004            vLibrarianPath = std.path.getDirName(lLine[7..$]) ~ std.path.sep; 
     2005            vLibrarianPath = util.pathex.CanonicalPath(vLibrarianPath); 
     2006 
     2007            vLibrarian = std.path.getBaseName(lLine[7..$]); 
     2008            if(vVerbose) { 
     2009                writefln(" librarian path %s",vLibrarianPath); 
     2010                writefln(" librarian is %s",vLibrarian); 
     2011            } 
     2012        } 
     2013    } 
    18512014} 
    18522015 
     
    18922055 
    18932056// ------------------------------------------------ 
     2057Substitute[] GetMacros() 
     2058{ 
     2059    return vSubstitutions; 
     2060} 
     2061 
     2062// ------------------------------------------------ 
    18942063char[] GetFullPathname(char[] pFileName) 
    18952064// ------------------------------------------- 
     
    19152084} 
    19162085 
    1917 // ------------------------------------------- 
    1918 void SetKnownVersions() 
    1919 // ------------------------------------------- 
    1920 { 
    1921     // This one is always true in this tool ;-) 
    1922     vActiveVersions ["build"] = true; 
    1923  
    1924     version(DigitalMars)  vActiveVersions ["DigitalMars"] = true; 
    1925     version(X86)          vActiveVersions ["X86"] = true; 
    1926     version(PPC)          vActiveVersions ["PPC"] = true; 
    1927     version(AMD64)        vActiveVersions ["AMD64"] = true; 
    1928     version(PPC64)        vActiveVersions ["PPC64"] = true; 
    1929     version(Windows)      vActiveVersions ["Windows"] = true; 
    1930     version(Win32)        vActiveVersions ["Win32"] = true; 
    1931     version(Win64)        vActiveVersions ["Win64"] = true; 
    1932     version(linux)        vActiveVersions ["linux"] = true; 
    1933     version(darwin)       vActiveVersions ["darwin"] = true; 
    1934     version(Unix)         vActiveVersions ["Unix"] = true; 
    1935     version(unix)         vActiveVersions ["unix"] = true; 
    1936     version(Posix)        vActiveVersions ["Posix"] = true; 
    1937     version(LittleEndian) vActiveVersions ["LittleEndian"] = true; 
    1938     version(BigEndian)    vActiveVersions ["BigEndian"] = true; 
    1939     version(D_InlineAsm)  vActiveVersions ["D_InlineAsm"] = true; 
    1940  
    1941 } 
    19422086 
    19432087// Function to locate where Complier is installed from the PATH symbol 
     
    19952139    source.GetImportRoots   = &GetImportRoots; 
    19962140    source.ModulesToIgnore  = &ModulesToIgnore; 
     2141    source.AutoImports      = &AutoImports; 
    19972142    source.AddTarget        = &AddTarget; 
    19982143    source.AddLink          = &AddLink; 
    1999     source.AddLib           = &AddLib; 
    20002144    source.AddExternal      = &AddExternal; 
    20012145    source.AddBuildDef      = &AddBuildDef; 
    2002     source.ActivateVersion  = &ActivateVersion; 
    2003     source.IsActiveVersion  = &IsActiveVersion; 
    20042146    source.GetFullPathname  = &GetFullPathname; 
    20052147    source.GetObjWritePath  = &GetTemporaryPath; 
     2148    source.GetMacros        = &GetMacros; 
    20062149 
    20072150    // Scan the PATH env symbol to locate the D compiler. 
     
    20122155        vCompilerPath = lCompPath.dup; 
    20132156        // Set config path to same as compiler unless it is already set. 
    2014         if (!(vConfigPath is null) && (vConfigPath.length == 0)) 
     2157        if ((vConfigPath !== null) && (vConfigPath.length == 0)) 
    20152158            vConfigPath = lCompPath.dup; 
    20162159    } 
     
    20422185    } 
    20432186    else { 
    2044     SetKnownVersions(); 
    20452187 
    20462188    GatherArgs( pArgs ); 
    2047  
     2189    source.mVerboseMode = vVerbose; 
    20482190    if (vVerbose){ 
    20492191        writefln("*** build v%s (build %d)***", vAppVersion, build_bn.auto_build_number); 
     
    20532195        ProcessCmdLineArg( lArg ); 
    20542196    } 
     2197 
     2198    source.mMacroInput = vMacroInput; 
     2199    if (vMacroInput) 
     2200        ProcessMacroDefs(vVerbose); 
    20552201 
    20562202    if( (vTargetName.length == 0) && (vCommandTargetName.length == 0) ){ 
     
    21032249        writefln("Compiler installed in %s",vCompilerPath); 
    21042250        writefln("Configuration File installed in %s",vConfigPath); 
    2105         foreach(char[] k; vActiveVersions.keys){ 
    2106             writefln("Active Version: '%s'", k); 
    2107         } 
    2108     } 
     2251    } 
     2252 
     2253    source.SetKnownVersions(); 
    21092254 
    21102255    ReadEnviron(); 
     
    21292274 
    21302275    // List all missing files (if any). 
    2131     foreach( int i, char[] lFile; vCmdLineFiles) 
     2276    foreach( char[] lFile; vCmdLineSourceFiles) 
    21322277    { 
    21332278        if (! util.fileex.FileExists( lFile ) ) 
     
    21432288        throw new Exception ("Not all supplied files exist."); 
    21442289    } 
    2145     else { 
    2146         foreach( char[] lFile; vCmdLineFiles) 
    2147         { 
    2148             new Source(GetFullPathname(lFile)); 
    2149         } 
    2150  
    2151         version(Windows) { 
    2152             putenv(vLibPaths); 
    2153         } 
    2154  
    2155         lBuildResult = Build(); 
    2156  
    2157         if(vVerbose) { 
    2158             writefln(""); 
    2159             DisplayItems(vBuildArgs,      "build args: ..............."); 
    2160             DisplayItems(vCompilerArgs,   "compiler args: ................"); 
    2161             DisplayItems(vCmdLineFiles,   "command line files: ..............."); 
    2162             DisplayItems(Source.SourceIndex.keys, 
    2163                                           "declared source files: ..............."); 
    2164             DisplayItems(vLinkFiles.keys, "link files: ..............."); 
    2165             DisplayItems(vExternals,      "externally built files: ..............."); 
    2166             DisplayItems(vImportRoots,    "import roots: ................."); 
    2167             DisplayItems(vModulesToIgnore,"ignored packages: ................."); 
    2168             DisplayItems(vModulesToNotice,"noticed package: ................."); 
    2169         } 
    2170  
    2171         return lBuildResult; 
    2172         } 
     2290 
     2291    lBuildResult = Build(); 
     2292 
     2293    if(vVerbose) { 
     2294        writefln(""); 
     2295        DisplayItems(vBuildArgs,      "build args: ..............."); 
     2296        DisplayItems(vCompilerArgs,   "compiler args: ................"); 
     2297        DisplayItems(vCmdLineSourceFiles,   "command line files: ..............."); 
     2298        DisplayItems(Source.SourceIndex.keys, 
     2299                                      "source files: ..............."); 
     2300        DisplayItems(vLinkFiles.keys, "link files: ..............."); 
     2301        DisplayItems(vExternals,      "externally built files: ..............."); 
     2302        DisplayItems(vImportRoots,    "import roots: ................."); 
     2303        DisplayItems(vModulesToIgnore,"ignored packages: ................."); 
     2304        DisplayItems(vModulesToNotice,"noticed package: ................."); 
     2305    } 
     2306 
     2307    return lBuildResult; 
    21732308    } 
    21742309 
     
    22172352{ 
    22182353    char[] lNewPath; 
    2219  
    2220     if(pArg.length>9) { 
    2221         if(util.str.IsLike(pArg, vVersionSwitch ~ "*")) { 
    2222             char[] lVersionString; 
    2223  
    2224             lVersionString=pArg [9 .. pArg.length]; 
    2225             if (std.ctype.isdigit (lVersionString [0])) { 
    2226                 // Note that even though we capture this here, 
    2227                 // version levels are not yet implemented in the 
    2228                 // source scanner. 
    2229                vVersionLevel = atoi (lVersionString); 
    2230             } else { 
    2231                vActiveVersions [lVersionString] = true; 
    2232             } 
    2233         } 
    2234     } 
    2235  
    2236  
     2354    static char[] lImportSwitch; 
     2355    int lCut; 
     2356 
     2357    if(util.str.begins(pArg, "-version=") > 0) { 
     2358        char[] lVersionString; 
     2359 
     2360        lVersionString=pArg [9 .. $]; 
     2361        source.ActivateVersion(lVersionString); 
     2362        pArg = vVersionSwitch ~ lVersionString; 
     2363    } 
     2364    else if(util.str.begins(pArg, "-fversion=") > 0) { 
     2365        char[] lVersionString; 
     2366 
     2367        lVersionString=pArg [10 .. $]; 
     2368        source.ActivateVersion(lVersionString); 
     2369        pArg = vVersionSwitch ~ lVersionString; 
     2370    } 
     2371 
     2372    else if(pArg == "-fdebug") { 
     2373        source.ActivateDebug("1"); 
     2374        pArg = vDebugSwitch; 
     2375    } 
     2376    else if(pArg == "-debug") { 
     2377        source.ActivateDebug("1"); 
     2378        pArg = vDebugSwitch; 
     2379    } 
     2380    else if(util.str.begins(pArg, "-fdebug=") > 0) { 
     2381        char[] lDebugString; 
     2382 
     2383        lDebugString=pArg [8 .. $]; 
     2384        source.ActivateDebug(lDebugString); 
     2385        pArg = vDebugSwitch ~ "=" ~ lDebugString; 
     2386    } 
     2387    else if(util.str.begins(pArg, "-debug=") > 0) { 
     2388        char[] lDebugString; 
     2389 
     2390        lDebugString=pArg [7 .. $]; 
     2391        source.ActivateDebug(lDebugString); 
     2392        pArg = vDebugSwitch ~ "=" ~ lDebugString; 
     2393    } 
    22372394 
    22382395    switch(pArg) { 
     
    22922449            break; 
    22932450 
     2451        case "-noautoimport": 
     2452            vAutoImports = false; 
     2453            vBuildArgs ~= pArg; 
     2454            // Not passed thru 
     2455            break; 
     2456 
    22942457        case "-nodef": 
    22952458            vNoDef = true; 
     2459            vBuildArgs ~= pArg; 
     2460            // Not passed thru. 
     2461            break; 
     2462 
     2463        case "-nomacro": 
     2464            vMacroInput = false; 
    22962465            vBuildArgs ~= pArg; 
    22972466            // Not passed thru. 
     
    23482517                    break; 
    23492518 
     2519                } 
     2520 
     2521                if (util.str.begins(pArg, "-LIBPATH=") >= 0) 
     2522                { 
     2523                    vLibPaths ~= vConfigSep ~ pArg[9..$].dup; 
     2524                    vBuildArgs ~= pArg; 
     2525                    break; 
    23502526                } 
    23512527 
     
    23882564                } 
    23892565 
    2390                 if (util.str.IsLike(pArg,  std.utf.toUTF32(vImportPathSwitch ~ "*"))) 
     2566                if (pArg == vBuildImportPathSwitch) 
     2567                { 
     2568                    vDelayedValue = &lImportSwitch; 
     2569                    vBuildArgs ~= pArg; 
     2570                    break; 
     2571                } 
     2572                else if ( (lCut = util.str.begins(pArg, vBuildImportPathSwitch)) >= 0) 
    23912573                { 
    23922574                    char [] lRoot; 
    2393                     foreach(char[] lCmdRoot; std.string.split(pArg[2..$], ";")) 
     2575                    foreach(char[] lCmdRoot; std.string.split(pArg[lCut..$], ";")) 
    23942576                    { 
    23952577                        lRoot = AddRoot(lCmdRoot); 
    23962578                        if (lRoot.length > 0){ 
    2397                             version(Posix) 
    2398                                 vDefaultCompArgs ~= vImportPathSwitch ~ "\"" ~ lRoot ~ "\""; 
    2399                             else 
    2400                                 vDefaultCompArgs ~= vImportPathSwitch ~ lRoot; 
    24012579                            if(vVerbose) { 
    24022580                                    writefln("Added root from command line = %s",lRoot); 
     
    25222700                    // Used when an switch needs the subsequent arg to 
    25232701                    // be its value. 
    2524                     *vDelayedValue = pArg; 
     2702                    if ( vDelayedValue == &lImportSwitch) 
     2703                    { 
     2704                        char [] lRoot; 
     2705                        foreach(char[] lCmdRoot; std.string.split(pArg, ";")) 
     2706                        { 
     2707                            lRoot = AddRoot(lCmdRoot); 
     2708                            if (lRoot.length > 0){ 
     2709                                if(vVerbose) { 
     2710                                        writefln("Added root from command line = %s",lRoot); 
     2711                                } 
     2712                            } 
     2713                        } 
     2714                    } 
     2715                    else 
     2716                    { 
     2717                        *vDelayedValue = pArg; 
     2718                        vBuildArgs ~= pArg; 
     2719                    } 
    25252720                    vDelayedValue = null; 
    2526                     vBuildArgs ~= pArg; 
    25272721                    break; 
    25282722                } 
     
    25312725                   case "": 
    25322726                       pArg ~= "." ~ kSrcExtention; 
    2533                        vCmdLineFiles ~= pArg; 
     2727                       vCmdLineSourceFiles ~= pArg; 
    25342728                       break; 
    25352729 
    25362730                   case kSrcExtention: 
    2537                        vCmdLineFiles ~= pArg; 
     2731                   case kMacroExtention: 
     2732                       vCmdLineSourceFiles ~= pArg; 
    25382733                       break; 
    25392734 
     
    25522747void GatherOneArg( char[] pArg ) 
    25532748{ 
    2554     static bool[char[]] lKnownArgs;  
    2555      
     2749    static bool[char[]] lKnownArgs; 
     2750 
    25562751    pArg = std.string.strip(pArg); 
    25572752    if (pArg.length == 0) 
     
    25702765            if (pArg[$-1] == '*') 
    25712766            { 
    2572                 if (vCombinedArgs[i].begins(pArg[0..$-1])
     2767                if (vCombinedArgs[i].begins(pArg[0..$-1]) > 0
    25732768                { 
    25742769                    vCombinedArgs = vCombinedArgs[0..i] ~ 
     
    26182813} 
    26192814 
     2815void ProcessMacroDefs(bool pVerbose) 
     2816{ 
     2817    // From build.exe location 
     2818    ProcessOneMacroDef(pVerbose, std.path.getDirName(vAppPath)); 
     2819 
     2820    // From compiler location 
     2821    ProcessOneMacroDef(pVerbose, vCompilerPath); 
     2822 
     2823} 
     2824 
     2825void ProcessOneMacroDef(bool pVerbose, char[] pPath) 
     2826{ 
     2827    char[] lMacroDefFileName; 
     2828    char[][] lMacroDefLines; 
     2829    char[] lOpen; 
     2830    char[] lClose; 
     2831    char[] lEscapeOpen; 
     2832    char[] lEscapeClose; 
     2833    char[] lCommentLead; 
     2834    static char[] lDefOpen = "\""; 
     2835    static char[] lDefClose = "\""; 
     2836    static char[] lDefEscapeOpen = "\\"; 
     2837    static char[] lDefEscapeClose = ""; 
     2838    static char[] lDefCommentLead = "#"; 
     2839 
     2840    lOpen = lDefOpen; 
     2841    lClose = lDefClose; 
     2842    lEscapeOpen = lDefEscapeOpen; 
     2843    lEscapeClose = lDefEscapeClose; 
     2844    lCommentLead = lDefCommentLead; 
     2845 
     2846    lMacroDefFileName = pPath.dup; 
     2847 
     2848    if ((lMacroDefFileName.length > 0) && 
     2849        (lMacroDefFileName[$-std.path.sep.length..$] != std.path.sep) ) 
     2850            lMacroDefFileName ~= std.path.sep; 
     2851 
     2852    lMacroDefFileName ~= "build.mdf"; 
     2853 
     2854 
     2855    if (pVerbose && util.fileex.FileExists(lMacroDefFileName) ) 
     2856        writefln("Build Macro Definition file %s", lMacroDefFileName); 
     2857    lMacroDefLines = util.fileex.GetTextLines(lMacroDefFileName, util.fileex.GetOpt.Always); 
     2858 
     2859    foreach(char[] lArg; lMacroDefLines) 
     2860    { 
     2861        char[][] lOptions; 
     2862 
     2863        lArg = ExpandEnvVar(lArg); 
     2864        // Locate any comment text in the line. 
     2865        int lPos = std.string.find(lArg, lCommentLead); 
     2866        if (lPos != -1) 
     2867        { 
     2868            // Truncate the line at the comment lead-in character. 
     2869            lArg.length = lPos; 
     2870        } 
     2871 
     2872        lArg = std.string.strip(lArg); 
     2873        if (lArg.length > 1) 
     2874        { 
     2875 
     2876            if (lArg.begins("replace ") > 0) 
     2877            { 
     2878                int lStartPos; 
     2879                int lEndPos; 
     2880                bool lEndFound; 
     2881                int lDepthInc; 
     2882                int lDepth; 
     2883                int lDataPos; 
     2884                char[] lPattern; 
     2885                char[] lResolution; 
     2886 
     2887                lArg = std.string.strip(lArg[8..$]); 
     2888                if (lOpen in vNestedDelim) 
     2889                    lDepthInc = 1; 
     2890                else 
     2891                    lDepthInc = 0; 
     2892 
     2893                // Format should be <open> <pattern> <close> <open> <resolution> <close> 
     2894                lStartPos = 0; 
     2895                lEndPos = lStartPos + lOpen.length; 
     2896                while( (lEndPos < lArg.length) && 
     2897                       (lArg[lStartPos .. lEndPos] != lOpen) 
     2898                      ) 
     2899                { 
     2900                    lStartPos ++; 
     2901                    lEndPos ++; 
     2902                } 
     2903                if (lEndPos >= lArg.length) 
     2904                    continue;   // No open delim found. 
     2905                lDepth += lDepthInc; 
     2906                lDataPos = lEndPos; 
     2907                lStartPos = lDataPos; 
     2908                lEndPos = lStartPos + lClose.length; 
     2909                while( (lEndPos < lArg.length) && 
     2910                       (lArg[lStartPos .. lEndPos] != lClose) 
     2911                      ) 
     2912                { 
     2913                    lStartPos ++; 
     2914                    lEndPos ++; 
     2915                } 
     2916                if (lEndPos >= lArg.length) 
     2917                    continue;   // No close delim found. 
     2918                lPattern = std.string.strip(lArg[lDataPos .. lStartPos]); 
     2919 
     2920                lStartPos = lEndPos; 
     2921                lEndPos = lStartPos + lOpen.length; 
     2922                while( (lEndPos < lArg.length) && 
     2923                       (lArg[lStartPos .. lEndPos] != lOpen) 
     2924                      ) 
     2925                { 
     2926                    lStartPos ++; 
     2927                    lEndPos ++; 
     2928                } 
     2929                if (lEndPos >= lArg.length) 
     2930                    continue;   // No open delim found. 
     2931                lDepth += lDepthInc; 
     2932                lDataPos = lEndPos; 
     2933                lStartPos = lDataPos; 
     2934                lEndPos = lStartPos + lClose.length; 
     2935                while( (lEndPos < lArg.length) && 
     2936                       (lArg[lStartPos .. lEndPos] != lClose) 
     2937                      ) 
     2938                { 
     2939                    lStartPos ++; 
     2940                    lEndPos ++; 
     2941                } 
     2942                if (lEndPos > lArg.length) 
     2943                    continue;   // No close delim found. 
     2944                lResolution = std.string.strip(lArg[lDataPos .. lStartPos]); 
     2945 
     2946                vSubstitutions.length = vSubstitutions.length + 1; 
     2947                vSubstitutions[$-1].Pattern = lPattern; 
     2948                vSubstitutions[$-1].Resolution = lResolution; 
     2949                vSubstitutions[$-1].EscapeOpen = lEscapeOpen; 
     2950                vSubstitutions[$-1].EscapeClose = lEscapeClose; 
     2951 
     2952            } 
     2953            else if (lArg.begins("delim ") > 0 ) 
     2954            { 
     2955 
     2956                lArg = std.string.strip(lArg[6..$]); 
     2957 
     2958                lOptions = std.string.split(lArg); 
     2959                foreach(char[] lOption; lOptions) 
     2960                { 
     2961                    if (lOption == "std") 
     2962                    { 
     2963                        lOpen = lDefOpen; 
     2964                        lClose = lDefClose; 
     2965                        lEscapeOpen = lDefEscapeOpen; 
     2966                        lEscapeClose = lDefEscapeClose; 
     2967                        lCommentLead = lDefCommentLead; 
     2968                    } 
     2969                    else 
     2970                    { 
     2971                        char[][] lKeyValue; 
     2972                        lKeyValue = std.string.split(lOption, "="); 
     2973                        switch (lKeyValue[0]) 
     2974                        { 
     2975                            case "open": 
     2976                                lOpen = lKeyValue[1]; 
     2977                                break; 
     2978                            case "close": 
     2979                                lClose = lKeyValue[1]; 
     2980                                break; 
     2981                            case "escapeopen": 
     2982                                lEscapeOpen = lKeyValue[1]; 
     2983                                break; 
     2984                            case "escapeclose": 
     2985                                lEscapeClose = lKeyValue[1]; 
     2986                                break; 
     2987                            case "comment": 
     2988                                lCommentLead = lKeyValue[1]; 
     2989                                break; 
     2990                            default: 
     2991                                if (pVerbose) 
     2992                                    writefln("Bad Macro 'delim' option '%s'", 
     2993                                            lOption); 
     2994                                // Ignore bad options. 
     2995                                break; 
     2996                        } 
     2997                    } 
     2998                } 
     2999            } 
     3000            else if (vVerbose) 
     3001            { 
     3002                writefln("Bad configuration command '%s'", lArg); 
     3003            } 
     3004        } 
     3005    } 
     3006} 
     3007 
    26203008void ProcessBuildConfig(char[] pArg, bool pVerbose) 
    26213009{ 
     
    26433031    lConfigFileName ~= "build.cfg"; 
    26443032 
    2645     if (pVerbose
     3033    if (pVerbose  && util.fileex.FileExists(lConfigFileName)
    26463034        writefln("Build Configuration file %s [%s]", lConfigFileName, pArg); 
    26473035 
     
    26923080                } 
    26933081 
    2694                 if (lArg.begins("CMDLINE=")
     3082                if (lArg.begins("CMDLINE=") > 0
    26953083                { 
    26963084                    int lStartPos; 
     
    27253113 
    27263114                } 
    2727                 else if (lArg.begins("LIBCMD=")
     3115                else if (lArg.begins("LIBCMD=") > 0
    27283116                { 
    27293117                    int lPos; 
     
    31163504__                       (Only needed if DllMain is not found in the source files. 
    31173505__     /b"-LIBOPT~<opt~>" Allows you to pass ~<opt~> to the librarian 
     3506__     /b"-LIBPATH=~<pathlist~>" Used to add a semi-colon delimited list 
     3507__                 of search paths for library files. 
    31183508__     /b"-X~<module~>" Packages and Modules to ignore (eg. -Xmylib) 
    31193509__     /b"-M~<module~>" Packages and Modules to notice (eg. -Mphobos) 
     
    31333523__     /b"-?   "      Same as /-help, displays the full 'usage' help text. 
    31343524__     /b"-silent"    Avoids unnecessary messages being displayed. 
     3525__     /b"-noautoimport" Turns off the automatic addition of source paths 
     3526__                    to the list of Import Roots. 
    31353527__     /b"-od~<path~>"  Nominate the directory where temporary (work) files 
    31363528__                    are to be created. By default they are created in 
     
    32303622__ location for these files. The directory is created if it doesn't exist. 
    32313623__ 
    3232 __ For the DigitalMars compiler, this also specifies the top-level  
     3624__ For the DigitalMars compiler, this also specifies the top-level 
    32333625__ location where object files are created. By default, object files 
    32343626__ are created in the same directory as the corresponding source file. 
     
    33113703 
    33123704__ /topic switches 
     3705__ /switch -LIBPATH 
     3706__ /desc Used to add a list of search paths for library files. 
     3707__This might be used when you don't want to permanently update the 
     3708__ standard search paths. 
     3709__ Example: 
     3710__ /code 
     3711__     -LIBPATH=c:\mylibs;d:\3rdparty;c:\lib\debuglibs 
     3712__ /endcode 
     3713 
     3714__ /topic switches 
    33133715__ /switch -R 
    33143716__ /desc Determines if the compiler tools use a response file or not. 
     
    34073809__ Some messages are just informational and under some circumstances they 
    34083810__ can interfer with reading the output. 
     3811 
     3812__ /topic switches 
     3813__ /switch -noautoimport 
     3814__ /desc Prevents source file paths from being added to the list of Import Roots 
     3815__ By default, for each source file that imports a module, it's path is added 
     3816__ to the list of paths that will be searched for module source files. If you 
     3817__ do not wish that behaviour, you will need to use this switch. In that case, 
     3818__ the compiler will only search the paths specified in the compiler's 
     3819__ configuration file, the current directory, and any explicitly added paths 
     3820__ on the command line. 
     3821__ 
     3822__ Example: 
     3823__ /code 
     3824__      build myApp -noautoimport 
     3825__ /endcode 
    34093826 
    34103827__ /topic switches 
     
    35073924__      ~<COMMAND~>=~<VALUE~> 
    35083925__ /endcode 
    3509 __  
     3926__ 
    35103927__ /b"Supported Commands" /n 
    35113928__ The commands currently supported are ... /n 
     
    35143931__ option. You can also specify multiple switches on the same option line./n 
    35153932__ /code 
    3516 __     CMDLINE=-inline -w  
     3933__     CMDLINE=-inline -w 
    35173934__ /endcode 
    35183935__ 
     
    35263943__ /b"Environment Symbol Substitution" /n 
    35273944__ Before each configuration file option line is processed, it is first checked 
    3528 __ for any references to Environment symbols. Each reference is replaced by  
     3945__ for any references to Environment symbols. Each reference is replaced by 
    35293946__ the value of that symbol. References take the form /b"%~<SYMNAME~>%" /n 
    35303947__ There are two special symbols: /b"@D" is replaced by the compiler's 
     
    35393956__ 
    35403957__ /b"Groups" /n 
    3541 __ It is possible to specify groups of configuration options that are only  
    3542 __ applied if explictly nominated on the command line. A group starts with  
     3958__ It is possible to specify groups of configuration options that are only 
     3959__ applied if explictly nominated on the command line. A group starts with 
    35433960__ a line in the format /b"[~<groupname~>]" where /i groupname can be any 
    35443961__ text that doesn't include spaces. A group ends on the last line before the 
    3545 __ next group in the file.  
     3962__ next group in the file. 
    35463963__ 
    35473964__ Example of a Group 
     
    35623979__ a /"response file". The group name is prepended with a plus sign on 
    35633980__ the command line. To apply the 'debug' group in the above example, you 
    3564 __ place on the command line /b"+dbg"  
     3981__ place on the command line /b"+dbg" 
    35653982__ 
    35663983__ /b"Comments" /n 
     
    35994016__ listed here as a reminder. 
    36004017__ 
    3601 __ /li Support the syntax "version(n)" 
    3602 __ /li Be able to build a directory. 
    3603 __ <ul> 
    3604 __ /li If no source file is supplied on the command line, 
    3605 __  build will scan the current folder looking for a source file 
    3606 __  that contains 'main'. 
    3607 __ /li If a directory name is supplied on the command line, 
    3608 __  build will scan it looking for a source file that contains 'main'. 
    3609 __ </ul> 
    3610 __ /li Be able to supply multiple 'main' source files on command line. 
    36114018__ /li Be able to update a library rather than just create libraries. 
    36124019__ /li Support the concept of a 'Plugin' block of code. /n 
  • trunk/Source/build_bn.d

    r36 r37  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 912
     4long auto_build_number = 1137
  • trunk/Source/source.d

    r33 r37  
    5151    import util.fileex; 
    5252    import util.bmscanner; 
     53    import util.macro; 
    5354 
    5455    import std.stdio; 
     
    7172        } 
    7273 
     74        // Using these as the literals confuse my text editor's 
     75        // 'bracket matching' algorithm. 
     76        static char[] kOpenBrace = "\x7B"; 
     77        static char[] kCloseBrace = "\x7D"; 
     78        static char[] kOpenParen = "\x28"; 
     79        static char[] kCloseParen = "\x29"; 
     80 
    7381    } 
    7482 
     
    7785    bool mainGUI; 
    7886    bool mainDLL; 
     87    bool[char[]] vActiveVersions; 
     88    long         vVersionLevel = 0; 
     89    bool[char[]] vActiveDebugs; 
     90    long         vDebugLevel = 0; 
    7991 
    8092    alias util.bmscanner.BMScan!(char).BMScan bmfind; 
     
    8597    char[] function(char[] pPath) AddRoot; 
    8698    char[][] function () GetImportRoots; 
     99    bool function() AutoImports; 
    87100    void function(char[] pPath) AddTarget; 
    88101    void function(char[] pPath) AddLink; 
    89     void function(char[] pPath) AddLib; 
    90102    void function(char[] pPath, char[][] pOpts) AddExternal; 
    91103    void function(char[] pText, bool pReplace=false) AddBuildDef; 
    92104    char[][] function( ) ModulesToIgnore; 
    93     void function(char[] pID) ActivateVersion; 
    94     bool function(char[] pID) IsActiveVersion; 
    95105    char[] function(char[] pFile) GetFullPathname; 
    96106    char[] function() GetObjWritePath; 
     107    Substitute[] function() GetMacros; 
    97108 
    98109    bool mVerboseMode = false; 
     110    bool mMacroInput = false; 
    99111 
    100112} 
     
    129141    bool mHasBeenSearched; 
    130142    bool mNoLink; 
     143    bool mIgnore; 
    131144    int mBuildNumber; 
    132145    char[][] mReferencedImports; 
     146    bool[char[]] mActiveVersions; 
     147    long         mVersionLevel = 0; 
     148    bool[char[]] mActiveDebugs; 
     149    long         mDebugLevel = 0; 
    133150    } 
    134151 
     
    157174    bool NoLink() { return mNoLink; } 
    158175 
     176    // Ignore 
     177    bool Ignore() { return mIgnore; } 
     178 
    159179    // BuildNumber 
    160180    int BuildNumber() { return mBuildNumber; } 
     
    169189        mHasBeenSearched = false; 
    170190        mNoLink = false; 
     191        mIgnore = false; 
    171192        mFileName = pFileName; 
    172193        mModuleName = FileToModulename(pFileName); 
     
    207228        SourceIndex[pFileName] = this; 
    208229 
    209         // Add this pFileName's directory as a potential import root. 
    210         if (AddRoot != null) 
    211             AddRoot(std.path.getDirName(pFileName)); 
    212  
    213230        search(); 
    214231    } 
     
    219236        bool lCanUse; 
    220237        int lTextPos = 0; 
     238        char[] lFileText; 
    221239 
    222240        if(mHasBeenSearched) { 
     
    227245          writefln("Scanning %s", util.pathex.AbbreviateFileName(mFileName)); 
    228246        } 
     247 
     248        // Grab the original text. 
     249        lFileText = GetText(mFileName); 
     250 
     251        // Check if any macro processing is required. 
     252        if (mMacroInput && (std.path.getExt(mFileName) != "d")) 
     253        { 
     254            if (util.macro.RunMacro(lFileText, GetMacros())) 
     255            { 
     256                char[] lNewFile; 
     257                lNewFile = std.path.addExt(mFileName, "d"); 
     258                std.file.write(lNewFile, lFileText); 
     259                mHasBeenSearched = true; 
     260                mIgnore = true; 
     261                if(mVerboseMode) { 
     262                  writefln("Macro output %s", lNewFile); 
     263                } 
     264                new Source(lNewFile); 
     265                return; 
     266            } 
     267        } 
     268 
    229269        // Extract all the module references. 
    230         ProcessTokens(GetText(mFileName), lTextPos); 
     270        ProcessTokens(lFileText, lTextPos); 
    231271 
    232272        lCurFileTime = new FileDateTime(); 
    233273        // Examine each extracted module file. 
     274        if ( (mReferencedImports.length > 0) && (AutoImports() == true)) 
     275        { 
     276 
     277            AddRoot( std.path.getDirName(util.pathex.CanonicalPath(mFileName, false)) ); 
     278        } 
    234279        foreach(char[] lNextFile; mReferencedImports) { 
    235280            if(lNextFile in SourceIndex) { 
     
    357402        char[] lFileName; 
    358403        Source lBNSource; 
     404        char[] lBaseDir; 
    359405 
    360406        if (mBuildNumber < 0) 
     
    362408        else { 
    363409        lFileName = ModuleToFilename(mModuleName ~ "_bn"); 
    364         lFileName = GetFullPathname(lFileName); 
    365  
     410        lBaseDir = std.path.getDirName(mFileName); 
     411        if (lBaseDir.length > 0 && std.path.getDirName(lFileName).length == 0) 
     412            lFileName = std.path.getDirName(mFileName) ~ 
     413                        std.path.sep ~ lFileName; 
     414 
     415        lFileName = util.pathex.AbbreviateFileName ( 
     416                        util.pathex.CanonicalPath(lFileName, false)); 
    366417        if (std.file.exists(lFileName)) 
    367418        { 
     
    400451    //---------------------------------------------------------- 
    401452  private { 
    402     void ProcessTokens (char[] pFileText, inout int pPos, char[] pEndStmt = "}") 
     453 
     454    // ------------------------------------------- 
     455    void ActivateVersion(char[] pID) 
     456    // ------------------------------------------- 
     457    { 
     458        if (pID.length > 0) 
     459        { 
     460            if (std.ctype.isdigit (pID[0])) 
     461                mVersionLevel = atoi(pID); 
     462            else 
     463                mActiveVersions [ pID ] = true; 
     464        } 
     465    } 
     466 
     467    // ------------------------------------------- 
     468    bool IsActiveVersion(char[] pID) 
     469    // ------------------------------------------- 
     470    { 
     471        if (pID.length == 0) 
     472            return false; 
     473 
     474        if (std.ctype.isdigit(pID[0])) 
     475        { 
     476            long lLevel = atoi(pID); 
     477            if (vVersionLevel > mVersionLevel) 
     478                return lLevel <= vVersionLevel ? true : false ; 
     479            else 
     480                return lLevel <= mVersionLevel ? true : false ; 
     481        } 
     482        else 
     483        return (pID in vActiveVersions) !== null ? true : 
     484                 (pID in mActiveVersions) !== null ? true : false ; 
     485    } 
     486 
     487    // ------------------------------------------- 
     488    void ActivateDebug(char[] pID) 
     489    // ------------------------------------------- 
     490    { 
     491        static const char[] lDefaultLevel = "1"; 
     492        if (pID.length == 0) 
     493            pID = lDefaultLevel; 
     494 
     495        if (std.ctype.isdigit(pID[0])) 
     496            mDebugLevel = atoi(pID); 
     497        else 
     498            mActiveDebugs [ pID ] = true; 
     499 
     500    } 
     501 
     502    // ------------------------------------------- 
     503    bool IsActiveDebug(char[] pID) 
     504    // ------------------------------------------- 
     505    { 
     506 
     507        if (pID.length == 0) 
     508            pID = "1"; 
     509 
     510        if (std.ctype.isdigit(pID[0])) 
     511        { 
     512            long lLevel = atoi(pID); 
     513            if (vDebugLevel > mDebugLevel) 
     514                return lLevel <= vDebugLevel ? true : false ; 
     515            else 
     516                return lLevel <= mDebugLevel ? true : false ; 
     517        } 
     518        else 
     519            return (pID in vActiveDebugs) !== null ? true : 
     520                     (pID in mActiveDebugs) !== null ? true : false ; 
     521    } 
     522 
     523    // ------------------------------------------- 
     524    void ProcessTokens (char[] pFileText, inout int pPos, char[] pEndStmt = kCloseBrace) 
     525    // ------------------------------------------- 
    403526    { 
    404527        /* This scans the source text for specific tokens until the 'pEndStmt' 
     
    416539 
    417540            switch(lCurToken) { 
    418                 case "{"
     541                case kOpenBrace
    419542                    ProcessTokens (pFileText, pPos); 
    420543                    break; 
     
    468591                    break; 
    469592 
     593                case "debug": 
     594                    doDebug(pFileText, pPos); 
     595                    break; 
     596 
    470597                case "import": 
    471598                    doImport(pFileText, pPos); 
     
    499626        lSavedPos = pPos; 
    500627        lToken = GetNextToken(pFileText,pPos); 
    501         if (lToken == "(") { 
     628        if (lToken == kOpenParen) { 
    502629            mainFound = true; 
    503630            version(Windows) { 
     
    523650 
    524651        lCurrentToken = GetNextToken (pFileText, pPos); 
    525         if (lCurrentToken == "=") { 
     652        if (lCurrentToken == "=") 
     653        { 
    526654            // Activate the following identifer version. 
    527             ActivateVersion( GetNextToken (pFileText, pPos) ); 
     655            this.ActivateVersion( GetNextToken (pFileText, pPos) ); 
    528656            GetNextToken(pFileText, pPos); // Throw away the trailing ';' 
    529657            return; 
    530658        } 
    531         else { 
    532         if (lCurrentToken != "("){ 
     659 
     660        if (lCurrentToken != kOpenParen) 
     661        { 
    533662            return; // Not likely as this is bad syntax. 
    534663        } 
    535         else { 
     664 
    536665        // **** Assume that correct syntax has been used. **** 
    537666        // Pick out the version identifier and skip over the closing parenthesis. 
     
    539668        lCurrentToken = GetNextToken (pFileText, pPos); 
    540669 
    541         if ( IsActiveVersion(lVersionId) ) { 
     670        if ( IsActiveVersion(lVersionId) ) 
     671        { 
    542672            // thus the following tokens must be processed. 
    543673            lSavedPos = pPos; // Remember where we are. 
    544674            lCurrentToken = GetNextToken (pFileText, pPos); 
    545             if (lCurrentToken == "{"
     675            if (lCurrentToken == kOpenBrace
    546676            { 
    547677                // process the stuff in the block 
    548678                ProcessTokens (pFileText, pPos); 
    549  
    550             } else { 
     679            } 
     680            else 
     681            { 
    551682                // Not a block so we just process the next statement only. 
    552683                pPos = lSavedPos;  // Back up one token. 
     
    561692            lSavedPos = pPos; 
    562693            lCurrentToken = GetNextToken(pFileText, pPos); 
    563             if (lCurrentToken == "else") { 
     694            if (lCurrentToken == "else") 
     695            { 
    564696                lCurrentToken = GetNextToken(pFileText, pPos); 
    565                 if (lCurrentToken == "{") { 
     697                if (lCurrentToken == kOpenBrace) 
     698                { 
    566699                    // Skip over a block 
    567700                    skipContent(pFileText, pPos); 
    568                 } else { 
     701                } 
     702                else 
     703                { 
    569704                    // skip over a statement. 
    570705                    skipContent(pFileText, pPos, ";"); 
    571706                } 
    572             } else { 
     707            } 
     708            else 
     709            { 
    573710                // It wasn't an 'else' so be back up and let the calling 
    574711                // routine handle it. 
     
    577714            return; 
    578715        } 
    579         else { 
     716 
    580717        /* Not an active version so therefore the following statement/block 
    581718           must not be processed. 
     
    583720        lCurrentToken = GetNextToken(pFileText, pPos); 
    584721 
    585         if ( lCurrentToken != "{") { 
     722        if ( lCurrentToken != kOpenBrace) 
     723        { 
    586724            skipContent(pFileText, pPos, ";"); 
    587725            return; 
    588726        } 
    589         else { 
     727 
    590728        skipContent(pFileText, pPos); 
    591729 
    592730        lSavedPos = pPos; 
    593731        lCurrentToken = GetNextToken(pFileText, pPos); 
    594         if (lCurrentToken != "else") { 
     732        if (lCurrentToken != "else") 
     733        { 
    595734            pPos = lSavedPos; 
    596735            return; 
    597736        } 
    598         else { 
     737 
    599738        lSavedPos = pPos; 
    600739        lCurrentToken = GetNextToken(pFileText, pPos); 
    601         if (lCurrentToken == "{") { 
     740        if (lCurrentToken == kOpenBrace) 
     741        { 
    602742            ProcessTokens(pFileText, pPos); 
    603         } else { 
     743        } 
     744        else 
     745        { 
    604746            pPos = lSavedPos; 
    605747            ProcessTokens(pFileText, pPos, ";"); 
    606748        } 
    607         } 
    608     } 
    609     } 
    610     } 
    611  
    612     } 
    613     } 
     749 
     750    } 
     751 
     752    //---------------------------------------------------------- 
     753    void doDebug(in char[] pFileText, inout int pPos) 
     754    { 
     755        char[] lCurrentToken; 
     756        char[] lDebugId; 
     757        int lSavedPos; 
     758 
     759        lSavedPos = pPos; 
     760        lCurrentToken = GetNextToken (pFileText, pPos); 
     761        if (lCurrentToken == "=") 
     762        { 
     763            // Activate the following debug identifer. 
     764            this.ActivateDebug( GetNextToken (pFileText, pPos) ); 
     765            GetNextToken(pFileText, pPos); // Throw away the trailing ';' 
     766            return; 
     767        } 
     768 
     769        if (lCurrentToken != kOpenParen) 
     770        { 
     771            lDebugId = "1"; 
     772            // Back track to the token after the 'debug' 
     773            pPos = lSavedPos; 
     774        } 
     775        else 
     776        { 
     777            // Pick out the debug identifier and skip over the closing parenthesis. 
     778            lDebugId = GetNextToken (pFileText, pPos); 
     779            lCurrentToken = GetNextToken (pFileText, pPos); 
     780        } 
     781 
     782        if ( IsActiveDebug(lDebugId) ) 
     783        { 
     784            // thus the following tokens must be processed. 
     785            lSavedPos = pPos; // Remember where we are. 
     786            lCurrentToken = GetNextToken (pFileText, pPos); 
     787            if (lCurrentToken == kOpenBrace) 
     788            { 
     789                // process the stuff in the block 
     790                ProcessTokens (pFileText, pPos); 
     791            } 
     792            else 
     793            { 
     794                // Not a block so we just process the next statement only. 
     795                pPos = lSavedPos;  // Back up one token. 
     796                ProcessTokens (pFileText, pPos, ";"); 
     797            } 
     798 
     799            /* If the next token is an 'else', I must skip over the statement 
     800               or block that follows the 'else'. Otherwise this marks the 
     801               end of the debug statement. 
     802            */ 
     803            // Remember where we are. 
     804            lSavedPos = pPos; 
     805            lCurrentToken = GetNextToken(pFileText, pPos); 
     806            if (lCurrentToken == "else") 
     807            { 
     808                lCurrentToken = GetNextToken(pFileText, pPos); 
     809                if (lCurrentToken == kOpenBrace) 
     810                { 
     811                    // Skip over a block 
     812                    skipContent(pFileText, pPos); 
     813                } 
     814                else 
     815                { 
     816                    // skip over a statement. 
     817                    skipContent(pFileText, pPos, ";"); 
     818                } 
     819            } 
     820            else 
     821            { 
     822                // It wasn't an 'else' so be back up and let the calling 
     823                // routine handle it. 
     824                pPos = lSavedPos; 
     825            } 
     826            return; 
     827        } 
     828 
     829        /* Not an active version so therefore the following statement/block 
     830           must not be processed. 
     831        */ 
     832        lCurrentToken = GetNextToken(pFileText, pPos); 
     833 
     834        if ( lCurrentToken != kOpenBrace) 
     835        { 
     836            skipContent(pFileText, pPos, ";"); 
     837            return; 
     838        } 
     839 
     840        skipContent(pFileText, pPos); 
     841 
     842        lSavedPos = pPos; 
     843        lCurrentToken = GetNextToken(pFileText, pPos); 
     844        if (lCurrentToken != "else") 
     845        { 
     846            pPos = lSavedPos; 
     847            return; 
     848        } 
     849 
     850        lSavedPos = pPos; 
     851        lCurrentToken = GetNextToken(pFileText, pPos); 
     852        if (lCurrentToken == kOpenBrace) 
     853        { 
     854            ProcessTokens(pFileText, pPos); 
     855        } 
     856        else 
     857        { 
     858            pPos = lSavedPos; 
     859            ProcessTokens(pFileText, pPos, ";"); 
     860        } 
     861 
     862    } 
     863 
    614864    //---------------------------------------------------------- 
    615865    void doImport (in char[] pFileText, inout int pPos) 
     
    679929 
    680930        lPragmaId.length = 0; 
    681         if (GetNextToken(pFileText, pPos) == "("
     931        if (GetNextToken(pFileText, pPos) == kOpenParen
    682932        { 
    683933            lCurrentToken = GetNextToken(pFileText,pPos); 
     
    693943                        } 
    694944 
    695                         if ((lCurrentToken != ",") && (lCurrentToken != ")")) 
     945                        if ((lCurrentToken != ",") && (lCurrentToken != kCloseParen)) 
    696946                        { 
    697947                            lPragmaId ~= lCurrentToken; 
     
    706956                        if (lPragmaId[i] == '.') 
    707957                        { 
     958                            // Check to see if this is a 'versioned' 
     959                            // library file name, eg.  "glade-2.0" 
     960                            if (i == lPragmaId.length - 1) 
     961                                lPragmaId ~= LibExt; 
     962                            else if (std.ctype.isdigit(lPragmaId[i+1])) 
     963                                lPragmaId ~= "." ~ LibExt; 
    708964                            break; 
    709965                        } 
     
    711967                        { 
    712968                            // Not a dot to be seen ;-) 
    713                             lPragmaId ~= "." ~ LibExt; 
     969                            lPragmaId ~= "." ~ LibExt;                             
    714970                        } 
    715971                    } 
    716                     // Add the library path to the linker switches. 
    717                     if (AddLib != null) 
    718                         AddLib(lPragmaId); 
    719972                    // Add link path to compiler switches. 
    720973                    if (AddLink != null) 
    721974                        AddLink(lPragmaId); 
    722                     if (lCurrentToken == ")"
     975                    if (lCurrentToken == kCloseParen
    723976                    { 
    724977                        break; 
     
    734987                    } 
    735988 
    736                     if ((lCurrentToken != ",") && (lCurrentToken != ")")) { 
     989                    if ((lCurrentToken != ",") && (lCurrentToken != kCloseParen)) { 
    737990                        if (AddBuildDef != null) 
    738991                            AddBuildDef(lCurrentToken); 
    739992                    } 
    740                     if (lCurrentToken == ")"){ 
     993                    if (lCurrentToken == kCloseParen){ 
    741994                        break;} 
    742995                } 
     
    7481001                // Skip over the trailing parenthesis. 
    7491002                GetNextToken(pFileText,pPos); 
     1003 
    7501004            } else if (lCurrentToken == "target"){ 
    7511005                if ( (lCurrentToken = GetNextToken(pFileText,pPos)) == ",") 
     
    7591013                } 
    7601014 
    761                 while(lCurrentToken != ")"
     1015                while(lCurrentToken != kCloseParen
    7621016                {   // Skip everything until we find a closing paren. 
    7631017                    lCurrentToken = GetNextToken(pFileText,pPos); 
     
    7881042                } 
    7891043 
    790                 while(lCurrentToken != ")"
     1044                while(lCurrentToken != kCloseParen
    7911045                {   // Skip everything until we find a closing paren. 
    7921046                    lCurrentToken = GetNextToken(pFileText,pPos); 
     
    8041058                } 
    8051059 
    806                 while(lCurrentToken != ")"
     1060                while(lCurrentToken != kCloseParen
    8071061                {   // Skip everything until we find a closing paren. 
    8081062                    lCurrentToken = GetNextToken(pFileText,pPos); 
     
    8241078        lCurrentToken = GetNextToken(pFileText,pPos); 
    8251079 
    826         if (lCurrentToken == "{") // read a block statement 
     1080        if (lCurrentToken == kOpenBrace) // read a block statement 
    8271081        { 
    8281082            ProcessTokens (pFileText, pPos); 
     
    8401094                if (lCurrentToken == mModuleName ~ "_bn") 
    8411095                { 
    842                     mBuildNumber = LoadBuildNumber(mModuleName); 
     1096                    mBuildNumber = LoadBuildNumber(mModuleName, mFileName); 
    8431097                } 
    8441098 
     
    9391193 
    9401194    //---------------------------------------------------------- 
    941     void skipContent (in  char[] pFileText, inout int pPos, char[] pEndStmt = "}"
     1195    void skipContent (in  char[] pFileText, inout int pPos, char[] pEndStmt = kCloseBrace
    9421196    { 
    9431197        // Skips thru nested blocks. 
     
    9541208                return; 
    9551209            } 
    956             else if (lCurrentToken == "{"
     1210            else if (lCurrentToken == kOpenBrace
    9571211                skipContent (pFileText, pPos); 
    9581212 
     
    10361290 
    10371291 
    1038 int LoadBuildNumber(char[] pModuleName
     1292int LoadBuildNumber(char[] pModuleName, char[] pFileName
    10391293{ 
    10401294    char[][] lFileLines; 
    10411295    char[] lFileName; 
    10421296    int lBuildNumber = 0; 
     1297    char[] lBaseDir; 
    10431298 
    10441299    lFileName = ModuleToFilename(pModuleName ~ "_bn"); 
     1300    lBaseDir = std.path.getDirName(pFileName); 
     1301    if (lBaseDir.length > 0 && std.path.getDirName(lFileName).length == 0) 
     1302        lFileName = std.path.getDirName(pFileName) ~ std.path.sep ~ lFileName; 
     1303 
     1304    lFileName = util.pathex.AbbreviateFileName ( 
     1305                    util.pathex.CanonicalPath(lFileName, false)); 
    10451306    if (std.file.exists(lFileName)) 
    10461307    { 
     
    10751336} 
    10761337 
     1338// ------------------------------------------- 
     1339void ActivateVersion(char[] pID) 
     1340// ------------------------------------------- 
     1341{ 
     1342    if (pID.length > 0) 
     1343    { 
     1344        if (std.ctype.isdigit (pID[0])) 
     1345        // Note that even though we capture this here, 
     1346        // levels are not yet implemented in the 
     1347        // source scanner. 
     1348            vVersionLevel = atoi(pID); 
     1349        else 
     1350            vActiveVersions [ pID ] = true; 
     1351    } 
     1352} 
     1353 
     1354// ------------------------------------------- 
     1355void ActivateDebug(char[] pID) 
     1356// ------------------------------------------- 
     1357{ 
     1358    static const char[] lDefaultLevel = "1"; 
     1359    if (pID.length == 0) 
     1360        pID = lDefaultLevel; 
     1361 
     1362    if (std.ctype.isdigit(pID[0])) 
     1363    // Note that even though we capture this here, 
     1364    // levels are not yet implemented in the 
     1365    // source scanner. 
     1366        vDebugLevel = atoi(pID); 
     1367    else 
     1368        vActiveDebugs [ pID ] = true; 
     1369 
     1370} 
     1371 
     1372// ------------------------------------------- 
     1373void SetKnownVersions() 
     1374// ------------------------------------------- 
     1375{ 
     1376 
     1377    version(DigitalMars)  ActivateVersion("DigitalMars"); 
     1378    version(X86)          ActivateVersion("X86"); 
     1379    version(PPC)          ActivateVersion("PPC"); 
     1380    version(AMD64)        ActivateVersion("AMD64"); 
     1381    version(PPC64)        ActivateVersion("PPC64"); 
     1382    version(Windows)      ActivateVersion("Windows"); 
     1383    version(Win32)        ActivateVersion("Win32"); 
     1384    version(Win64)        ActivateVersion("Win64"); 
     1385    version(linux)        ActivateVersion("linux"); 
     1386    version(darwin)       ActivateVersion("darwin"); 
     1387    version(Unix)         ActivateVersion("Unix"); 
     1388    version(unix)         ActivateVersion("unix"); 
     1389    version(Posix)        ActivateVersion("Posix"); 
     1390    version(LittleEndian) ActivateVersion("LittleEndian"); 
     1391    version(BigEndian)    ActivateVersion("BigEndian"); 
     1392    version(D_InlineAsm)  ActivateVersion("D_InlineAsm"); 
     1393 
     1394    if (mVerboseMode) 
     1395        foreach(char[] k; vActiveVersions.keys){ 
     1396            writefln("Active Version: '%s'", k); 
     1397        } 
     1398} 
  • trunk/Source/source_bn.d

    r36 r37  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 702
     4long auto_build_number = 989
  • trunk/Source/util/bmscanner_bn.d

    r35 r37  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 319
     4long auto_build_number = 637
  • trunk/Source/util/fdt.d

    r34 r37  
    278278 
    279279        lFH = FindFirstFileA (lASCII_FileName.ptr, &lFileInfoA); 
    280         if(lFH != INVALID_HANDLE_VALUE) { 
     280        if(lFH != INVALID_HANDLE_VALUE) {             
    281281            lWriteTime = lFileInfoA.ftLastWriteTime; 
    282282        } 
     283 
    283284    } 
    284285 
  • trunk/Source/util/fdt_bn.d

    r35 r37  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 468
     4long auto_build_number = 755
  • trunk/Source/util/fileex_bn.d

    r35 r37  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 411
     4long auto_build_number = 698
  • trunk/Source/util/linetoken_bn.d

    r35 r37  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 335
     4long auto_build_number = 622
  • trunk/Source/util/pathex_bn.d

    r35 r37  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4