Changeset 53

Show
Ignore:
Timestamp:
03/03/08 07:39:48 (4 years ago)
Author:
Derek Parnell
Message:

Pre release #2 of version 3.5

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/build.d

    r52 r53  
    77 Initial Creation: January 2005 
    88 Version: 3.05 
    9  Date: September 2007 
     9 Date: 03 March 2008 
    1010 License: 
    1111        This software is provided 'as-is', without any express or implied 
     
    113113        this(string pMsg) 
    114114        { 
    115             super (vMyName ~ ":" ~ pMsg); 
     115            super (opts.MyName ~ ":" ~ pMsg); 
    116116        } 
    117117    } 
     
    132132    Bool         vScanImports; 
    133133    Bool         vNoLink; 
    134     Bool         vSilent; 
    135134    Bool         vSymbols; 
    136135    Bool         vCleanup; 
     
    155154    LibOpt     vLibraryAction = LibOpt.Implicit; 
    156155    string     vMyPath; 
    157     string     vMyName; 
    158156    string     vMyDir; 
    159157    string       vTargetName;           // Output name from first file name. 
     
    191189    vUseFinal = True; 
    192190    vEmptyArgs = True; 
    193     vSilent = False; 
    194191    vCleanup = False; 
    195192    vMacroInput = True; 
     
    224221//------------------------------------------------------- 
    225222{ 
    226  
    227     std.stdio.writefln( 
    228         "Path and Version : %s v%s(%d)\n  built on %s" 
    229             ,vMyPath, vMyVersion, build_bn.auto_build_number, 
    230             __TIMESTAMP__); 
     223    if (opts.Silent == False || pFull) 
     224    { 
     225        std.stdio.writefln( 
     226            "%s:\n  Path and Version: %s v%s(%d)\n  built on %s" 
     227                ,opts.MyName, vMyPath, vMyVersion, build_bn.auto_build_number, 
     228                __TIMESTAMP__); 
     229    } 
     230     
    231231    if (pFull == false) 
    232232        return; 
    233     else { 
     233     
    234234 
    235235    std.stdio.writefln( 
    236236        "Usage: %s sourcefile [options objectfiles libraries]" 
    237             , vMyName); 
     237            , opts.MyName); 
    238238    std.stdio.writefln("  sourcefile D source file"); 
    239239    std.stdio.writefln("  -v         Verbose (passed through to D)"); 
     
    321321    std.stdio.writefln("  -?        Same as -help, displays the full 'usage' help text."); 
    322322    std.stdio.writefln("  -silent   Avoids unnecessary messages being displayed."); 
     323    std.stdio.writefln("  -quiet    Same as -silent"); 
    323324    std.stdio.writefln("  -noautoimport Turns off the automatic addition of source paths"); 
    324325    std.stdio.writefln("              to the list of Import Roots."); 
     
    347348    std.stdio.writefln("   build looks for a file called 'build.brf'"); 
    348349} 
    349 
     350 
    350351 
    351352// Scans all known source files and extacts any modules. 
     
    373374            { 
    374375                if(opts.Verbose == True) { 
    375                     std.stdio.writefln("source file[%d] %s", i, 
     376                    std.stdio.writefln("%s: source file[%d] %s", opts.MyName, i, 
    376377                            source.ReducePathName(lSource.FileName)); 
    377378                } 
    378379                else if(vNames == True) { 
    379                     std.stdio.writefln(" [ %s ]", source.ReducePathName(lSource.FileName)); 
     380                    std.stdio.writefln("%s: [ %s ]", opts.MyName, source.ReducePathName(lSource.FileName)); 
    380381                } 
    381382            } else { 
    382383                if(vNames == True) { 
    383                     std.stdio.writefln(" [ %s ]", source.ReducePathName(lSource.FileName)); 
     384                    std.stdio.writefln("%s: [ %s ]", opts.MyName, source.ReducePathName(lSource.FileName)); 
    384385                } 
    385386            } 
     
    390391                { 
    391392                    if(opts.Verbose == True) 
    392                         std.stdio.writefln("Newer time: from %s to %s"
     393                        std.stdio.writefln("%s: Newer time: from %s to %s", opts.MyName
    393394                                    lModsTime.toString(), 
    394395                                    lSource.DependantsTime.toString() 
     
    411412        { 
    412413            if(opts.Verbose == True) { 
    413                 std.stdio.writefln("link file[%d] %s %s", idx, 
     414                std.stdio.writefln("%s: link file[%d] %s %s", opts.MyName, idx, 
    414415                        source.ReducePathName(lFileName), lLinkTime.toString()); 
    415416            } 
    416417            else if(vNames == True) { 
    417                 std.stdio.writefln(" [ %s ]", source.ReducePathName(lFileName)); 
     418                std.stdio.writefln("%s: [ %s ]", opts.MyName, source.ReducePathName(lFileName)); 
    418419            } 
    419420        } else { 
    420421            if(vNames == True) { 
    421                 std.stdio.writefln(" [ %s ]", source.ReducePathName(lFileName)); 
     422                std.stdio.writefln("%s: [ %s ]", opts.MyName, source.ReducePathName(lFileName)); 
    422423            } 
    423424        } 
     
    427428            { 
    428429                if(opts.Verbose == True) 
    429                     std.stdio.writefln("Newer time: from %s to %s"
     430                    std.stdio.writefln("%s: Newer time: from %s to %s", opts.MyName
    430431                                lModsTime.toString(), 
    431432                                lLinkTime.toString() 
     
    448449      if (opts.TestRun == True) 
    449450      { 
    450           std.stdio.writefln("Generated command: '%s'",pCommand); 
     451          std.stdio.writefln("%s: Generated command: '%s'", opts.MyName, pCommand); 
    451452          return 1; // Don't run the command 
    452453      } 
     
    456457          { 
    457458              if(opts.Verbose == True) 
    458                   std.stdio.writefln("Running '%s'",pCommand); 
     459                  std.stdio.writefln("%s: Running '%s'",opts.MyName, pCommand); 
    459460          } 
    460461          return 0; // Continue with the command. 
     
    469470              if (pRC == 0) 
    470471              { 
    471                   std.stdio.writefln("Successful"); 
     472                  std.stdio.writefln("%s: Successful", opts.MyName); 
    472473              } else { 
    473                   std.stdio.writefln("Failed. Return code: %04x",pRC); 
     474                  std.stdio.writefln("%s: Failed. Return code: %04x", opts.MyName, pRC); 
    474475              } 
    475476          } 
     
    523524            { 
    524525                if (opts.Verbose == True) 
    525                     std.stdio.writefln("Macro file '%s' being processed.", lFullFile); 
     526                    std.stdio.writefln("%s: Macro file '%s' being processed.", opts.MyName, lFullFile); 
    526527            } 
    527528 
     
    533534                version(BuildVerbose) 
    534535                { 
    535                     if ((vSilent != True) || (opts.Verbose == True)) 
    536                         std.stdio.writefln("Macro file '%s' failed to generate output", lFullFile); 
     536                    if ((opts.Silent != True) || (opts.Verbose == True)) 
     537                        std.stdio.writefln("%s: Macro file '%s' failed to generate output", opts.MyName, lFullFile); 
    537538                } else { 
    538                     if (vSilent != True) 
    539                         std.stdio.writefln("Macro file '%s' failed to generate output", lFullFile); 
     539                    if (opts.Silent != True) 
     540                        std.stdio.writefln("%s: Macro file '%s' failed to generate output", opts.MyName, lFullFile); 
    540541                } 
    541542                lFullFile.length = 0; 
     
    600601        { 
    601602            if(opts.Verbose == True) 
    602                 std.stdio.writefln("Pragma target override is '%s'", std.path.getName(vTargetName)); 
     603                std.stdio.writefln("%s: Pragma target override is '%s'", opts.MyName, std.path.getName(vTargetName)); 
    603604        } 
    604605 
     
    614615        { 
    615616            if(opts.Verbose == True) 
    616                 std.stdio.writefln("Cmdline target override is '%s'", vTargetName); 
     617                std.stdio.writefln("%s: Cmdline target override is '%s'", opts.MyName, vTargetName); 
    617618        } 
    618619    } 
     
    663664        { 
    664665            if((opts.Verbose == True) || (vNames == True) ) 
    665                 std.stdio.writefln("\nBuilding target '%s'", lTargetName); 
     666                std.stdio.writefln("\n%s: Building target '%s'", opts.MyName, lTargetName); 
    666667        } 
    667668 
     
    677678        { 
    678679            if(opts.Verbose == True) { 
    679                 std.stdio.writefln("Time %s for %s (target)", lTargetTime.toString(), lTargetName); 
    680                 std.stdio.writefln("Time %s (most recent)", lMostRecentTime.toString()); 
     680                std.stdio.writefln("%s: Time %s for %s (target)", opts.MyName, lTargetTime.toString(), lTargetName); 
     681                std.stdio.writefln("%s: Time %s (most recent)", opts.MyName, lMostRecentTime.toString()); 
    681682            } 
    682683        } 
     
    691692        { 
    692693            if((opts.Verbose == True) || (vNames == True) ) 
    693                 std.stdio.writefln("\nCompiling only. No target will be built."); 
     694                std.stdio.writefln("\n%s: Compiling only. No target will be built.", opts.MyName); 
    694695        } else { 
    695696            if(vNames == True) 
    696                 std.stdio.writefln("\nCompiling only. No target will be built."); 
     697                std.stdio.writefln("\n%s: Compiling only. No target will be built.", opts.MyName); 
    697698        } 
    698699    } 
     
    762763                    { 
    763764                        if (opts.Verbose == True) 
    764                             std.stdio.writefln("%s newer than its object file", lShortFileName); 
     765                            std.stdio.writefln("%s: %s newer than its object file", opts.MyName, lShortFileName); 
    765766                    } 
    766767 
     
    771772                    { 
    772773                        if (opts.Verbose == True) 
    773                             std.stdio.writefln("%s has newer dependants than its object file.", 
     774                            std.stdio.writefln("%s: %s has newer dependants than its object file.", 
     775                                        opts.MyName, 
    774776                                        lShortFileName); 
    775777                    } 
     
    797799                            { 
    798800                                if (opts.Verbose == True) 
    799                                     std.stdio.writefln("New build number %d for %s", 
    800                                                lCurrentSource.BuildNumber, 
     801                                    std.stdio.writefln("%s: New build number %d for %s", 
     802                                                opts.MyName, 
     803                                                lCurrentSource.BuildNumber, 
    801804                                                lCurrentSource.ModuleName); 
    802805                            } 
     
    816819    if( lBuildRequired == False ) 
    817820    { 
    818         if (vSilent == False) 
    819             std.stdio.writefln ("Files are up to date, no build required."); 
     821        if (opts.Silent == False) 
     822            std.stdio.writefln ("%s: Files are up to date, no build required.", opts.MyName); 
    820823        return 0; 
    821824    } 
     
    922925            { 
    923926                if (opts.Verbose == True) 
    924                     std.stdio.writefln("Compiling with ..........\n%s\n", lCommandLine); 
     927                    std.stdio.writefln("%s: Compiling with ..........\n%s\n", opts.MyName, lCommandLine); 
    925928            } 
    926929 
     
    10231026                    { 
    10241027                        if (opts.Verbose == True) 
    1025                             std.stdio.writefln("Setting LIB=%s", opts.LibPaths); 
     1028                            std.stdio.writefln("%s: Setting LIB=%s", opts.MyName, opts.LibPaths); 
    10261029                    } 
    10271030                    util.str.SetEnv("LIB",opts.LibPaths); 
     
    10991102                    { 
    11001103                        if (opts.Verbose == True) 
    1101                             std.stdio.writefln("Using library paths=%s", opts.LibPaths); 
     1104                            std.stdio.writefln("%s: Using library paths=%s", opts.MyName, opts.LibPaths); 
    11021105                    } 
    11031106 
     
    11661169            { 
    11671170                if (opts.Verbose == True) 
    1168                     std.stdio.writefln("Linking with ..........\n%s\n", lCommandLine); 
     1171                    std.stdio.writefln("%s: Linking with ..........\n%s\n", opts.MyName, lCommandLine); 
    11691172            } 
    11701173 
    11711174            // Run Linker 
    1172             if (vSilent == True) 
     1175            if (opts.Silent == True) 
    11731176            { 
    11741177                lCommand ~= " " ~ opts.LinkerStdOut; 
     
    11831186    else 
    11841187    { 
    1185         if (vSilent == False) 
    1186             std.stdio.writefln("No build required."); 
     1188        if (opts.Silent == False) 
     1189            std.stdio.writefln("%s: No build required.", opts.MyName); 
    11871190        lRunResult = 0; 
    11881191    } 
     
    12631266            { 
    12641267                if (opts.Verbose == True) 
    1265                     std.stdio.writefln("Librarian with ..........\n%s\n", lOutText); 
     1268                    std.stdio.writefln("%s: Librarian with ..........\n%s\n", opts.MyName, lOutText); 
    12661269            } 
    12671270 
     
    12781281        { 
    12791282            if (opts.Verbose == True) 
    1280                 std.stdio.writefln("Cleaning up ..."); 
     1283                std.stdio.writefln("%s: Cleaning up ...", opts.MyName); 
    12811284        } 
    12821285 
     
    13151318                    { 
    13161319                        if (opts.Verbose == True) 
    1317                             std.stdio.writefln("  removing %s", lFilename); 
     1320                            std.stdio.writefln("%s:  removing %s", opts.MyName, lFilename); 
    13181321                    } 
    13191322                    std.file.remove(lFilename); 
     
    14701473            { 
    14711474                if (opts.Verbose == True) 
    1472                     std.stdio.writefln("Multiple pragma(target,...) detected. '%s' will be used and '%s' rejected.", 
    1473                                     vPragmaTargetName, pPath ); 
     1475                    std.stdio.writefln("%s: Multiple pragma(target,...) detected." 
     1476                                       " '%s' will be used and '%s' rejected.", 
     1477                                    opts.MyName, vPragmaTargetName, pPath ); 
    14741478            } 
    14751479        } 
     
    16011605        { 
    16021606            if (opts.Verbose == True) 
    1603                 std.stdio.writefln("Analyzing environment symbol DFLAGS=%s", lSymValue); 
     1607                std.stdio.writefln("%s: Analyzing environment symbol DFLAGS=%s", opts.MyName, lSymValue); 
    16041608        } 
    16051609 
     
    16791683    { 
    16801684        if (opts.Verbose == True) 
    1681             std.stdio.writefln("Reading from config: %s", lConfigPath); 
     1685            std.stdio.writefln("%s: Reading from config: %s", opts.MyName, lConfigPath); 
    16821686    } 
    16831687    lTextLines = util.fileex.GetTextLines(lConfigPath, util.fileex.GetOpt.Exists); 
     
    16951699        { 
    16961700            if (opts.Verbose == True) 
    1697                 std.stdio.writefln(" Line %d: %s", i+1, lText); 
     1701                std.stdio.writefln(" Line %d: %s", i+1, lText); 
    16981702        } 
    16991703 
     
    17471751            { 
    17481752                if(opts.Verbose == True) 
    1749                     std.stdio.writefln(" use library paths %s",opts.LibPaths); 
     1753                    std.stdio.writefln("%s: use library paths %s", opts.MyName, opts.LibPaths); 
    17501754            } 
    17511755            continue; 
     
    18141818        if(opts.Verbose == True) 
    18151819        { 
    1816             std.stdio.writefln(" %s path '%s'",pType, pFilePath); 
    1817             std.stdio.writefln(" %s is '%s'",pType, pFileExe); 
     1820            std.stdio.writefln("%s: %s path '%s'", opts.MyName, pType, pFilePath); 
     1821            std.stdio.writefln("%s: %s is '%s'", opts.MyName, pType, pFileExe); 
    18181822        } 
    18191823    } 
     
    18271831    if (pList.length > 0) { 
    18281832        if (pTitle.length > 0) 
    1829             std.stdio.writefln("\n%s",pTitle); 
     1833            std.stdio.writefln("\n%s: %s", opts.MyName, pTitle); 
    18301834 
    18311835        foreach(int lIndex, string lListEntry; pList) { 
    1832             std.stdio.writefln(" [%2d]: %s",lIndex,lListEntry); 
     1836            std.stdio.writefln("%s: [%2d]: %s", opts.MyName, lIndex, lListEntry); 
    18331837        } 
    18341838    } 
     
    18411845    if (pList.length > 0) { 
    18421846        if (pTitle.length > 0) 
    1843             std.stdio.writefln("\n%s",pTitle); 
     1847            std.stdio.writefln("\n%s:%s", opts.MyName, pTitle); 
    18441848 
    18451849        foreach(int lIndex, source.ExternRef lListEntry; pList) 
    18461850        { 
    1847             std.stdio.writef(" [%2d]: %s",lIndex,lListEntry.FilePath); 
     1851            std.stdio.writef(" [%2d]: %s", opts.MyName, lIndex, lListEntry.FilePath); 
    18481852            if (lListEntry.ToolOpts.length > 0) 
    18491853                foreach(string lOpt; lListEntry.ToolOpts) 
    1850                     std.stdio.writef(" [%s]",lOpt); 
     1854                    std.stdio.writef(" [%s]", opts.MyName, lOpt); 
    18511855            std.stdio.writefln(""); 
    18521856        } 
     
    18601864    if (pList.length > 0) { 
    18611865        if (pTitle.length > 0) 
    1862             std.stdio.writefln("\n%s",pTitle); 
     1866            std.stdio.writefln("\n%s: %s", opts.MyName, pTitle); 
    18631867 
    18641868        foreach(int lIndex, CmdLineArg lListEntry; pList) 
     
    20432047    // Strip off application's path from arglist. 
    20442048    vMyPath = pArgs[0]; 
    2045     vMyName = std.path.getBaseName(vMyPath); 
     2049    opts.MyName = std.path.getBaseName(vMyPath); 
    20462050    vMyDir  = std.path.getDirName(vMyPath); 
    20472051    util.str.SetEnv("@S", vMyDir); 
     
    20492053    pArgs=pArgs[1..pArgs.length]; 
    20502054 
    2051     version(BuildVerbose) CheckVerbose(pArgs); 
     2055    CheckVerbose(pArgs); 
    20522056 
    20532057    { 
     
    20592063    ReadBuildConfigFile(); 
    20602064 
    2061     if (util.str.ends(vMyName, "." ~ opts.ExeExtension) == True) 
    2062     { 
    2063         vMyName.length = vMyName.length - opts.ExeExtension.length - 1; 
     2065    if (util.str.ends(opts.MyName, "." ~ opts.ExeExtension) == True) 
     2066    { 
     2067        opts.MyName.length = opts.MyName.length - opts.ExeExtension.length - 1; 
    20642068    } 
    20652069 
     
    21282132    { 
    21292133        if ((opts.Verbose == True) || (vNames == True) ) 
    2130             std.stdio.writefln("Current Dir '%s'", util.pathex.GetInitCurDir()); 
     2134            std.stdio.writefln("%s: Current Dir '%s'", opts.MyName, util.pathex.GetInitCurDir()); 
    21312135    } else { 
    21322136        if (vNames == True) 
    2133             std.stdio.writefln("Current Dir '%s'", util.pathex.GetInitCurDir()); 
     2137            std.stdio.writefln("%s: Current Dir '%s'", opts.MyName, util.pathex.GetInitCurDir()); 
    21342138    } 
    21352139 
     
    21392143        { 
    21402144            if (opts.Verbose == True) 
    2141                 std.stdio.writefln("%s not found in PATH symbol, so assuming current directory", 
    2142                         opts.CompilerExe); 
     2145                std.stdio.writefln("%s: %s not found in PATH symbol, so assuming current directory", 
     2146                        opts.MyName, opts.CompilerExe); 
    21432147        } 
    21442148    } 
     
    21652169    { 
    21662170        if (opts.Verbose == True) 
    2167             std.stdio.writefln("Compiler installed in %s",opts.CompilerPath); 
     2171            std.stdio.writefln("%s: Compiler installed in %s", opts.MyName, opts.CompilerPath); 
    21682172    } 
    21692173 
     
    21942198        if (! util.file2.FileExists( GetFullPathname(lFile, vSourceScanList)) ) 
    21952199        { 
    2196             if (vSilent == False) 
    2197                 std.stdio.writefln("** File '%s' not found.", lFile); 
     2200            if (opts.Silent == False) 
     2201                std.stdio.writefln("%s: ** File '%s' not found.", opts.MyName, lFile); 
    21982202            lAllExist = false; 
    21992203        } 
     
    22782282        else 
    22792283        { 
    2280             std.stdio.writefln("Modules: %s", vSymbolOutName); 
     2284            std.stdio.writefln("%s: Modules: %s", opts.MyName, vSymbolOutName); 
    22812285        } 
    22822286    } 
     
    23202324        else 
    23212325        { 
    2322             std.stdio.writefln("Uses: %s", vUsesOutput); 
     2326            std.stdio.writefln("%s: Uses: %s", opts.MyName, vUsesOutput); 
    23232327        } 
    23242328 
     
    23722376    { 
    23732377        if (opts.Verbose == True) 
    2374             std.stdio.writefln("Response file %s", lRespFileName); 
     2378            std.stdio.writefln("%s: Response file %s", opts.MyName, lRespFileName); 
    23752379    } 
    23762380 
     
    23922396            { 
    23932397                if (opts.Verbose == True) 
    2394                     std.stdio.writefln("Response file arg: %s", lArg); 
     2398                    std.stdio.writefln("%s: Response file arg: %s", opts.MyName, lArg); 
    23952399            } 
    23962400            GatherOneArg( lArg, vCombinedArgs ); 
     
    24852489        case "-nounittest": 
    24862490            // Not passed thru. Deprecated switch is now ignored. 
    2487             if (vSilent == False) 
    2488                 std.stdio.writefln("Note: '-nounittest' ignored. This switch is no longer used."); 
     2491            if (opts.Silent == False) 
     2492                std.stdio.writefln("%s: Note: '-nounittest' ignored. This switch is no longer used.", opts.MyName); 
    24892493            break; 
    24902494 
     
    24952499 
    24962500        case "-silent": 
    2497             vSilent = True; 
     2501        case "-quiet": 
     2502            // Already dealt with. 
    24982503            // Not passed thru. 
    24992504            break; 
     
    26402645                    { 
    26412646                        if (opts.Verbose == True) 
    2642                             std.stdio.writefln("DCPATH was %s now %s", opts.CompilerPath, lNewPath); 
     2647                            std.stdio.writefln("%s: DCPATH was %s now %s", opts.MyName, opts.CompilerPath, lNewPath); 
    26432648                    } 
    26442649                    opts.CompilerPath = lNewPath; 
     
    26562661                    { 
    26572662                        if (opts.Verbose == True) 
    2658                             std.stdio.writefln("CFPATH was %s now %s", opts.ConfigPath, lNewPath); 
     2663                            std.stdio.writefln("%s: CFPATH was %s now %s", opts.MyName, opts.ConfigPath, lNewPath); 
    26592664                    } 
    26602665                    opts.OverrideConfigPath = lNewPath; 
     
    26722677                    { 
    26732678                        if (opts.Verbose == True) 
    2674                             std.stdio.writefln("BCFPATH was '%s' now '%s'", opts.CFGPath, lNewPath); 
     2679                            std.stdio.writefln("%s: BCFPATH was '%s' now '%s'", opts.MyName, opts.CFGPath, lNewPath); 
    26752680                    } 
    26762681                    opts.CFGPath = lNewPath; 
     
    26852690                    { 
    26862691                        if (opts.Verbose == True) 
    2687                             std.stdio.writefln("Added %s to Source Scan List", lNewPath); 
     2692                            std.stdio.writefln("%s: Added %s to Source Scan List", opts.MyName, lNewPath); 
    26882693                    } 
    26892694 
     
    27002705                    { 
    27012706                        if (opts.Verbose == True) 
    2702                             std.stdio.writefln("RDF was %s now %s", opts.RDFName, pArg[4..$]); 
     2707                            std.stdio.writefln("%s: RDF was %s now %s", opts.MyName, opts.RDFName, pArg[4..$]); 
    27032708                    } 
    27042709 
     
    27132718                    { 
    27142719                        if (opts.Verbose == True) 
    2715                             std.stdio.writefln("MDF was %s now %s", opts.DefMacroDefFile, pArg[4..$]); 
     2720                            std.stdio.writefln("%s: MDF was %s now %s", opts.MyName, opts.DefMacroDefFile, pArg[4..$]); 
    27162721                    } 
    27172722 
     
    27382743                            { 
    27392744                                if(opts.Verbose == True) 
    2740                                     std.stdio.writefln("Added root from command line = %s",lRoot); 
     2745                                    std.stdio.writefln("%s: Added root from command line = %s", opts.MyName, lRoot); 
    27412746                            } 
    27422747                        } 
     
    28222827                        { 
    28232828                            if(opts.Verbose == True) 
    2824                                 std.stdio.writefln("Added root from Object Write Path = %s",lRoot); 
     2829                                std.stdio.writefln("%s: Added root from Object Write Path = %s", opts.MyName, lRoot); 
    28252830                        } 
    28262831                    } 
     
    29112916                                { 
    29122917                                    if(opts.Verbose == True) 
    2913                                         std.stdio.writefln("Added root from command line = %s",lRoot); 
     2918                                        std.stdio.writefln("%s: Added root from command line = %s", opts.MyName, lRoot); 
    29142919                                } 
    29152920                            } 
     
    29682973                    { 
    29692974                        if(opts.Verbose == True) 
    2970                             std.stdio.writefln("Default target is '%s'", vTargetName); 
     2975                            std.stdio.writefln("%s: Default target is '%s'", opts.MyName, vTargetName); 
    29712976                    } 
    29722977                } 
     
    31143119        if (opts.Verbose == True) 
    31153120            if (util.file2.FileExists(lMacroDefFileName)) 
    3116                 std.stdio.writefln("Macro Definition file %s", lMacroDefFileName); 
     3121                std.stdio.writefln("%s: Macro Definition file %s", opts.MyName, lMacroDefFileName); 
    31173122    } 
    31183123 
     
    31263131            foreach(string lMsg; lMessages) 
    31273132            { 
    3128                 std.stdio.writefln("%s", lMsg); 
     3133                std.stdio.writefln("%s: %s", opts.MyName, lMsg); 
    31293134            } 
    31303135        } 
     
    31573162        lCmdCnt += ProcessOneBuildConfig(pArg, vMyDir ~ "/../etc", pArgGroup); 
    31583163        lCmdCnt += ProcessOneBuildConfig(pArg, util.str.GetEnv(opts.HomePathId) ~ "/.build", pArgGroup); 
    3159         if (vMyName != "build") 
    3160             lCmdCnt += ProcessOneBuildConfig(pArg, util.str.GetEnv(opts.HomePathId) ~ "/." ~ vMyName, pArgGroup); 
     3164        if (opts.MyName != "build") 
     3165            lCmdCnt += ProcessOneBuildConfig(pArg, util.str.GetEnv(opts.HomePathId) ~ "/." ~ opts.MyName, pArgGroup); 
    31613166    } 
    31623167 
     
    31933198        if (opts.UtilsConfigFile.length == 0) 
    31943199        { 
    3195             opts.UtilsConfigFile = util.pathex.GetBaseName(vMyName) ~ ".cfg"; 
     3200            opts.UtilsConfigFile = util.pathex.GetBaseName(opts.MyName) ~ ".cfg"; 
    31963201        } 
    31973202        lConfigFileName ~= opts.UtilsConfigFile; 
     
    32053210    { 
    32063211        if (opts.Verbose == True) 
    3207             std.stdio.writefln("Configuration file: %s[%s]", lConfigFileName, pArg[1..$]); 
     3212            std.stdio.writefln("%s: Configuration file: %s[%s]", opts.MyName, lConfigFileName, pArg[1..$]); 
    32083213    } 
    32093214 
     
    32613266                { 
    32623267                    if (opts.Verbose == True) 
    3263                         std.stdio.writefln("Configuration file arg: %s", lArg); 
     3268                        std.stdio.writefln("%s: Configuration file arg: %s", opts.MyName, lArg); 
    32643269                } 
    32653270 
     
    33453350                    { 
    33463351                        if (opts.Verbose == True) 
    3347                             std.stdio.writefln("Bad configuration command '%s' ignored.", lArg); 
     3352                            std.stdio.writefln("%s: Bad configuration command '%s' ignored.", opts.MyName, lArg); 
    33483353                    } 
    33493354                } 
     
    33553360} 
    33563361 
    3357 version(BuildVerbose) 
    3358 { 
    33593362void CheckVerbose(string[] pArgs) 
    33603363{ 
    33613364    foreach(string lArg; pArgs) 
    33623365    { 
    3363         if (lArg == "-V") 
    3364             opts.Verbose = True; 
    3365         else if (lArg == "--V") 
    3366             opts.Verbose = False; 
    3367         else if (lArg == "-v") 
    3368             opts.Verbose = True; 
    3369         else if (lArg == "--v") 
    3370             opts.Verbose = False; 
    3371     } 
    3372  
    3373 
    3374 
     3366        switch(lArg) 
     3367        { 
     3368            case "-silent": 
     3369            case "-quiet": 
     3370            { 
     3371                opts.Silent = True; 
     3372                break; 
     3373            } 
     3374            case "--silent": 
     3375            case "--quiet": 
     3376            { 
     3377                opts.Silent = False; 
     3378                break; 
     3379            } 
     3380             
     3381        version(BuildVerbose) 
     3382        { 
     3383            case "-V": 
     3384            case "-v": 
     3385            { 
     3386                opts.Verbose = True; 
     3387                break; 
     3388            } 
     3389            case "--V": 
     3390            case "--v": 
     3391            { 
     3392                opts.Verbose = False; 
     3393                break; 
     3394            } 
     3395        } 
     3396            default: 
     3397                break; 
     3398        } 
     3399    } 
     3400    if (opts.Verbose == True) 
     3401        opts.Silent = False; 
     3402 
     3403
     3404 
    33753405 
    33763406void ReadBuildConfigFile() 
  • trunk/Source/build_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 3200; 
     4long auto_build_number = 3230; 
  • trunk/Source/docsrc/change_log.d

    r52 r53  
    55A list of changes and fixes that have been made. 
    66 
    7 $(SUBSECTION_H ,v3.05 -- 03/September/2007
     7$(SUBSECTION_H ,v3.05 -- 03/March/2008
    88$(LIST 
    99    $(ITEM ** $(B CHG) The utility's configuration file is now $(B mandatory ). 
     
    6161    ) 
    6262    $(ITEM ** $(B ENH) Configuration file entries, 'msg' and 'todo' pragmas, 
    63     and text macro definitions can now have embedded references to 
    64     environment symbols. 
     63    text macro definitions, and macro files can now have embedded references 
     64    to environment symbols. 
     65    ) 
     66    $(ITEM ** $(B ENH) Embedded environment symbols now support three formats, 
     67    $(PC)symname$(PC), $(DOLLAR)$(PAREN symname), $(DOLLAR)$(BRACE symname). 
    6568    ) 
    6669    $(ITEM ** $(B ENH) The default location of Bud's configuration file for 
  • trunk/Source/docsrc/um.d

    r52 r53  
    22 
    33--usage: 
     4   set umform=_html 
    45   build um.d -clean 
    56 
  • trunk/Source/docsrc/user_manual_html.ddoc

    r52 r53  
    3939RP              =) 
    4040LP              =( 
     41PC              =% 
    4142PAREN           =($0) 
    4243BRACE           ={$0} 
  • trunk/Source/opts.d

    r52 r53  
    122122    string    UtilsConfigFile; 
    123123    string    DummyMain; 
     124    string    MyName; 
    124125    string[] CompilerDefs; 
    125126    string[] ModulesToIgnore; 
     
    136137    Bool    UseResponseFile; 
    137138    Bool    Verbose; 
     139    Bool    Silent; 
    138140    Bool    ShortPathNames; 
    139141    Bool    ShowToDo; 
     
    146148{ 
    147149    Verbose = False; 
     150    Silent = False; 
    148151    UseModBaseName = False; 
    149152    ForceCompile = False; 
     
    288291        default: 
    289292        { 
    290             std.stdio.writefln("Set Internal String '%s' ignored ... unknown name.", pCommand); 
     293            if (opts.Silent == False) 
     294                std.stdio.writefln("%s: Set Internal String '%s' ignored ... unknown name.", MyName, pCommand); 
    291295            lRes = 0; 
    292296        } 
  • trunk/Source/opts_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 489
     4long auto_build_number = 511
  • trunk/Source/source.d

    r52 r53  
    179179    debug(1) 
    180180    { 
    181     writefln(__FILE__ ~ " build #%d", source_bn.auto_build_number); 
     181    writefln("%s: " ~ __FILE__ ~ " build #%d", opts.MyName, source_bn.auto_build_number); 
    182182    } 
    183183} 
     
    407407            { 
    408408                if (mFileTime !is null) 
    409                     writefln("Time %s for source %s", mFileTime.toString(), mFileName); 
     409                    writefln("%s: Time %s for source %s", opts.MyName, mFileTime.toString(), mFileName); 
    410410 
    411411                if (mObjectTime !is null) 
    412                     writefln("Time %s for object %s", mObjectTime.toString(), mObjectName); 
     412                    writefln("%s: Time %s for object %s", opts.MyName, mObjectTime.toString(), mObjectName); 
    413413            } 
    414414        } 
     
    423423// -------------------------------------------------------------------- 
    424424    { 
    425         writefln("Finis: %s", mFileName); 
     425        writefln("%s: Finis: %s", opts.MyName, mFileName); 
    426426    } 
    427427} 
     
    452452        { 
    453453            if(opts.Verbose == True) 
    454                 writefln("Scanning %s", ReducePathName(mFileName)); 
     454                writefln("%s: Scanning %s", opts.MyName, ReducePathName(mFileName)); 
    455455        } 
    456456 
     
    480480                    { 
    481481                        if(opts.Verbose == True) 
    482                             writefln("Macro output %s", lNewFile); 
     482                            writefln("%s: Macro output %s", opts.MyName, lNewFile); 
    483483                    } 
    484484                    new Source(lNewFile); 
     
    588588                                { 
    589589                                    if (opts.Verbose == True) 
    590                                         writefln("Ignoring %s (%s: %s)", lNextFile, lType, lNextModule); 
     590                                        writefln("%s: Ignoring %s (%s: %s)", opts.MyName, lNextFile, lType, lNextModule); 
    591591                                } 
    592592 
     
    625625            { 
    626626                if (opts.Verbose == True) 
    627                     writefln("Updating %s dependants time from %s to %s", 
     627                    writefln("%s: Updating %s dependants time from %s to %s", 
     628                                opts.MyName, 
    628629                                mFileName, 
    629630                                mDependantsTime.toString(), 
     
    12111212            { 
    12121213                if (opts.Verbose == True) 
    1213                     writefln("Module name set to '%s'", mModuleName); 
     1214                    writefln("%s: Module name set to '%s'", opts.MyName, mModuleName); 
    12141215            } 
    12151216        } 
     
    13031304                                        GetStringLit(pFileText,pPos, lCurrentToken[0]) 
    13041305                                        ); 
    1305                     if (opts.ShowToDo == True
     1306                    if (opts.ShowToDo == True && opts.Silent == False
    13061307                    { 
    1307                         std.stdio.writefln("%s TODO:%s", FileName, lCurrentToken); 
     1308                        std.stdio.writefln("%s: %s TODO:%s", opts.MyName, FileName, lCurrentToken); 
    13081309                    } 
    13091310 
     
    13371338                { 
    13381339                    lCurrentToken = GetStringLit(pFileText,pPos, lCurrentToken[0]); 
    1339                     std.stdio.writefln("%s", util.str.ExpandEnvVar(lCurrentToken)); 
     1340                    if (opts.Silent == False) 
     1341                        std.stdio.writefln("%s: %s", opts.MyName, util.str.ExpandEnvVar(lCurrentToken)); 
    13401342                    lCurrentToken = GetNextToken(pFileText,pPos); 
    13411343                } 
     
    17151717    { 
    17161718        if(opts.Verbose == True) 
    1717             writefln(" module->file %s => %s",pModuleName,lFileName); 
     1719            writefln("%s: module->file %s => %s", opts.MyName, pModuleName,lFileName); 
    17181720    } 
    17191721    return lFileName; 
     
    17551757    { 
    17561758        if(opts.Verbose == True) 
    1757             writefln(" file->module %s => %s",pFileName,lModuleName); 
     1759            writefln("%s: file->module %s => %s", opts.MyName, pFileName,lModuleName); 
    17581760    } 
    17591761    return lModuleName; 
     
    20532055    { 
    20542056        if (opts.Verbose == True) 
    2055             writefln("Rule Definitions from %s", lRuleDefnFile); 
     2057            writefln("%s: Rule Definitions from %s", opts.MyName, lRuleDefnFile); 
    20562058    } 
    20572059 
     
    21152117        foreach(Rule r; lRules) 
    21162118        { 
    2117             writefln("Rule '%s' ==> in:%s, out:%s, tool:'%s', use_in:'%s', use_out:'%s'", 
    2118                         r.Name, r.Input, r.Output, r.Tool, 
     2119            writefln("%s: Rule '%s' ==> in:%s, out:%s, tool:'%s', use_in:'%s', use_out:'%s'", 
     2120                        opts.MyName, r.Name, r.Input, r.Output, r.Tool, 
    21192121                        vUseNames[r.InUse], vUseNames[r.OutUse] 
    21202122                     ); 
     
    21532155        if (opts.Verbose == True) 
    21542156        { 
    2155             writef("New external file to be built: %s", pPath); 
     2157            writef("%s: New external file to be built: %s", opts.MyName, pPath); 
    21562158            foreach( string lOpt; pOpts) 
    21572159                writef(" `%s`", lOpt); 
     
    22002202                foreach(string k; vActiveVersions.keys) 
    22012203                { 
    2202                     writefln("Active Version: '%s'", k); 
     2204                    writefln("%s: Active Version: '%s'", opts.MyName, k); 
    22032205                } 
    22042206        } 
  • trunk/Source/source_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 2914
     4long auto_build_number = 2933
  • trunk/Source/util/file2_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 921
     4long auto_build_number = 936
  • trunk/Source/util/fileex_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 2721
     4long auto_build_number = 2736
  • trunk/Source/util/linetoken_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 2868
     4long auto_build_number = 2883
  • trunk/Source/util/pathex_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 2745
     4long auto_build_number = 2760
  • trunk/Source/util/str_bn.d

    r52 r53  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 3103
     4long auto_build_number = 3120