/ Check-in [de784399]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Tooling support for including the debug build in the VSIX package.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:de784399ed1f0e27fc875e32719643d19819c8fb
User & Date: mistachkin 2012-10-12 18:06:07
Context
2012-10-13
09:31
Allow the showdb tool to be compiled with MSVC. check-in: dce391fc user: mistachkin tags: trunk
2012-10-12
18:06
Tooling support for including the debug build in the VSIX package. check-in: de784399 user: mistachkin tags: trunk
2012-10-10
13:59
Fix duplicate test name in whereD.test. check-in: 1182b54a user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.msc.

     5      5   # The toplevel directory of the source tree.  This is the directory
     6      6   # that contains this "Makefile.msc".
     7      7   #
     8      8   TOP = .
     9      9   
    10     10   # Set this non-0 to create and use the SQLite amalgamation file.
    11     11   #
           12  +!IFNDEF USE_AMALGAMATION
    12     13   USE_AMALGAMATION = 1
           14  +!ENDIF
    13     15   
    14     16   # Set this non-0 to use the International Components for Unicode (ICU).
    15     17   #
           18  +!IFNDEF USE_ICU
    16     19   USE_ICU = 0
           20  +!ENDIF
    17     21   
    18     22   # Set this non-0 to dynamically link to the MSVC runtime library.
    19     23   #
           24  +!IFNDEF USE_CRT_DLL
    20     25   USE_CRT_DLL = 0
           26  +!ENDIF
    21     27   
    22     28   # Set this non-0 to attempt setting the native compiler automatically
    23     29   # for cross-compiling the command line tools needed during the compilation
    24     30   # process.
    25     31   #
           32  +!IFNDEF XCOMPILE
    26     33   XCOMPILE = 0
           34  +!ENDIF
    27     35   
    28     36   # Set this non-0 to use the native libraries paths for cross-compiling
    29     37   # the command line tools needed during the compilation process.
    30     38   #
           39  +!IFNDEF USE_NATIVE_LIBPATHS
    31     40   USE_NATIVE_LIBPATHS = 0
           41  +!ENDIF
    32     42   
    33     43   # Set this 0 to skip the compiling and embedding of version resources.
    34     44   #
           45  +!IFNDEF USE_RC
    35     46   USE_RC = 1
           47  +!ENDIF
    36     48   
    37     49   # Set this non-0 to compile binaries suitable for the WinRT environment.
    38     50   # This setting does not apply to any binaries that require Tcl to operate
    39     51   # properly (i.e. the text fixture, etc).
    40     52   #
           53  +!IFNDEF FOR_WINRT
    41     54   FOR_WINRT = 0
           55  +!ENDIF
    42     56   
    43     57   # Set this non-0 to skip attempting to look for and/or link with the Tcl
    44     58   # runtime library.
    45     59   #
           60  +!IFNDEF NO_TCL
    46     61   NO_TCL = 0
           62  +!ENDIF
    47     63   
    48     64   # Set this to non-0 to create and use PDBs.
    49     65   #
           66  +!IFNDEF SYMBOLS
    50     67   SYMBOLS = 1
           68  +!ENDIF
    51     69   
    52     70   # Set this to non-0 to use the SQLite debugging heap subsystem.
    53     71   #
           72  +!IFNDEF MEMDEBUG
    54     73   MEMDEBUG = 0
           74  +!ENDIF
    55     75   
    56     76   # Set this to non-0 to use the Win32 native heap subsystem.
    57     77   #
           78  +!IFNDEF WIN32HEAP
    58     79   WIN32HEAP = 0
           80  +!ENDIF
    59     81   
    60     82   # Set this to one of the following values to enable various debugging
    61     83   # features.  Each level includes the debugging options from the previous
    62     84   # levels.  Currently, the recognized values for DEBUG are:
    63     85   #
    64     86   # 0 == NDEBUG: Disables assert() and other runtime diagnostics.
    65     87   # 1 == Disables NDEBUG and all optimizations and then enables PDBs.
    66     88   # 2 == SQLITE_DEBUG: Enables various diagnostics messages and code.
    67     89   # 3 == SQLITE_WIN32_MALLOC_VALIDATE: Validate the Win32 native heap per call.
    68     90   # 4 == SQLITE_DEBUG_OS_TRACE: Enables output from the OSTRACE() macros.
    69     91   # 5 == SQLITE_ENABLE_IOTRACE: Enables output from the IOTRACE() macros.
    70     92   #
           93  +!IFNDEF DEBUG
    71     94   DEBUG = 0
           95  +!ENDIF
    72     96   
    73     97   # Check for the predefined command macro CC.  This should point to the compiler
    74     98   # binary for the target platform.  If it is not defined, simply define it to
    75     99   # the legacy default value 'cl.exe'.
    76    100   #
    77    101   !IFNDEF CC
    78    102   CC = cl.exe

