Changes between Version 1 and Version 2 of DSSSForSoftwareEngineers
- Timestamp:
- 02/11/08 17:16:14 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DSSSForSoftwareEngineers
v1 v2 81 81 82 82 DSSS provides several environment variables for this purpose: 83 PREFIX: The prefix to which the software is being installed. 84 BIN_PREFIX: The prefix for binaries. 85 LIB_PREFIX: The prefix for libraries. 86 INCLUDE_PREFIX: The base prefix for .di files. 87 DOC_PREFIX: The prefix for documentation. 88 ETC_PREFIX: The prefix for configuration files. 89 EXE_EXT: The extension for executable files. Empty on POSIX, ".exe" on Windows. 90 DSSS: The full path to the DSSS binary itself. 91 DSSS_BUILD: The full path to the build tool being used by DSSS (usually 92 rebuild). 83 * PREFIX: The prefix to which the software is being installed. 84 * BIN_PREFIX: The prefix for binaries. 85 * LIB_PREFIX: The prefix for libraries. 86 * INCLUDE_PREFIX: The base prefix for .di files. 87 * DOC_PREFIX: The prefix for documentation. 88 * ETC_PREFIX: The prefix for configuration files. 89 * EXE_EXT: The extension for executable files. Empty on POSIX, ".exe" on Windows. 90 * DSSS: The full path to the DSSS binary itself. 91 * DSSS_BUILD: The full path to the build tool being used by DSSS (usually rebuild). 93 92 94 93 = FLAGS = 96 95 Any section may have a 'buildflags' setting, which specifies the flags to be 97 96 used while building that section. For example, 97 {{{ 98 98 buildflags=-O 99 }}} 99 100 100 101 Flags for use with release and debug builds (when using --debug) can be 388 389 389 390 The special section '*' may be used to set a setting in all sections: 391 {{{ 390 392 set *:<setting> <value> 393 }}} 391 394 392 395 For example, 396 {{{ 393 397 set example.d:postbuild echo Hello 398 }}} 394 399 395 400 'set' is most useful in concert with the 'eval' command (described below), as 404 409 405 410 For example, 411 {{{ 406 412 add example.d:postbuild World 413 }}} 407 414 408 415 = eval = 415 422 and utilized in the building of a section. There can be a program, analyze.d, 416 423 which does the analysis and outputs commands such as 424 {{{ 417 425 add *:postbuild echo Hello 426 }}} 418 427 419 428 This program could be run and used with the hook command: 429 {{{ 420 430 prebuild=eval analyze.d 421 431 }}} 422 432 423 433 == VERSIONING == 425 435 dsss.conf files support version statements with a similar syntax to D's own 426 436 version statements: 427 437 {{{ 428 438 version (Windows) { 429 439 postbuild=setupWindows.d 431 441 postbuild=setupPosix.d 432 442 } 443 }}} 433 444 434 445 Unlike D, dsss.conf files support negative versions: 435 446 {{{ 436 447 version (!Windows) { 437 448 postbuild=giveUserCandy.d 438 449 } 450 }}} 439 451 440 452 dsss.conf's version statements can be used at any point in the dsss.conf file. 441 453 They can even conditionally include different sections: 454 {{{ 442 455 version (Windows) { 443 456 [winlib] 446 459 } 447 460 type = library 448 461 }}} 449 462 450 463 == GLOBAL SETTINGS == 458 471 built normally, 'defaulttargets'. Without it, all sections will be built by 459 472 default. The section list is simply separated by spaces: 473 {{{ 460 474 defaulttargets=xlib xbin 475 }}} 461 476 462 477 It is also possible to specify global settings later in the dsss.conf file by 463 478 adding an empty section header: 479 {{{ 464 480 [] 465 481 name=exampleSoft 466 482 }}} 467 483 468 484 == DEFAULT SETTINGS == 470 486 It is possible to create default settings with a special "*" section. This is 471 487 most useful for settings such as 'buildflags': 472 488 {{{ 473 489 [*] 474 490 buildflags=-O 491 }}} 475 492 476 493 Note that any settings in a named section will override those in "*" sections. 477 494 For example, in this situation: 478 495 {{{ 479 496 [*] 480 497 buildflags=-O 482 499 [mydlib] 483 500 buildflags+=-release 501 }}} 484 502 485 503 mydlib's buildflags are only "-release". 486 487 504 488 505 == ADVANCED FEATURES == 492 509 493 510 The flag '--test', when passed to `dsss build`: 511 {{{ 494 512 $ dsss build --test 513 }}} 514 495 515 will cause all of the unit tests to be run. 496 516 497 517 The flag '--doc', when passed to `dsss build`: 518 {{{ 498 519 $ dsss build --doc 520 }}} 521 499 522 will cause API documentation for every library to be generated with CandyDoc, 500 523 which beautifies and organizes the documentation. 507 530 and occasionally for adapting non-DSSS-aware packages to use DSSS. Essentially, 508 531 a section named for the directory of the sub-package has its type set to subdir: 532 {{{ 509 533 [dziplib] 510 534 type=subdir 511 512 Note that you must manully add buildflags such as -Idziplib if you want to 535 }}} 536 537 Note that you must manually add buildflags such as -Idziplib if you want to 513 538 import sources from the subdirectory into sources in the parent directory. 514 539 515 516 To be written: 517 == NET INSTALLATION == 540 = To be written = 541 * NET INSTALLATION