Changeset 56

Show
Ignore:
Timestamp:
07/03/09 19:49:35 (3 years ago)
Author:
Derek Parnell
Message:

* Now honours the compiler path supplied in the -DCPATH switch. This overrides searching the PATH symbol.

Files:

Legend:

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

    r55 r56  
    12411241                if (lFullFileName.length > 1 + opts.SrcExtension.length) 
    12421242                { 
    1243                     if (lFullFileName[$-opts.SrcExtension.length .. $] == opts.SrcExtension) 
    1244                     { 
    1245                         lFullFileName = lFullFileName[0..$-opts.SrcExtension.length] ~ opts.ObjExtension; 
     1243                    if (lFullFileName[$ - opts.SrcExtension.length .. $] == opts.SrcExtension) 
     1244                    { 
     1245                        lFullFileName = lFullFileName[0..$ - opts.SrcExtension.length] ~ opts.ObjExtension; 
    12461246                    } 
    12471247                } 
     
    20932093        opts.CompilerExe = util.pathex.ReplaceExtension(opts.CompilerExe, opts.ExeExtension); 
    20942094    } 
    2095     // Scan the PATH symbol directories. 
    2096     lCompPath = util.pathex.FindFileInPathList(opts.PathId, opts.CompilerExe); 
    2097  
    2098     if (lCompPath.length > 0) 
    2099     { 
    2100         // Found it, so ensure it ends with a path separator. 
    2101         if (lCompPath[length-1] != std.path.sep[0]) 
    2102             lCompPath ~= std.path.sep; 
    2103         // Save it and set the special env symbol for it. 
    2104         opts.CompilerPath = lCompPath; 
    2105         util.str.SetEnv("@D", std.path.getDirName(opts.CompilerPath)); 
    2106     } 
    2107  
     2095     
    21082096    if (opts.CompilerPath.length == 0) 
    21092097    { 
    2110         // Not found the compiler, so assume current directory. 
    2111         opts.CompilerPath = util.pathex.GetInitCurDir; 
    2112         util.str.SetEnv("@D", std.path.getDirName(opts.CompilerPath)); 
    2113         version(BuildVerbose) lSetPath = true; 
    2114     } 
    2115  
     2098        // Scan the PATH symbol directories. 
     2099        lCompPath = util.pathex.FindFileInPathList(opts.PathId, opts.CompilerExe); 
     2100     
     2101        if (lCompPath.length > 0) 
     2102        { 
     2103            // Found it, so ensure it ends with a path separator. 
     2104            if (lCompPath[length-1] != std.path.sep[0]) 
     2105                lCompPath ~= std.path.sep; 
     2106            // Save it and set the special env symbol for it. 
     2107            opts.CompilerPath = lCompPath; 
     2108        } 
     2109 
     2110        if (opts.CompilerPath.length == 0) 
     2111        { 
     2112            // Not found the compiler, so assume current directory. 
     2113            opts.CompilerPath = util.pathex.GetInitCurDir; 
     2114            version(BuildVerbose) lSetPath = true; 
     2115        } 
     2116    } 
     2117    util.str.SetEnv("@D", std.path.getDirName(opts.CompilerPath)); 
     2118     
    21162119    // Preload import roots from the current directory.     
    21172120    { 
  • trunk/Source/build_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 3396
     4long auto_build_number = 3403
  • trunk/Source/opts_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 657
     4long auto_build_number = 664
  • trunk/Source/source_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 3097
     4long auto_build_number = 3104
  • trunk/Source/util/file2_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 1079
     4long auto_build_number = 1086
  • trunk/Source/util/fileex_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 2892
     4long auto_build_number = 2899
  • trunk/Source/util/linetoken_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 3013
     4long auto_build_number = 3020
  • trunk/Source/util/pathex_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 2935
     4long auto_build_number = 2942
  • trunk/Source/util/str_bn.d

    r55 r56  
    22// This file is automatically maintained by the BUILD utility, 
    33// Please refrain from manually editing it. 
    4 long auto_build_number = 3255
     4long auto_build_number = 3262