Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changes between Version 1 and Version 2 of DSSSForSoftwareEngineers

Show
Ignore:
Author:
LMZ (IP: 89.44.88.53)
Timestamp:
02/11/08 17:16:14 (16 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DSSSForSoftwareEngineers

    v1 v2  
    8181 
    8282DSSS 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). 
    9392 
    9493= FLAGS = 
    9695Any section may have a 'buildflags' setting, which specifies the flags to be 
    9796used while building that section. For example, 
     97{{{ 
    9898buildflags=-O 
     99}}} 
    99100 
    100101Flags for use with release and debug builds (when using --debug) can be 
    388389 
    389390The special section '*' may be used to set a setting in all sections: 
     391{{{ 
    390392set *:<setting> <value> 
     393}}} 
    391394 
    392395For example, 
     396{{{ 
    393397set example.d:postbuild echo Hello 
     398}}} 
    394399 
    395400'set' is most useful in concert with the 'eval' command (described below), as 
    404409 
    405410For example, 
     411{{{ 
    406412add example.d:postbuild World 
     413}}} 
    407414 
    408415= eval = 
    415422and utilized in the building of a section. There can be a program, analyze.d, 
    416423which does the analysis and outputs commands such as 
     424{{{ 
    417425add *:postbuild echo Hello 
     426}}} 
    418427 
    419428This program could be run and used with the hook command: 
     429{{{ 
    420430prebuild=eval analyze.d 
    421  
     431}}} 
    422432 
    423433== VERSIONING == 
    425435dsss.conf files support version statements with a similar syntax to D's own 
    426436version statements: 
    427  
     437{{{ 
    428438version (Windows) { 
    429439    postbuild=setupWindows.d 
    431441    postbuild=setupPosix.d 
    432442} 
     443}}} 
    433444 
    434445Unlike D, dsss.conf files support negative versions: 
    435  
     446{{{ 
    436447version (!Windows) { 
    437448    postbuild=giveUserCandy.d 
    438449} 
     450}}} 
    439451 
    440452dsss.conf's version statements can be used at any point in the dsss.conf file. 
    441453They can even conditionally include different sections: 
     454{{{ 
    442455version (Windows) { 
    443456    [winlib] 
    446459} 
    447460type = library 
    448  
     461}}} 
    449462 
    450463== GLOBAL SETTINGS == 
    458471built normally, 'defaulttargets'. Without it, all sections will be built by 
    459472default. The section list is simply separated by spaces: 
     473{{{ 
    460474defaulttargets=xlib xbin 
     475}}} 
    461476 
    462477It is also possible to specify global settings later in the dsss.conf file by 
    463478adding an empty section header: 
     479{{{ 
    464480[] 
    465481name=exampleSoft 
    466  
     482}}} 
    467483 
    468484== DEFAULT SETTINGS == 
    470486It is possible to create default settings with a special "*" section. This is 
    471487most useful for settings such as 'buildflags': 
    472  
     488{{{ 
    473489[*] 
    474490buildflags=-O 
     491}}} 
    475492 
    476493Note that any settings in a named section will override those in "*" sections. 
    477494For example, in this situation: 
    478  
     495{{{ 
    479496[*] 
    480497buildflags=-O 
    482499[mydlib] 
    483500buildflags+=-release 
     501}}} 
    484502 
    485503mydlib's buildflags are only "-release". 
    486  
    487504 
    488505== ADVANCED FEATURES == 
    492509 
    493510The flag '--test', when passed to `dsss build`: 
     511{{{ 
    494512$ dsss build --test 
     513}}} 
     514 
    495515will cause all of the unit tests to be run. 
    496516 
    497517The flag '--doc', when passed to `dsss build`: 
     518{{{ 
    498519$ dsss build --doc 
     520}}} 
     521 
    499522will cause API documentation for every library to be generated with CandyDoc, 
    500523which beautifies and organizes the documentation. 
    507530and occasionally for adapting non-DSSS-aware packages to use DSSS. Essentially, 
    508531a section named for the directory of the sub-package has its type set to subdir: 
     532{{{ 
    509533[dziplib] 
    510534type=subdir 
    511  
    512 Note that you must manully add buildflags such as -Idziplib if you want to 
     535}}} 
     536 
     537Note that you must manually add buildflags such as -Idziplib if you want to 
    513538import sources from the subdirectory into sources in the parent directory. 
    514539 
    515  
    516 To be written: 
    517 == NET INSTALLATION == 
     540= To be written = 
     541 * NET INSTALLATION