Changeset 760

Show
Ignore:
Timestamp:
08/12/07 03:31:02 (1 year ago)
Author:
Gregor
Message:

sss/conf.d, sss/install.d: dsss install now installs .di files in libraries (see ticket #92).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/ChangeLog

    r759 r760  
    55        - Added 'binstall' subcommand (see ticket #105). 
    66        - Added 'noinstall' setting (see ticket #106). 
     7        - `dsss install` now installs .di files in libraries (see ticket #92). 
    78 
    890.70 from 0.69: 
  • trunk/sss/conf.d

    r756 r760  
    757757 
    758758/** Get a list of files from a target */ 
    759 char[][] targetToFiles(char[] target, DSSSConf conf
     759char[][] targetToFiles(char[] target, DSSSConf conf, bool includeDi = false
    760760in { 
    761761    assert(target in conf.settings); 
     
    806806            // make this the full path 
    807807            file = ndir ~ std.path.sep ~ file; 
     808 
     809            // get the extension 
     810            char[] ext = std.string.tolower(getExt(file)).dup; 
    808811             
    809812            if (isdir(file)) { 
    810813                // perhaps recurse 
    811814                addDir(file); 
    812             } else if (std.string.tolower(getExt(file)) == "d") { 
     815 
     816            } else if (ext == "d") { 
    813817                // or just add it 
    814818                if (!excluded(file)) { 
     819                    files ~= file; 
     820                } 
     821 
     822            } else if (ext == "di") { 
     823                // only add .di files if we should 
     824                if (includeDi) { 
    815825                    files ~= file; 
    816826                } 
  • trunk/sss/install.d

    r759 r760  
    143143            } 
    144144             
    145             // 2) generate .di files 
    146             char[][] srcFiles = targetToFiles(build, conf); 
     145            // 2) install generated .di files 
     146            char[][] srcFiles = targetToFiles(build, conf, true); 
    147147            foreach (file; srcFiles) { 
    148                 // install the .di file 
    149                 copyAndManifest(getBaseName(file ~ "i"), 
    150                                 includePrefix ~ std.path.sep ~ getDirName(file), 
    151                                 "dsss_imports" ~ std.path.sep ~ getDirName(file) ~ std.path.sep); 
     148                // if it's already a .di file, this is simpler 
     149                if (std.string.tolower(getExt(file)) == "di") { 
     150                    copyAndManifest(getBaseName(file), 
     151                                    includePrefix ~ std.path.sep ~ getDirName(file), 
     152                                    getDirName(file) ~ std.path.sep); 
     153 
     154                } else { 
     155                    // install the generated .di file 
     156                    copyAndManifest(getBaseName(file ~ "i"), 
     157                                    includePrefix ~ std.path.sep ~ getDirName(file), 
     158                                    "dsss_imports" ~ std.path.sep ~ getDirName(file) ~ std.path.sep); 
     159                } 
    152160            } 
    153161             
     
    165173                   (type == "library" && !libsSafe())) { 
    166174            // also fairly easy 
    167             char[][] srcFiles = targetToFiles(build, conf); 
     175            char[][] srcFiles = targetToFiles(build, conf, true); 
    168176            foreach (file; srcFiles) { 
    169177                char[] fdir = getDirName(file);