Changeset 807

Show
Ignore:
Timestamp:
09/17/07 12:36:47 (1 year ago)
Author:
Gregor
Message:

sss/conf.d: 'include' setting, counter to 'exclude'.

Files:

Legend:

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

    r802 r807  
    88          ticket #128). 
    99        - installdir hook command now manifests properly. 
     10        - 'include' setting, counter to 'exclude' (see ticket #111). 
    1011 
    11120.72 from 0.71: 
  • trunk/docs/README.software_engineers

    r775 r807  
    153153section. 
    154154 
     155You may also explicitly include files in a library with the 'include' setting: 
     156[mydpackage] 
     157include=mydpackage/all.d 
     158 
     159Note that, if 'include' is found, only those files listed in 'include' and 
     160their dependencies will be included. 
     161 
    155162When using GDC on POSIX, it is also possible to build shared libraries (.so 
    156163files). To specify that a shared library should be built, set the 'shared' 
  • trunk/sss/conf.d

    r802 r807  
    768768        return false; 
    769769    } 
     770 
     771    // and inclusion list 
     772    char[][] include; 
     773    if ("include" in settings) { 
     774        // get the dependencies 
     775        files = split(settings["include"]); 
     776        char[][] rawFiles; 
     777        systemResponse(dsss_build ~ "-files -offiles.tmp " ~ settings["include"], 
     778                       "-rf", "temp.rf", true); 
     779        rawFiles = split(cast(char[]) std.file.read("files.tmp")); 
     780        foreach (f; rawFiles) { 
     781            while (f.length && 
     782                   (f[$-1] == '\r' || 
     783                    f[$-1] == '\n')) { 
     784                f = f[0..$-1]; 
     785            } 
     786            if (f.length && f[$-1] != 'i' && f[$-1] != 'I') { 
     787                // the file exists and is not a .di file, so it's part of this build 
     788                files ~= f; 
     789            } 
     790        } 
     791        tryRemove("files.tmp"); 
     792 
     793        // done! 
     794        return files; 
     795    } 
    770796     
    771797    // 2) stomp through the directory adding files