Changeset 57

Show
Ignore:
Timestamp:
07/04/09 23:01:09 (3 years ago)
Author:
Derek Parnell
Message:

* Allow multiple LINKSWITCH configuration commands to be supplied.
* Added LIBSWITCH and COMPSWITCH configuration commands.
* Added DiExtension? configuration option to remove hardcoded "di"
* Replaced hardcoded "ddoc" with DdocExtension? option value.
* Added default 'bud.cfg' file
* Removed example config files

Files:

Legend:

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

    r56 r57  
    33823382                else if (util.str.begins(lArg, "LINKSWITCH=") == True) 
    33833383                { 
    3384                     opts.LinkerDefs = lArg[11..$]; 
     3384                    if (opts.LinkerDefs.length > 0) 
     3385                        opts.LinkerDefs ~= " "; 
     3386                         
     3387                    opts.LinkerDefs ~= lArg[11..$]; 
     3388                    lCmdCnt += 1; 
     3389                } 
     3390                else if (util.str.begins(lArg, "LIBSWITCH=") == True) 
     3391                { 
     3392                    if (opts.LibrarianOpts.length > 0) 
     3393                        opts.LibrarianOpts ~= " "; 
     3394                         
     3395                    opts.LibrarianOpts ~= lArg[10..$]; 
     3396                    lCmdCnt += 1; 
     3397                } 
     3398                else if (util.str.begins(lArg, "COMPSWITCH=") == True) 
     3399                { 
     3400                    vCompilerArgs ~= lArg[11..$]; 
    33853401                    lCmdCnt += 1; 
    33863402                } 
  • trunk/Source/build_bn.d

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

    r55 r57  
    6969    string    MacroExtension; 
    7070    string    DdocExtension; 
     71    string    DiExtension; 
    7172    string    LinkerStdOut; 
    7273    string    RDFName; 
     
    202203        case "macroextension"  : { MacroExtension   = lValue; break; } 
    203204        case "ddocextension"   : { DdocExtension    = lValue; break; } 
     205        case "diextension"     : { DiExtension      = lValue; break; } 
    204206        case "compilerexe"     : { CompilerExe      = lValue; break; } 
    205207        case "compileonly"     : { CompileOnly      = lValue; break; } 
  • trunk/Source/opts_bn.d

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

    r55 r57  
    429429        } 
    430430 
    431         if (std.path.getExt(pFileName) != "ddoc"
     431        if (std.path.getExt(pFileName) != opts.DdocExtension
    432432        { 
    433433            string lAltName; 
    434             mNoLink = (std.path.getExt(pFileName) == "di"); 
     434            mNoLink = (std.path.getExt(pFileName) == opts.DiExtension); 
    435435            mModuleName = FileToModulename(pFileName, lAltName); 
    436             lObjectName = addExt(pFileName,opts.ObjExtension); 
     436            lObjectName = addExt(pFileName, opts.ObjExtension); 
    437437            mObjectName = ReducePathName(ExpandPathName(lObjectName, False)); 
    438438        } 
     
    445445        } 
    446446 
    447         /* If a specific path for object files has been supplied 
    448            on the command line, and the current source file is 
    449            relative to the current directory, then we need to 
    450            prepend the specified object location path. 
    451         */ 
    452         if (ObjWritePath.length != 0 && mObjectName.length != 0) 
    453         { 
    454             if (mObjectName == lObjectName) 
    455             { 
    456                 mObjectName = ObjWritePath ~ std.path.getBaseName(mObjectName); 
    457                 util.pathex.MakePath(mObjectName); 
    458             } 
    459         } 
    460  
    461447        if (opts.UseModBaseName == True) 
    462448        { 
    463449            mObjectName = getBaseName(mObjectName); 
    464450        } 
     451        else 
     452        { 
     453            /* If a specific path for object files has been supplied 
     454               on the command line, and the current source file is 
     455               relative to the current directory, then we need to 
     456               prepend the specified object location path. 
     457            */ 
     458            if (ObjWritePath.length != 0 && mObjectName.length != 0) 
     459            { 
     460                if (mObjectName == lObjectName) 
     461                { 
     462                    mObjectName = ObjWritePath ~ std.path.getBaseName(mObjectName); 
     463                    util.pathex.MakePath(mObjectName); 
     464                } 
     465            } 
     466        }    
    465467 
    466468        mBuildNumber = -1; 
     
    536538        } 
    537539 
    538         if (std.path.getExt(mFileName) != "ddoc"
     540        if (std.path.getExt(mFileName) != opts.DdocExtension
    539541        { 
    540542            // Grab the original text, which must exist. 
     
    15241526                        pPos = lSavedPos; 
    15251527                    } 
    1526                     if (std.string.tolower(std.path.getExt(lCurrentToken)) == "ddoc"
     1528                    if (std.string.tolower(std.path.getExt(lCurrentToken)) == opts.DdocExtension
    15271529                    { 
    15281530                        mReferencedImports ~= lCurrentToken.dup; 
  • trunk/Source/source_bn.d

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

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

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

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

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

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