Changes to tool/build-all-msvc.bat.

     6      6   :: Multi-Platform Build Tool for MSVC
     7      7   ::
     8      8   
     9      9   SETLOCAL
    10     10   
    11     11   REM SET __ECHO=ECHO
    12     12   REM SET __ECHO2=ECHO
           13  +REM SET __ECHO3=ECHO
    13     14   IF NOT DEFINED _AECHO (SET _AECHO=REM)
    14     15   IF NOT DEFINED _CECHO (SET _CECHO=REM)
    15     16   IF NOT DEFINED _VECHO (SET _VECHO=REM)
    16     17   
    17     18   %_AECHO% Running %0 %*
    18     19   
    19     20   REM SET DFLAGS=/L
................................................................................
   177    178       CALL :fn_UnsetVariable WindowsSdkDir_old
   178    179   
   179    180       REM
   180    181       REM NOTE: Reset the PATH here to the absolute bare minimum required.
   181    182       REM
   182    183       SET PATH=%TOOLPATH%;%SystemRoot%\System32;%SystemRoot%
   183    184   
   184         -    REM
   185         -    REM NOTE: Launch a nested command shell to perform the following steps:
   186         -    REM
   187         -    REM       1. Setup the MSVC environment for this platform using the
   188         -    REM          official batch file.
   189         -    REM
   190         -    REM       2. Make sure that no stale build output files are present.
   191         -    REM
   192         -    REM       3. Build the "sqlite3.dll" and "sqlite3.lib" binaries for this
   193         -    REM          platform.
   194         -    REM
   195         -    REM       4. Copy the "sqlite3.dll" and "sqlite3.lib" binaries for this
   196         -    REM          platform to the platform-specific directory beneath the
   197         -    REM          binary directory.
   198         -    REM
   199         -    "%ComSpec%" /C (
          185  +    FOR %%B IN (Debug Retail) DO (
          186  +      REM
          187  +      REM NOTE: When preparing the debug build, set the DEBUG and MEMDEBUG
          188  +      REM       environment variables to be picked up by the MSVC makefile
          189  +      REM       itself.
   200    190         REM
   201         -      REM NOTE: Attempt to setup the MSVC environment for this platform.
   202         -      REM
   203         -      %__ECHO% CALL "%VCINSTALLDIR%\vcvarsall.bat" %%P
   204         -
   205         -      IF ERRORLEVEL 1 (
   206         -        ECHO Failed to call "%VCINSTALLDIR%\vcvarsall.bat" for platform %%P.
   207         -        GOTO errors
          191  +      IF /I "%%B" == "Debug" (
          192  +        SET DEBUG=2
          193  +        SET MEMDEBUG=1
          194  +      ) ELSE (
          195  +        CALL :fn_UnsetVariable DEBUG
          196  +        CALL :fn_UnsetVariable MEMDEBUG
   208    197         )
   209    198   
   210    199         REM
   211         -      REM NOTE: If this batch file is not running in "what-if" mode, check to
   212         -      REM       be sure we were actually able to setup the MSVC environment as
   213         -      REM       current versions of their official batch file do not set the
   214         -      REM       exit code upon failure.
          200  +      REM NOTE: Launch a nested command shell to perform the following steps:
          201  +      REM
          202  +      REM       1. Setup the MSVC environment for this platform using the
          203  +      REM          official batch file.
          204  +      REM
          205  +      REM       2. Make sure that no stale build output files are present.
          206  +      REM
          207  +      REM       3. Build the "sqlite3.dll" and "sqlite3.lib" binaries for this
          208  +      REM          platform.
          209  +      REM
          210  +      REM       4. Copy the "sqlite3.dll" and "sqlite3.lib" binaries for this
          211  +      REM          platform to the platform-specific directory beneath the
          212  +      REM          binary directory.
   215    213         REM
   216         -      IF NOT DEFINED __ECHO (
   217         -        IF NOT DEFINED WindowsSdkDir (
   218         -          ECHO Cannot build, Windows SDK not found for platform %%P.
          214  +      "%ComSpec%" /C (
          215  +        REM
          216  +        REM NOTE: Attempt to setup the MSVC environment for this platform.
          217  +        REM
          218  +        %__ECHO3% CALL "%VCINSTALLDIR%\vcvarsall.bat" %%P
          219  +
          220  +        IF ERRORLEVEL 1 (
          221  +          ECHO Failed to call "%VCINSTALLDIR%\vcvarsall.bat" for platform %%P.
          222  +          GOTO errors
          223  +        )
          224  +
          225  +        REM
          226  +        REM NOTE: If this batch file is not running in "what-if" mode, check to
          227  +        REM       be sure we were actually able to setup the MSVC environment
          228  +        REM       as current versions of their official batch file do not set
          229  +        REM       the exit code upon failure.
          230  +        REM
          231  +        IF NOT DEFINED __ECHO (
          232  +          IF NOT DEFINED WindowsSdkDir (
          233  +            ECHO Cannot build, Windows SDK not found for platform %%P.
          234  +            GOTO errors
          235  +          )
          236  +        )
          237  +
          238  +        REM
          239  +        REM NOTE: When using MSVC 2012, the native SDK path cannot simply use
          240  +        REM       the "lib" sub-directory beneath the location specified in the
          241  +        REM       WindowsSdkDir environment variable because that location does
          242  +        REM       not actually contain the necessary library files for x86.
          243  +        REM       This must be done for each iteration because it relies upon
          244  +        REM       the WindowsSdkDir environment variable being set by the batch
          245  +        REM       file used to setup the MSVC environment.
          246  +        REM
          247  +        IF DEFINED SET_NSDKLIBPATH (
          248  +          CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH
          249  +          CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86
          250  +        )
          251  +
          252  +        REM
          253  +        REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC
          254  +        REM       makefile to clean any stale build output from previous
          255  +        REM       iterations of this loop and/or previous runs of this batch
          256  +        REM       file, etc.
          257  +        REM
          258  +        IF NOT DEFINED NOCLEAN (
          259  +          %__ECHO% nmake -f Makefile.msc clean
          260  +
          261  +          IF ERRORLEVEL 1 (
          262  +            ECHO Failed to clean for platform %%P.
          263  +            GOTO errors
          264  +          )
          265  +        ) ELSE (
          266  +          REM
          267  +          REM NOTE: Even when the cleaning step has been disabled, we still
          268  +          REM       need to remove the build output for the files we are
          269  +          REM       specifically wanting to build for each platform.
          270  +          REM
          271  +          %__ECHO% DEL /Q sqlite3.dll sqlite3.lib sqlite3.pdb
          272  +        )
          273  +
          274  +        REM
          275  +        REM NOTE: Call NMAKE with the MSVC makefile to build the "sqlite3.dll"
          276  +        REM       binary.  The x86 compiler will be used to compile the native
          277  +        REM       command line tools needed during the build process itself.
          278  +        REM       Also, disable looking for and/or linking to the native Tcl
          279  +        REM       runtime library.
          280  +        REM
          281  +        %__ECHO% nmake -f Makefile.msc sqlite3.dll XCOMPILE=1 USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
          282  +
          283  +        IF ERRORLEVEL 1 (
          284  +          ECHO Failed to build %%B "sqlite3.dll" for platform %%P.
   219    285             GOTO errors
   220    286           )
   221         -      )
   222    287   
   223         -      REM
   224         -      REM NOTE: When using MSVC 2012, the native SDK path cannot simply use
   225         -      REM       the "lib" sub-directory beneath the location specified in the
   226         -      REM       WindowsSdkDir environment variable because that location does
   227         -      REM       not actually contain the necessary library files for x86.
   228         -      REM       This must be done for each iteration because it relies upon
   229         -      REM       the WindowsSdkDir environment variable being set by the batch
   230         -      REM       file used to setup the MSVC environment.
   231         -      REM
   232         -      IF DEFINED SET_NSDKLIBPATH (
   233         -        CALL :fn_CopyVariable WindowsSdkDir NSDKLIBPATH
   234         -        CALL :fn_AppendVariable NSDKLIBPATH \lib\win8\um\x86
   235         -      )
   236         -
   237         -      REM
   238         -      REM NOTE: Unless prevented from doing so, invoke NMAKE with the MSVC
   239         -      REM       makefile to clean any stale build output from previous
   240         -      REM       iterations of this loop and/or previous runs of this batch
   241         -      REM       file, etc.
   242         -      REM
   243         -      IF NOT DEFINED NOCLEAN (
   244         -        %__ECHO% nmake -f Makefile.msc clean
          288  +        REM
          289  +        REM NOTE: Copy the "sqlite3.dll" file to the appropriate directory for
          290  +        REM       the build and platform beneath the binary directory.
          291  +        REM
          292  +        %__ECHO% XCOPY sqlite3.dll "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
   245    293   
   246    294           IF ERRORLEVEL 1 (
   247         -          ECHO Failed to clean for platform %%P.
          295  +          ECHO Failed to copy "sqlite3.dll" to "%BINARYDIRECTORY%\%%B\%%D\".
   248    296             GOTO errors
   249    297           )
   250         -      ) ELSE (
          298  +
   251    299           REM
   252         -        REM NOTE: Even when the cleaning step has been disabled, we still need
   253         -        REM       to remove the build output for the files we are specifically
   254         -        REM       wanting to build for each platform.
          300  +        REM NOTE: Copy the "sqlite3.lib" file to the appropriate directory for
          301  +        REM       the build and platform beneath the binary directory.
   255    302           REM
   256         -        %__ECHO% DEL /Q sqlite3.dll sqlite3.lib sqlite3.pdb
   257         -      )
   258         -
   259         -      REM
   260         -      REM NOTE: Invoke NMAKE with the MSVC makefile to build the "sqlite3.dll"
   261         -      REM       binary.  The x86 compiler will be used to compile the native
   262         -      REM       command line tools needed during the build process itself.
   263         -      REM       Also, disable looking for and/or linking to the native Tcl
   264         -      REM       runtime library.
   265         -      REM
   266         -      %__ECHO% nmake -f Makefile.msc sqlite3.dll "NCC=""%VCINSTALLDIR%\bin\cl.exe""" USE_NATIVE_LIBPATHS=1 NO_TCL=1 %NMAKE_ARGS%
   267         -
   268         -      IF ERRORLEVEL 1 (
   269         -        ECHO Failed to build "sqlite3.dll" for platform %%P.
   270         -        GOTO errors
   271         -      )
   272         -
   273         -      REM
   274         -      REM NOTE: Copy the "sqlite3.dll" file to the platform-specific directory
   275         -      REM       beneath the binary directory.
   276         -      REM
   277         -      %__ECHO% XCOPY sqlite3.dll "%BINARYDIRECTORY%\%%D\" %FFLAGS% %DFLAGS%
   278         -
   279         -      IF ERRORLEVEL 1 (
   280         -        ECHO Failed to copy "sqlite3.dll" to "%BINARYDIRECTORY%\%%D\".
   281         -        GOTO errors
   282         -      )
   283         -
   284         -      REM
   285         -      REM NOTE: Copy the "sqlite3.lib" file to the platform-specific directory
   286         -      REM       beneath the binary directory.
   287         -      REM
   288         -      %__ECHO% XCOPY sqlite3.lib "%BINARYDIRECTORY%\%%D\" %FFLAGS% %DFLAGS%
   289         -
   290         -      IF ERRORLEVEL 1 (
   291         -        ECHO Failed to copy "sqlite3.lib" to "%BINARYDIRECTORY%\%%D\".
   292         -        GOTO errors
   293         -      )
   294         -
   295         -      REM
   296         -      REM NOTE: Copy the "sqlite3.pdb" file to the platform-specific directory
   297         -      REM       beneath the binary directory unless we are prevented from doing
   298         -      REM       so.
   299         -      REM
   300         -      IF NOT DEFINED NOSYMBOLS (
   301         -        %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%D\" %FFLAGS% %DFLAGS%
          303  +        %__ECHO% XCOPY sqlite3.lib "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
   302    304   
   303    305           IF ERRORLEVEL 1 (
   304         -          ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%D\".
          306  +          ECHO Failed to copy "sqlite3.lib" to "%BINARYDIRECTORY%\%%B\%%D\".
   305    307             GOTO errors
   306    308           )
          309  +
          310  +        REM
          311  +        REM NOTE: Copy the "sqlite3.pdb" file to the appropriate directory for
          312  +        REM       the build and platform beneath the binary directory unless we
          313  +        REM       are prevented from doing so.
          314  +        REM
          315  +        IF NOT DEFINED NOSYMBOLS (
          316  +          %__ECHO% XCOPY sqlite3.pdb "%BINARYDIRECTORY%\%%B\%%D\" %FFLAGS% %DFLAGS%
          317  +
          318  +          IF ERRORLEVEL 1 (
          319  +            ECHO Failed to copy "sqlite3.pdb" to "%BINARYDIRECTORY%\%%B\%%D\".
          320  +            GOTO errors
          321  +          )
          322  +        )
   307    323         )
   308    324       )
   309    325     )
   310    326   
   311    327     REM
   312    328     REM NOTE: Handle any errors generated during the nested command shell.
   313    329     REM

Changes to tool/mkvsix.tcl.

    86     86     # NOTE: Performs all Tcl command, variable, and backslash substitutions in
    87     87     #       the specified file and then re-writes the contents of that same file
    88     88     #       with the substituted data.
    89     89     #
    90     90     return [writeFile $fileName [uplevel 1 [list subst [readFile $fileName]]]]
    91     91   }
    92     92   
    93         -proc replacePlatform { fileName platformName } {
           93  +proc replaceBuildAndPlatform { fileName buildName platformName } {
    94     94     #
    95     95     # NOTE: Returns the specified file name containing the platform name instead
    96     96     #       of platform placeholder tokens.
    97     97     #
    98         -  return [string map [list <platform> $platformName] $fileName]
           98  +  return [string map [list <build> $buildName <platform> $platformName] \
           99  +      $fileName]
    99    100   }
   100    101   
   101    102   set script [file normalize [info script]]
   102    103   
   103    104   if {[string length $script] == 0} then {
   104    105     fail "script file currently being evaluated is unknown" true
   105    106   }
................................................................................
   245    246   
   246    247   #
   247    248   # NOTE: Setup the master file list data, including the necessary flags.
   248    249   #
   249    250   if {![info exists fileNames(source)]} then {
   250    251     set fileNames(source) [list "" "" "" \
   251    252         [file join $sourceDirectory sqlite3.h] \
   252         -      [file join $binaryDirectory <platform> sqlite3.lib] \
   253         -      [file join $binaryDirectory <platform> sqlite3.dll]]
          253  +      [file join $binaryDirectory <build> <platform> sqlite3.lib] \
          254  +      [file join $binaryDirectory <build> <platform> sqlite3.dll]]
   254    255   
   255    256     if {![info exists no(symbols)]} then {
   256    257       lappend fileNames(source) \
   257         -        [file join $binaryDirectory <platform> sqlite3.pdb]
          258  +        [file join $binaryDirectory <build> <platform> sqlite3.pdb]
   258    259     }
   259    260   }
   260    261   
   261    262   if {![info exists fileNames(destination)]} then {
   262    263     set fileNames(destination) [list \
   263    264         [file join $stagingDirectory extension.vsixmanifest] \
   264    265         [file join $stagingDirectory SDKManifest.xml] \
   265         -      [file join $stagingDirectory DesignTime CommonConfiguration \
   266         -          <platform> SQLite.WinRT.props] \
   267         -      [file join $stagingDirectory DesignTime CommonConfiguration \
   268         -          <platform> sqlite3.h] \
   269         -      [file join $stagingDirectory DesignTime CommonConfiguration \
   270         -          <platform> sqlite3.lib] \
   271         -      [file join $stagingDirectory Redist CommonConfiguration \
   272         -          <platform> sqlite3.dll]]
          266  +      [file join $stagingDirectory DesignTime <build> <platform> \
          267  +          SQLite.WinRT.props] \
          268  +      [file join $stagingDirectory DesignTime <build> <platform> sqlite3.h] \
          269  +      [file join $stagingDirectory DesignTime <build> <platform> sqlite3.lib] \
          270  +      [file join $stagingDirectory Redist <build> <platform> sqlite3.dll]]
   273    271   
   274    272     if {![info exists no(symbols)]} then {
   275    273       lappend fileNames(destination) \
   276         -        [file join $stagingDirectory Redist Debug \
   277         -            <platform> sqlite3.pdb]
          274  +        [file join $stagingDirectory Redist <build> <platform> sqlite3.pdb]
          275  +  }
          276  +}
          277  +
          278  +if {![info exists fileNames(buildNeutral)]} then {
          279  +  set fileNames(buildNeutral) [list 1 1 1 1 0 0]
          280  +
          281  +  if {![info exists no(symbols)]} then {
          282  +    lappend fileNames(buildNeutral) 0
   278    283     }
   279    284   }
   280    285   
   281         -if {![info exists fileNames(neutral)]} then {
   282         -  set fileNames(neutral) [list 1 1 1 1 0 0]
          286  +if {![info exists fileNames(platformNeutral)]} then {
          287  +  set fileNames(platformNeutral) [list 1 1 1 1 0 0]
   283    288   
   284    289     if {![info exists no(symbols)]} then {
   285         -    lappend fileNames(neutral) 0
          290  +    lappend fileNames(platformNeutral) 0
   286    291     }
   287    292   }
   288    293   
   289    294   if {![info exists fileNames(subst)]} then {
   290    295     set fileNames(subst) [list 1 1 1 0 0 0]
   291    296   
   292    297     if {![info exists no(symbols)]} then {
   293    298       lappend fileNames(subst) 0
   294    299     }
   295    300   }
          301  +
          302  +if {![info exists fileNames(noDebug)]} then {
          303  +  set fileNames(noDebug) [list 0 0 0 0 0 0]
          304  +
          305  +  if {![info exists no(symbols)]} then {
          306  +    lappend fileNames(noDebug) 0
          307  +  }
          308  +}
          309  +
          310  +if {![info exists fileNames(noRetail)]} then {
          311  +  set fileNames(noRetail) [list 0 0 0 0 0 0]
          312  +
          313  +  if {![info exists no(symbols)]} then {
          314  +    lappend fileNames(noRetail) 1
          315  +  }
          316  +}
          317  +
          318  +###############################################################################
          319  +
          320  +#
          321  +# NOTE: Setup the list of builds supported by this script.
          322  +#
          323  +if {![info exists buildNames]} then {
          324  +  set buildNames [list Debug Retail]
          325  +}
   296    326   
   297    327   ###############################################################################
   298    328   
   299    329   #
   300    330   # NOTE: Setup the list of platforms supported by this script.
   301    331   #
   302    332   if {![info exists platformNames]} then {
................................................................................
   334    364   #       is an empty string, then the destination file name will be assumed to
   335    365   #       already exist in the staging directory and will not be copied; however,
   336    366   #       dynamic replacements may still be performed on the destination file
   337    367   #       prior to the package being re-zipped.
   338    368   #
   339    369   foreach sourceFileName $fileNames(source) \
   340    370       destinationFileName $fileNames(destination) \
   341         -    isNeutral $fileNames(neutral) useSubst $fileNames(subst) {
          371  +    buildNeutral $fileNames(buildNeutral) platformNeutral \
          372  +    $fileNames(platformNeutral) useSubst $fileNames(subst) \
          373  +    noDebug $fileNames(noDebug) noRetail $fileNames(noRetail) {
   342    374     #
   343         -  # NOTE: If the current file is platform-neutral, then only one platform will
   344         -  #       be processed for it, namely "neutral"; otherwise, each supported
   345         -  #       platform will be processed for it individually.
          375  +  # NOTE: If the current file is build-neutral, then only one build will
          376  +  #       be processed for it, namely "CommonConfiguration"; otherwise, each
          377  +  #       supported build will be processed for it individually.
   346    378     #
   347         -  foreach platformName [expr {$isNeutral ? [list neutral] : $platformNames}] {
   348         -    #
   349         -    # NOTE: Use the actual platform name in the destination file name.
          379  +  foreach buildName \
          380  +      [expr {$buildNeutral ? [list CommonConfiguration] : $buildNames}] {
   350    381       #
   351         -    set newDestinationFileName [replacePlatform $destinationFileName \
   352         -        $platformName]
   353         -
          382  +    # NOTE: Should the current file be skipped for this build?
   354    383       #
   355         -    # NOTE: Does the source file need to be copied to the destination file?
   356         -    #
   357         -    if {[string length $sourceFileName] > 0} then {
   358         -      #
   359         -      # NOTE: First, make sure the destination directory exists.
   360         -      #
   361         -      file mkdir [file dirname $newDestinationFileName]
   362         -
   363         -      #
   364         -      # NOTE: Then, copy the source file to the destination file verbatim.
   365         -      #
   366         -      file copy [replacePlatform $sourceFileName $platformName] \
   367         -          $newDestinationFileName
          384  +    if {[info exists no${buildName}] && [set no${buildName}]} then {
          385  +      continue
   368    386       }
   369    387   
   370    388       #
   371         -    # NOTE: Does the destination file contain dynamic replacements that must
   372         -    #       be processed now?
          389  +    # NOTE: If the current file is platform-neutral, then only one platform
          390  +    #       will be processed for it, namely "neutral"; otherwise, each
          391  +    #       supported platform will be processed for it individually.
   373    392       #
   374         -    if {$useSubst} then {
          393  +    foreach platformName \
          394  +        [expr {$platformNeutral ? [list neutral] : $platformNames}] {
          395  +      #
          396  +      # NOTE: Use the actual platform name in the destination file name.
          397  +      #
          398  +      set newDestinationFileName [replaceBuildAndPlatform \
          399  +          $destinationFileName $buildName $platformName]
          400  +
          401  +      #
          402  +      # NOTE: Does the source file need to be copied to the destination file?
          403  +      #
          404  +      if {[string length $sourceFileName] > 0} then {
          405  +        #
          406  +        # NOTE: First, make sure the destination directory exists.
          407  +        #
          408  +        file mkdir [file dirname $newDestinationFileName]
          409  +
          410  +        #
          411  +        # NOTE: Then, copy the source file to the destination file verbatim.
          412  +        #
          413  +        file copy [replaceBuildAndPlatform $sourceFileName $buildName \
          414  +            $platformName] $newDestinationFileName
          415  +      }
          416  +
   375    417         #
   376         -      # NOTE: Perform any dynamic replacements contained in the destination
   377         -      #       file and then re-write it in-place.
          418  +      # NOTE: Does the destination file contain dynamic replacements that must
          419  +      #       be processed now?
   378    420         #
   379         -      substFile $newDestinationFileName
          421  +      if {$useSubst} then {
          422  +        #
          423  +        # NOTE: Perform any dynamic replacements contained in the destination
          424  +        #       file and then re-write it in-place.
          425  +        #
          426  +        substFile $newDestinationFileName
          427  +      }
   380    428       }
   381    429     }
   382    430   }
   383    431   
   384    432   ###############################################################################
   385    433   
   386    434   #