Changeset 768

Show
Ignore:
Timestamp:
08/15/07 00:02:29 (1 year ago)
Author:
Gregor
Message:

sss/main.d, sss/install.d: Added --config file for testing alternative dsss.conf's (see ticket

#109).

Files:

Legend:

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

    r766 r768  
    1212        - Rebuild: Fixed a crash bug with the highly-uncommon pragmas 
    1313          containing declarations (see ticket #117). 
     14        - Added --config file for testing alternative dsss.conf's (see ticket 
     15          #109). 
    1416 
    15170.70 from 0.69: 
  • trunk/sss/install.d

    r760 r768  
    3939 
    4040/** Entry into the "install" command */ 
    41 int install(char[][] buildElems, char[] pname = null, char[][]* subManifest = null) 
     41int install(char[][] buildElems, DSSSConf conf = null, char[] pname = null, char[][]* subManifest = null) 
    4242{ 
    4343    // get the configuration 
    44     DSSSConf conf = readConfig(buildElems); 
     44    if (conf is null) 
     45        conf = readConfig(buildElems); 
    4546     
    4647    // get the corresponding sources 
     
    189190            char[] origcwd = getcwd(); 
    190191            chdir(build); 
    191             int installret = install(null, pname, &manifest); 
     192            int installret = install(null, null, pname, &manifest); 
    192193            if (installret) return installret; 
    193194            chdir(origcwd); 
  • trunk/sss/main.d

    r757 r768  
    7373    /** Elements to build/install/something */ 
    7474    char[][] buildElems; 
     75 
     76    /** Overridden dsss.conf to use */ 
     77    char[] useDSSSConf = null; 
     78 
     79    char[] val; 
    7580     
    7681    for (int i = 1; i < args.length; i++) { 
     
    110115                usage(); 
    111116                return 0; 
     117 
     118            } else if (parseArg(arg, "config", true, &val)) { 
     119                useDSSSConf = val.dup; 
    112120                 
    113121            } else if (arg == "build") { 
     
    159167        } else { 
    160168            /* generic options */ 
    161             char[] val; 
    162169            if (argIsHelp()) { 
    163170                usage(); 
     
    260267            "lib "; 
    261268    } 
     269 
     270    // if a specific dsss.conf file was requested, use it 
     271    DSSSConf conf = null; 
     272    if (useDSSSConf != "") { 
     273        writefln("WARNING: The --config option is only recommended for testing, and should NOT be"); 
     274        writefln("         a part of your general build routine."); 
     275        conf = readConfig(buildElems, false, useDSSSConf); 
     276    } 
    262277     
    263278    switch (command) { 
    264279        case cmd_t.BUILD: 
    265             return sss.build.build(buildElems); 
     280            return sss.build.build(buildElems, conf); 
    266281            break; 
    267282             
    268283        case cmd_t.CLEAN: 
    269             return sss.clean.clean(); 
     284            return sss.clean.clean(conf); 
    270285            break; 
    271286             
    272287        case cmd_t.DISTCLEAN: 
    273             return sss.clean.distclean(); 
     288            return sss.clean.distclean(conf); 
    274289            break; 
    275290             
    276291        case cmd_t.INSTALL: 
    277             return sss.install.install(buildElems); 
     292            return sss.install.install(buildElems, conf); 
    278293            break; 
    279294 
    280295        case cmd_t.BINSTALL: 
    281296        { 
    282             int bret = sss.build.build(buildElems); 
     297            int bret = sss.build.build(buildElems, conf); 
    283298            if (bret) return bret; 
    284             return sss.install.install(buildElems); 
     299            return sss.install.install(buildElems, conf); 
    285300            break; 
    286301        } 
     
    325340  DSSS Options: 
    326341    --help|-h: Display this help. 
     342    --config=<alternative dsss.conf file>: Should be used for testing only. 
    327343  Commands: 
    328344    build:     build all or some binaries or libraries 
     
    401417     
    402418    writefln( 
    403 `  Generic options (must proceed the command): 
     419`  Generic options (must come after the command): 
    404420    --help: display specific options and information 
    405421    --prefix=<prefix>: set the install prefix