Changeset 53
- Timestamp:
- 03/03/08 07:39:48 (4 years ago)
- Files:
-
- trunk/Source/build.d (modified) (74 diffs)
- trunk/Source/build_bn.d (modified) (1 diff)
- trunk/Source/docsrc/change_log.d (modified) (2 diffs)
- trunk/Source/docsrc/um.d (modified) (1 diff)
- trunk/Source/docsrc/user_manual_html.ddoc (modified) (1 diff)
- trunk/Source/opts.d (modified) (4 diffs)
- trunk/Source/opts_bn.d (modified) (1 diff)
- trunk/Source/source.d (modified) (16 diffs)
- trunk/Source/source_bn.d (modified) (1 diff)
- trunk/Source/util/file2_bn.d (modified) (1 diff)
- trunk/Source/util/fileex_bn.d (modified) (1 diff)
- trunk/Source/util/linetoken_bn.d (modified) (1 diff)
- trunk/Source/util/pathex_bn.d (modified) (1 diff)
- trunk/Source/util/str_bn.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/build.d
r52 r53 7 7 Initial Creation: January 2005 8 8 Version: 3.05 9 Date: September 20079 Date: 03 March 2008 10 10 License: 11 11 This software is provided 'as-is', without any express or implied … … 113 113 this(string pMsg) 114 114 { 115 super ( vMyName ~ ":" ~ pMsg);115 super (opts.MyName ~ ":" ~ pMsg); 116 116 } 117 117 } … … 132 132 Bool vScanImports; 133 133 Bool vNoLink; 134 Bool vSilent;135 134 Bool vSymbols; 136 135 Bool vCleanup; … … 155 154 LibOpt vLibraryAction = LibOpt.Implicit; 156 155 string vMyPath; 157 string vMyName;158 156 string vMyDir; 159 157 string vTargetName; // Output name from first file name. … … 191 189 vUseFinal = True; 192 190 vEmptyArgs = True; 193 vSilent = False;194 191 vCleanup = False; 195 192 vMacroInput = True; … … 224 221 //------------------------------------------------------- 225 222 { 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 231 231 if (pFull == false) 232 232 return; 233 else {233 234 234 235 235 std.stdio.writefln( 236 236 "Usage: %s sourcefile [options objectfiles libraries]" 237 , vMyName);237 , opts.MyName); 238 238 std.stdio.writefln(" sourcefile D source file"); 239 239 std.stdio.writefln(" -v Verbose (passed through to D)"); … … 321 321 std.stdio.writefln(" -? Same as -help, displays the full 'usage' help text."); 322 322 std.stdio.writefln(" -silent Avoids unnecessary messages being displayed."); 323 std.stdio.writefln(" -quiet Same as -silent"); 323 324 std.stdio.writefln(" -noautoimport Turns off the automatic addition of source paths"); 324 325 std.stdio.writefln(" to the list of Import Roots."); … … 347 348 std.stdio.writefln(" build looks for a file called 'build.brf'"); 348 349 } 349 } 350 350 351 351 352 // Scans all known source files and extacts any modules. … … 373 374 { 374 375 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, 376 377 source.ReducePathName(lSource.FileName)); 377 378 } 378 379 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)); 380 381 } 381 382 } else { 382 383 if(vNames == True) { 383 std.stdio.writefln(" [ %s ]", source.ReducePathName(lSource.FileName));384 std.stdio.writefln("%s: [ %s ]", opts.MyName, source.ReducePathName(lSource.FileName)); 384 385 } 385 386 } … … 390 391 { 391 392 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, 393 394 lModsTime.toString(), 394 395 lSource.DependantsTime.toString() … … 411 412 { 412 413 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, 414 415 source.ReducePathName(lFileName), lLinkTime.toString()); 415 416 } 416 417 else if(vNames == True) { 417 std.stdio.writefln(" [ %s ]", source.ReducePathName(lFileName));418 std.stdio.writefln("%s: [ %s ]", opts.MyName, source.ReducePathName(lFileName)); 418 419 } 419 420 } else { 420 421 if(vNames == True) { 421 std.stdio.writefln(" [ %s ]", source.ReducePathName(lFileName));422 std.stdio.writefln("%s: [ %s ]", opts.MyName, source.ReducePathName(lFileName)); 422 423 } 423 424 } … … 427 428 { 428 429 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, 430 431 lModsTime.toString(), 431 432 lLinkTime.toString() … … 448 449 if (opts.TestRun == True) 449 450 { 450 std.stdio.writefln(" Generated command: '%s'",pCommand);451 std.stdio.writefln("%s: Generated command: '%s'", opts.MyName, pCommand); 451 452 return 1; // Don't run the command 452 453 } … … 456 457 { 457 458 if(opts.Verbose == True) 458 std.stdio.writefln(" Running '%s'",pCommand);459 std.stdio.writefln("%s: Running '%s'",opts.MyName, pCommand); 459 460 } 460 461 return 0; // Continue with the command. … … 469 470 if (pRC == 0) 470 471 { 471 std.stdio.writefln(" Successful");472 std.stdio.writefln("%s: Successful", opts.MyName); 472 473 } else { 473 std.stdio.writefln(" Failed. Return code: %04x",pRC);474 std.stdio.writefln("%s: Failed. Return code: %04x", opts.MyName, pRC); 474 475 } 475 476 } … … 523 524 { 524 525 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); 526 527 } 527 528 … … 533 534 version(BuildVerbose) 534 535 { 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); 537 538 } 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); 540 541 } 541 542 lFullFile.length = 0; … … 600 601 { 601 602 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)); 603 604 } 604 605 … … 614 615 { 615 616 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); 617 618 } 618 619 } … … 663 664 { 664 665 if((opts.Verbose == True) || (vNames == True) ) 665 std.stdio.writefln("\n Building target '%s'", lTargetName);666 std.stdio.writefln("\n%s: Building target '%s'", opts.MyName, lTargetName); 666 667 } 667 668 … … 677 678 { 678 679 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()); 681 682 } 682 683 } … … 691 692 { 692 693 if((opts.Verbose == True) || (vNames == True) ) 693 std.stdio.writefln("\n Compiling only. No target will be built.");694 std.stdio.writefln("\n%s: Compiling only. No target will be built.", opts.MyName); 694 695 } else { 695 696 if(vNames == True) 696 std.stdio.writefln("\n Compiling only. No target will be built.");697 std.stdio.writefln("\n%s: Compiling only. No target will be built.", opts.MyName); 697 698 } 698 699 } … … 762 763 { 763 764 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); 765 766 } 766 767 … … 771 772 { 772 773 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, 774 776 lShortFileName); 775 777 } … … 797 799 { 798 800 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, 801 804 lCurrentSource.ModuleName); 802 805 } … … 816 819 if( lBuildRequired == False ) 817 820 { 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); 820 823 return 0; 821 824 } … … 922 925 { 923 926 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); 925 928 } 926 929 … … 1023 1026 { 1024 1027 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); 1026 1029 } 1027 1030 util.str.SetEnv("LIB",opts.LibPaths); … … 1099 1102 { 1100 1103 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); 1102 1105 } 1103 1106 … … 1166 1169 { 1167 1170 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); 1169 1172 } 1170 1173 1171 1174 // Run Linker 1172 if ( vSilent == True)1175 if (opts.Silent == True) 1173 1176 { 1174 1177 lCommand ~= " " ~ opts.LinkerStdOut; … … 1183 1186 else 1184 1187 { 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); 1187 1190 lRunResult = 0; 1188 1191 } … … 1263 1266 { 1264 1267 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); 1266 1269 } 1267 1270 … … 1278 1281 { 1279 1282 if (opts.Verbose == True) 1280 std.stdio.writefln(" Cleaning up ...");1283 std.stdio.writefln("%s: Cleaning up ...", opts.MyName); 1281 1284 } 1282 1285 … … 1315 1318 { 1316 1319 if (opts.Verbose == True) 1317 std.stdio.writefln(" removing %s", lFilename);1320 std.stdio.writefln("%s: removing %s", opts.MyName, lFilename); 1318 1321 } 1319 1322 std.file.remove(lFilename); … … 1470 1473 { 1471 1474 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 ); 1474 1478 } 1475 1479 } … … 1601 1605 { 1602 1606 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); 1604 1608 } 1605 1609 … … 1679 1683 { 1680 1684 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); 1682 1686 } 1683 1687 lTextLines = util.fileex.GetTextLines(lConfigPath, util.fileex.GetOpt.Exists); … … 1695 1699 { 1696 1700 if (opts.Verbose == True) 1697 std.stdio.writefln(" Line %d: %s", i+1, lText);1701 std.stdio.writefln(" Line %d: %s", i+1, lText); 1698 1702 } 1699 1703 … … 1747 1751 { 1748 1752 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); 1750 1754 } 1751 1755 continue; … … 1814 1818 if(opts.Verbose == True) 1815 1819 { 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); 1818 1822 } 1819 1823 } … … 1827 1831 if (pList.length > 0) { 1828 1832 if (pTitle.length > 0) 1829 std.stdio.writefln("\n%s ",pTitle);1833 std.stdio.writefln("\n%s: %s", opts.MyName, pTitle); 1830 1834 1831 1835 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); 1833 1837 } 1834 1838 } … … 1841 1845 if (pList.length > 0) { 1842 1846 if (pTitle.length > 0) 1843 std.stdio.writefln("\n%s ",pTitle);1847 std.stdio.writefln("\n%s:%s", opts.MyName, pTitle); 1844 1848 1845 1849 foreach(int lIndex, source.ExternRef lListEntry; pList) 1846 1850 { 1847 std.stdio.writef(" [%2d]: %s", lIndex,lListEntry.FilePath);1851 std.stdio.writef(" [%2d]: %s", opts.MyName, lIndex, lListEntry.FilePath); 1848 1852 if (lListEntry.ToolOpts.length > 0) 1849 1853 foreach(string lOpt; lListEntry.ToolOpts) 1850 std.stdio.writef(" [%s]", lOpt);1854 std.stdio.writef(" [%s]", opts.MyName, lOpt); 1851 1855 std.stdio.writefln(""); 1852 1856 } … … 1860 1864 if (pList.length > 0) { 1861 1865 if (pTitle.length > 0) 1862 std.stdio.writefln("\n%s ",pTitle);1866 std.stdio.writefln("\n%s: %s", opts.MyName, pTitle); 1863 1867 1864 1868 foreach(int lIndex, CmdLineArg lListEntry; pList) … … 2043 2047 // Strip off application's path from arglist. 2044 2048 vMyPath = pArgs[0]; 2045 vMyName = std.path.getBaseName(vMyPath);2049 opts.MyName = std.path.getBaseName(vMyPath); 2046 2050 vMyDir = std.path.getDirName(vMyPath); 2047 2051 util.str.SetEnv("@S", vMyDir); … … 2049 2053 pArgs=pArgs[1..pArgs.length]; 2050 2054 2051 version(BuildVerbose)CheckVerbose(pArgs);2055 CheckVerbose(pArgs); 2052 2056 2053 2057 { … … 2059 2063 ReadBuildConfigFile(); 2060 2064 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; 2064 2068 } 2065 2069 … … 2128 2132 { 2129 2133 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()); 2131 2135 } else { 2132 2136 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()); 2134 2138 } 2135 2139 … … 2139 2143 { 2140 2144 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); 2143 2147 } 2144 2148 } … … 2165 2169 { 2166 2170 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); 2168 2172 } 2169 2173 … … 2194 2198 if (! util.file2.FileExists( GetFullPathname(lFile, vSourceScanList)) ) 2195 2199 { 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); 2198 2202 lAllExist = false; 2199 2203 } … … 2278 2282 else 2279 2283 { 2280 std.stdio.writefln(" Modules: %s", vSymbolOutName);2284 std.stdio.writefln("%s: Modules: %s", opts.MyName, vSymbolOutName); 2281 2285 } 2282 2286 } … … 2320 2324 else 2321 2325 { 2322 std.stdio.writefln(" Uses: %s", vUsesOutput);2326 std.stdio.writefln("%s: Uses: %s", opts.MyName, vUsesOutput); 2323 2327 } 2324 2328 … … 2372 2376 { 2373 2377 if (opts.Verbose == True) 2374 std.stdio.writefln(" Response file %s", lRespFileName);2378 std.stdio.writefln("%s: Response file %s", opts.MyName, lRespFileName); 2375 2379 } 2376 2380 … … 2392 2396 { 2393 2397 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); 2395 2399 } 2396 2400 GatherOneArg( lArg, vCombinedArgs ); … … 2485 2489 case "-nounittest": 2486 2490 // 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); 2489 2493 break; 2490 2494 … … 2495 2499 2496 2500 case "-silent": 2497 vSilent = True; 2501 case "-quiet": 2502 // Already dealt with. 2498 2503 // Not passed thru. 2499 2504 break; … … 2640 2645 { 2641 2646 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); 2643 2648 } 2644 2649 opts.CompilerPath = lNewPath; … … 2656 2661 { 2657 2662 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); 2659 2664 } 2660 2665 opts.OverrideConfigPath = lNewPath; … … 2672 2677 { 2673 2678 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); 2675 2680 } 2676 2681 opts.CFGPath = lNewPath; … … 2685 2690 { 2686 2691 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); 2688 2693 } 2689 2694 … … 2700 2705 { 2701 2706 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..$]); 2703 2708 } 2704 2709 … … 2713 2718 { 2714 2719 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..$]); 2716 2721 } 2717 2722 … … 2738 2743 { 2739 2744 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); 2741 2746 } 2742 2747 } … … 2822 2827 { 2823 2828 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); 2825 2830 } 2826 2831 } … … 2911 2916 { 2912 2917 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); 2914 2919 } 2915 2920 } … … 2968 2973 { 2969 2974 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); 2971 2976 } 2972 2977 } … … 3114 3119 if (opts.Verbose == True) 3115 3120 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); 3117 3122 } 3118 3123 … … 3126 3131 foreach(string lMsg; lMessages) 3127 3132 { 3128 std.stdio.writefln("%s ", lMsg);3133 std.stdio.writefln("%s: %s", opts.MyName, lMsg); 3129 3134 } 3130 3135 } … … 3157 3162 lCmdCnt += ProcessOneBuildConfig(pArg, vMyDir ~ "/../etc", pArgGroup); 3158 3163 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); 3161 3166 } 3162 3167 … … 3193 3198 if (opts.UtilsConfigFile.length == 0) 3194 3199 { 3195 opts.UtilsConfigFile = util.pathex.GetBaseName( vMyName) ~ ".cfg";3200 opts.UtilsConfigFile = util.pathex.GetBaseName(opts.MyName) ~ ".cfg"; 3196 3201 } 3197 3202 lConfigFileName ~= opts.UtilsConfigFile; … … 3205 3210 { 3206 3211 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..$]); 3208 3213 } 3209 3214 … … 3261 3266 { 3262 3267 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); 3264 3269 } 3265 3270 … … 3345 3350 { 3346 3351 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); 3348 3353 } 3349 3354 } … … 3355 3360 } 3356 3361 3357 version(BuildVerbose)3358 {3359 3362 void CheckVerbose(string[] pArgs) 3360 3363 { 3361 3364 foreach(string lArg; pArgs) 3362 3365 { 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 3375 3405 3376 3406 void ReadBuildConfigFile() trunk/Source/build_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 32 00;4 long auto_build_number = 3230; trunk/Source/docsrc/change_log.d
r52 r53 5 5 A list of changes and fixes that have been made. 6 6 7 $(SUBSECTION_H ,v3.05 -- 03/ September/2007)7 $(SUBSECTION_H ,v3.05 -- 03/March/2008 ) 8 8 $(LIST 9 9 $(ITEM ** $(B CHG) The utility's configuration file is now $(B mandatory ). … … 61 61 ) 62 62 $(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). 65 68 ) 66 69 $(ITEM ** $(B ENH) The default location of Bud's configuration file for trunk/Source/docsrc/um.d
r52 r53 2 2 3 3 --usage: 4 set umform=_html 4 5 build um.d -clean 5 6 trunk/Source/docsrc/user_manual_html.ddoc
r52 r53 39 39 RP =) 40 40 LP =( 41 PC =% 41 42 PAREN =($0) 42 43 BRACE ={$0} trunk/Source/opts.d
r52 r53 122 122 string UtilsConfigFile; 123 123 string DummyMain; 124 string MyName; 124 125 string[] CompilerDefs; 125 126 string[] ModulesToIgnore; … … 136 137 Bool UseResponseFile; 137 138 Bool Verbose; 139 Bool Silent; 138 140 Bool ShortPathNames; 139 141 Bool ShowToDo; … … 146 148 { 147 149 Verbose = False; 150 Silent = False; 148 151 UseModBaseName = False; 149 152 ForceCompile = False; … … 288 291 default: 289 292 { 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); 291 295 lRes = 0; 292 296 } trunk/Source/opts_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 489;4 long auto_build_number = 511; trunk/Source/source.d
r52 r53 179 179 debug(1) 180 180 { 181 writefln( __FILE__ ~ " build #%d", source_bn.auto_build_number);181 writefln("%s: " ~ __FILE__ ~ " build #%d", opts.MyName, source_bn.auto_build_number); 182 182 } 183 183 } … … 407 407 { 408 408 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); 410 410 411 411 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); 413 413 } 414 414 } … … 423 423 // -------------------------------------------------------------------- 424 424 { 425 writefln(" Finis: %s", mFileName);425 writefln("%s: Finis: %s", opts.MyName, mFileName); 426 426 } 427 427 } … … 452 452 { 453 453 if(opts.Verbose == True) 454 writefln(" Scanning %s", ReducePathName(mFileName));454 writefln("%s: Scanning %s", opts.MyName, ReducePathName(mFileName)); 455 455 } 456 456 … … 480 480 { 481 481 if(opts.Verbose == True) 482 writefln(" Macro output %s", lNewFile);482 writefln("%s: Macro output %s", opts.MyName, lNewFile); 483 483 } 484 484 new Source(lNewFile); … … 588 588 { 589 589 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); 591 591 } 592 592 … … 625 625 { 626 626 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, 628 629 mFileName, 629 630 mDependantsTime.toString(), … … 1211 1212 { 1212 1213 if (opts.Verbose == True) 1213 writefln(" Module name set to '%s'", mModuleName);1214 writefln("%s: Module name set to '%s'", opts.MyName, mModuleName); 1214 1215 } 1215 1216 } … … 1303 1304 GetStringLit(pFileText,pPos, lCurrentToken[0]) 1304 1305 ); 1305 if (opts.ShowToDo == True )1306 if (opts.ShowToDo == True && opts.Silent == False) 1306 1307 { 1307 std.stdio.writefln("%s TODO:%s", FileName, lCurrentToken);1308 std.stdio.writefln("%s: %s TODO:%s", opts.MyName, FileName, lCurrentToken); 1308 1309 } 1309 1310 … … 1337 1338 { 1338 1339 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)); 1340 1342 lCurrentToken = GetNextToken(pFileText,pPos); 1341 1343 } … … 1715 1717 { 1716 1718 if(opts.Verbose == True) 1717 writefln(" module->file %s => %s",pModuleName,lFileName);1719 writefln("%s: module->file %s => %s", opts.MyName, pModuleName,lFileName); 1718 1720 } 1719 1721 return lFileName; … … 1755 1757 { 1756 1758 if(opts.Verbose == True) 1757 writefln(" file->module %s => %s",pFileName,lModuleName);1759 writefln("%s: file->module %s => %s", opts.MyName, pFileName,lModuleName); 1758 1760 } 1759 1761 return lModuleName; … … 2053 2055 { 2054 2056 if (opts.Verbose == True) 2055 writefln(" Rule Definitions from %s", lRuleDefnFile);2057 writefln("%s: Rule Definitions from %s", opts.MyName, lRuleDefnFile); 2056 2058 } 2057 2059 … … 2115 2117 foreach(Rule r; lRules) 2116 2118 { 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, 2119 2121 vUseNames[r.InUse], vUseNames[r.OutUse] 2120 2122 ); … … 2153 2155 if (opts.Verbose == True) 2154 2156 { 2155 writef(" New external file to be built: %s", pPath);2157 writef("%s: New external file to be built: %s", opts.MyName, pPath); 2156 2158 foreach( string lOpt; pOpts) 2157 2159 writef(" `%s`", lOpt); … … 2200 2202 foreach(string k; vActiveVersions.keys) 2201 2203 { 2202 writefln(" Active Version: '%s'", k);2204 writefln("%s: Active Version: '%s'", opts.MyName, k); 2203 2205 } 2204 2206 } trunk/Source/source_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 29 14;4 long auto_build_number = 2933; trunk/Source/util/file2_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 9 21;4 long auto_build_number = 936; trunk/Source/util/fileex_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 27 21;4 long auto_build_number = 2736; trunk/Source/util/linetoken_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 28 68;4 long auto_build_number = 2883; trunk/Source/util/pathex_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 27 45;4 long auto_build_number = 2760; trunk/Source/util/str_bn.d
r52 r53 2 2 // This file is automatically maintained by the BUILD utility, 3 3 // Please refrain from manually editing it. 4 long auto_build_number = 31 03;4 long auto_build_number = 3120;
