Changeset 845
- Timestamp:
- 12/01/07 00:06:03 (10 months ago)
- Files:
-
- trunk/docs/ChangeLog (modified) (1 diff)
- trunk/docs/README.software_engineers (modified) (1 diff)
- trunk/sss/build.d (modified) (3 diffs)
- trunk/sss/conf.d (modified) (1 diff)
- trunk/test/bin/bin.d (modified) (1 diff)
- trunk/test/bin/dsss.conf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docs/ChangeLog
r844 r845 10 10 - DSSS will no longer try to build if no config file is specified and 11 11 no file are specified on the command line. 12 - Auxiliary builds of binaries are now allowed with names e.g. 13 [main.d+feature] (see ticket #153). 12 14 13 15 0.73 from 0.72: trunk/docs/README.software_engineers
r811 r845 123 123 target=example_binary 124 124 125 A single source file can be used to build multiple binaries, but they must be 126 given different section names. To allow this, section names may have a '+' 127 character, then any descriptive name appended. For example: 128 [example.d+withfeature] 129 target=example_binary_withfeature 130 buildflags=-version=withfeature 131 125 132 Windows users: Be careful not to set the target of a binary build to the name of 126 133 a directory. This will work on Windows because it gains the .exe suffix, but trunk/sss/build.d
r800 r845 326 326 327 327 // basic info 328 char[] bfile = build; 328 329 char[] type = settings["type"]; 329 330 char[] target = settings["target"]; 331 int bfileplus = std.string.find(bfile, '+'); 332 if (bfileplus != -1) { 333 bfile = bfile[0..bfileplus]; 334 } 330 335 331 336 if (type == "binary") { … … 350 355 351 356 // output what we're building 352 writefln("%s => %s", b uild, target);357 writefln("%s => %s", bfile, target); 353 358 354 359 // prepare for documentation … … 362 367 363 368 // build a build line 364 char[] ext = std.string.tolower(getExt(b uild));369 char[] ext = std.string.tolower(getExt(bfile)); 365 370 if (ext == "d") { 366 bbl ~= b uild~ " -of" ~ target ~ " ";371 bbl ~= bfile ~ " -of" ~ target ~ " "; 367 372 } else if (ext == "brf") { 368 bbl ~= "@" ~ getName(b uild) ~ " ";373 bbl ~= "@" ~ getName(bfile) ~ " "; 369 374 } else { 370 375 writefln("ERROR: I don't know how to build something with extension %s", ext); trunk/sss/conf.d
r844 r845 588 588 conf.settings[section]["type"] = "special"; 589 589 conf.settings[section]["target"] = section[1..$]; 590 591 } else if (find(section, '+') != -1) { 592 int ploc = find(section, '+'); // FIXME 593 // auxiliary section 594 conf.sections ~= section; 595 conf.settings[section]["type"] = "binary"; 596 conf.settings[section]["target"] = section[1..$]; 590 597 591 598 } else if (!exists(section)) { trunk/test/bin/bin.d
r801 r845 1 module bin; 2 1 3 import lib.foo; 2 4 3 5 int main() 4 6 { 5 return lib.foo.bar(); 7 version (stupid) { 8 return 0; 9 } else { 10 return lib.foo.bar(); 11 } 6 12 } trunk/test/bin/dsss.conf
r801 r845 2 2 3 3 [bin.d] 4 5 [bin.d+stupid] 6 target=stupid 7 buildflags=-version=stupid
