| 9 | | To the average software engineer, the most important part is dsss.conf, the |
|---|
| 10 | | file added to your source code to configure how DSSS will compile it. |
|---|
| 11 | | |
|---|
| 12 | | dsss.conf is a plain-text file, with a similar syntax to Windows INI files. It |
|---|
| 13 | | can have any number of sections, each of which is headed with a name in |
|---|
| 14 | | brackets, like so: |
|---|
| 15 | | [foo/bar.d] |
|---|
| 16 | | |
|---|
| 17 | | |
|---|
| 18 | | Most sections are named by a source file or directory. In general, sections |
|---|
| 19 | | named for source files will generate binaries, and sections named for |
|---|
| 20 | | directories will generate libraries. However, you can manually specify a |
|---|
| 21 | | binary, library or sourcelibrary (like a library, but not compiled until it's |
|---|
| 22 | | used in a binary) with the type setting: |
|---|
| 23 | | [wholedirbinary] |
|---|
| 24 | | type=binary |
|---|
| 25 | | |
|---|
| 26 | | [onefilelibrary.d] |
|---|
| | 11 | This document explains the use of DSSS by software engineers wishing to use |
|---|
| | 12 | DSSS as a project management solution. |
|---|
| | 13 | |
|---|
| | 14 | |
|---|
| | 15 | == OVERVIEW == |
|---|
| | 16 | |
|---|
| | 17 | Software utilizing DSSS is configured with a file named "dsss.conf". This file |
|---|
| | 18 | describes the components of the complete software package and how each component |
|---|
| | 19 | should be built. |
|---|
| | 20 | |
|---|
| | 21 | dsss.conf files are plain text files, in a format similar to Windows INI files. |
|---|
| | 22 | They are intentionally minimalistic, and require very little maintenance to keep |
|---|
| | 23 | working. |
|---|
| | 24 | |
|---|
| | 25 | Because dsss.conf files are minimalistic, most software packages can be |
|---|
| | 26 | configured for use by DSSS with very simple dsss.conf files. For example, most |
|---|
| | 27 | software packages containing one binary can have a dsss.conf file like the |
|---|
| | 28 | following: |
|---|
| | 29 | [example.d] |
|---|
| | 30 | target = example_binary |
|---|
| | 31 | |
|---|
| | 32 | This is all you need for a simple application. DSSS will parse your imports, so |
|---|
| | 33 | you only need to list the file with the entry function (main). In most cases, |
|---|
| | 34 | DSSS is very easy to use. Simple instructions on basic dsss.conf files is |
|---|
| | 35 | available at http://www.dsource.org/projects/dsss/wiki/DSSSByExample |
|---|
| | 36 | |
|---|
| | 37 | |
|---|
| | 38 | == THE BASICS == |
|---|
| | 39 | |
|---|
| | 40 | dsss.conf files are divided into a number of sections. Most sections describes a |
|---|
| | 41 | single binary or library to be built. |
|---|
| | 42 | |
|---|
| | 43 | A section is started with the file name of the source module or package in |
|---|
| | 44 | brackets. File names should always be specified with '/' for the path |
|---|
| | 45 | separator. '\' will work on Windows, but is not portable. '/' works on all |
|---|
| | 46 | platforms. |
|---|
| | 47 | |
|---|
| | 48 | In general, sections which are named for modules produce binaries, and sections |
|---|
| | 49 | which are named for packages produce libraries. Each section may have any |
|---|
| | 50 | number of settings, which customize how that section is built. |
|---|
| | 51 | |
|---|
| | 52 | When running `dsss build`, sections are built in the order that they appear in |
|---|
| | 53 | the dsss.conf file, with the exception that binaries are always built last. |
|---|
| | 54 | |
|---|
| | 55 | = SETTINGS = |
|---|
| | 56 | |
|---|
| | 57 | Settings are simple name-value pairs which customize the building of sections. |
|---|
| | 58 | The format is simple: |
|---|
| | 59 | <name>=<value> |
|---|
| | 60 | |
|---|
| | 61 | For example, |
|---|
| | 62 | target=example_binary |
|---|
| | 63 | |
|---|
| | 64 | It is also possible to add to a setting: |
|---|
| | 65 | <name>+=<value> |
|---|
| | 66 | |
|---|
| | 67 | e.g.: |
|---|
| | 68 | a=Hello |
|---|
| | 69 | a+=World |
|---|
| | 70 | |
|---|
| | 71 | The setting 'a' is now 'Hello World'. This is most useful with versioning, |
|---|
| | 72 | described later. |
|---|
| | 73 | |
|---|
| | 74 | Some settings do not require values. In this case, the setting name alone is |
|---|
| | 75 | sufficient, such as: |
|---|
| | 76 | shared |
|---|
| | 77 | |
|---|
| | 78 | Settings may include references to environment variables: |
|---|
| | 79 | a=$PREFIX |
|---|
| | 80 | |
|---|
| | 81 | DSSS provides several environment variables for this purpose: |
|---|
| | 82 | PREFIX: The prefix to which the software is being installed. |
|---|
| | 83 | BIN_PREFIX: The prefix for binaries. |
|---|
| | 84 | LIB_PREFIX: The prefix for libraries. |
|---|
| | 85 | INCLUDE_PREFIX: The base prefix for .di files. |
|---|
| | 86 | DOC_PREFIX: The prefix for documentation. |
|---|
| | 87 | ETC_PREFIX: The prefix for configuration files. |
|---|
| | 88 | EXE_EXT: The extension for executable files. Empty on POSIX, ".exe" on Windows. |
|---|
| | 89 | DSSS: The full path to the DSSS binary itself. |
|---|
| | 90 | DSSS_BUILD: The full path to the build tool being used by DSSS (usually |
|---|
| | 91 | rebuild). |
|---|
| | 92 | |
|---|
| | 93 | = FLAGS = |
|---|
| | 94 | |
|---|
| | 95 | Any section may have a 'buildflags' setting, which specifies the flags to be |
|---|
| | 96 | used while building that section. For example, |
|---|
| | 97 | buildflags=-O |
|---|
| | 98 | |
|---|
| | 99 | Flags for use with release and debug builds (when using --debug) can be |
|---|
| | 100 | specified separately in 'releaseflags' and 'debugflags', respectively. |
|---|
| | 101 | 'debugflags' defaults to '-debug -gc'. |
|---|
| | 102 | |
|---|
| | 103 | = SECTION TYPES = |
|---|
| | 104 | |
|---|
| | 105 | Although section types are usually determined automatically from the section |
|---|
| | 106 | name, they may also be overridden with the 'type' setting: |
|---|
| | 107 | [oneFileLib.d] |
|---|
| 29 | | [onefilesrclib.d] |
|---|
| | 110 | The valid values for 'type' (all described in later sections) are: |
|---|
| | 111 | binary |
|---|
| | 112 | library |
|---|
| | 113 | sourcelibrary |
|---|
| | 114 | special |
|---|
| | 115 | subdir |
|---|
| | 116 | |
|---|
| | 117 | = BINARIES = |
|---|
| | 118 | |
|---|
| | 119 | Sections which are named for D modules (.d files) produce executable binaries |
|---|
| | 120 | when built with DSSS. The target binary file name will be deduced from the name |
|---|
| | 121 | of the .d file, or can be set explicitly with a 'target' line, such as: |
|---|
| | 122 | [example.d] |
|---|
| | 123 | target=example_binary |
|---|
| | 124 | |
|---|
| | 125 | Windows users: Be careful not to set the target of a binary build to the name of |
|---|
| | 126 | a directory. This will work on Windows because it gains the .exe suffix, but |
|---|
| | 127 | will fail on other operating systems. |
|---|
| | 128 | |
|---|
| | 129 | = LIBRARIES = |
|---|
| | 130 | |
|---|
| | 131 | Sections which are named for D packages (directories) produce libraries when |
|---|
| | 132 | built with DSSS. The name of the library file is derived from the name of the |
|---|
| | 133 | package and the platform. There is no reason to remember this name, however, |
|---|
| | 134 | because DSSS will detect library dependencies and link them in automatically. |
|---|
| | 135 | This name can partially be overridden if desired, in the same way as binaries: |
|---|
| | 136 | [mydpackage] |
|---|
| | 137 | target=dlibrary |
|---|
| | 138 | |
|---|
| | 139 | However, the platform will always affect the output library name. On POSIX |
|---|
| | 140 | systems, the above library will be named libSdlibrary.a and libdlibrary.so. On |
|---|
| | 141 | Windows, the above library will be named Sdlibrary.lib. |
|---|
| | 142 | |
|---|
| | 143 | By default, all of the .d files within the directory and any subdirectory will |
|---|
| | 144 | be included in the library. Files may be excluded with the 'exclude' setting: |
|---|
| | 145 | [mydpackage] |
|---|
| | 146 | exclude=mydpackage/broken.d |
|---|
| | 147 | |
|---|
| | 148 | Entire directories may also be excluded: |
|---|
| | 149 | [mydpackage] |
|---|
| | 150 | exclude=mydpackage/brokenpackage |
|---|
| | 151 | |
|---|
| | 152 | The 'exclude' setting is useful in concert with versioning, described in a later |
|---|
| | 153 | section. |
|---|
| | 154 | |
|---|
| | 155 | When using GDC on POSIX, it is also possible to build shared libraries (.so |
|---|
| | 156 | files). To specify that a shared library should be built, set the 'shared' |
|---|
| | 157 | option in the library's section: |
|---|
| | 158 | [mydpackage] |
|---|
| | 159 | shared |
|---|
| | 160 | |
|---|
| | 161 | You can set the .so file's version extension (the 1.2.3 in .so.1.2.3) with the |
|---|
| | 162 | soversion setting: |
|---|
| | 163 | [mydpackage] |
|---|
| | 164 | shared |
|---|
| | 165 | soversion=3.2.1 |
|---|
| | 166 | |
|---|
| | 167 | = SOURCE LIBRARIES = |
|---|
| | 168 | |
|---|
| | 169 | Source libraries are libraries which are not compiled until they are used in a |
|---|
| | 170 | binary. They are installed in their source form. Otherwise, they act identically |
|---|
| | 171 | to normal libraries. A source library may be specified by setting the 'type' |
|---|
| | 172 | setting to 'sourcelibrary': |
|---|
| | 173 | [mydpackage] |
|---|
| 32 | | |
|---|
| 33 | | In each section, there can be any number of settings. Each setting is a |
|---|
| 34 | | keyword, possibly followed by = or += and a value. For example, the "target" |
|---|
| 35 | | setting sets the name of the output binary or library in a given section: |
|---|
| 36 | | [main.d] |
|---|
| 37 | | target=dzip |
|---|
| 38 | | |
|---|
| 39 | | (In general, the target setting will be automatically set to something |
|---|
| 40 | | sensible) |
|---|
| 41 | | |
|---|
| 42 | | |
|---|
| 43 | | Sections creating libraries from directories will normally include all the .d |
|---|
| 44 | | files in that directory or any subdirectory of it. You may also specify |
|---|
| 45 | | subdirectories explicitly in dsss.conf, which will cause some .d files to be |
|---|
| 46 | | reassigned. For example, if you have these files: |
|---|
| 47 | | dzip/algorithm.d, foo/compression/zip.d |
|---|
| 48 | | and a section: |
|---|
| 49 | | [dzip] |
|---|
| 50 | | then the produced library will include algorithm.d and zip.d. |
|---|
| 51 | | If you have two sections: |
|---|
| 52 | | [dzip] |
|---|
| 53 | | [dzip/compression] |
|---|
| 54 | | then two libraries will be produced: The library from 'dzip' will contain |
|---|
| 55 | | algorithm.d, and the library from [dzip/compression] will contain zip.d. |
|---|
| 56 | | |
|---|
| 57 | | |
|---|
| 58 | | Furthermore, content in dsss.conf can be set up as version-specific, with a |
|---|
| 59 | | version keyword similar to the version keyword in D. For example, to make sure |
|---|
| 60 | | that a certain binary is only produced on Windows: |
|---|
| | 176 | = SPECIAL SECTIONS = |
|---|
| | 177 | |
|---|
| | 178 | It is also possible to create sections which are not associated with compiling |
|---|
| | 179 | a binary or library. These sections are given names starting with a '+', such |
|---|
| | 180 | as: |
|---|
| | 181 | [+generate] |
|---|
| | 182 | |
|---|
| | 183 | The utility of these sections will be seen below, in the section on hooks. |
|---|
| | 184 | |
|---|
| | 185 | |
|---|
| | 186 | == INSTALLATION == |
|---|
| | 187 | |
|---|
| | 188 | DSSS is capable of installing binaries and libraries to a predetermined |
|---|
| | 189 | directory, usually the prefix in which it is installed. When libraries are |
|---|
| | 190 | installed in this way, they will be usable by DSSS without being explicitly |
|---|
| | 191 | specified. |
|---|
| | 192 | |
|---|
| | 193 | If a section should be built but not installed, set the 'noinstall' setting: |
|---|
| | 194 | [test.d] |
|---|
| | 195 | noinstall |
|---|
| | 196 | |
|---|
| | 197 | |
|---|
| | 198 | == DEPENDENCIES == |
|---|
| | 199 | |
|---|
| | 200 | The primary reason that DSSS exists is to make handling dependencies easier. To |
|---|
| | 201 | this end, is is never necessary to explicitly specify a dependency upon a |
|---|
| | 202 | library which is itself set up to use DSSS. Because DSSS traces D imports and |
|---|
| | 203 | keeps an Internet-accessible repository of package information, installing the |
|---|
| | 204 | dependencies which are supported by DSSS is as easy as typing: |
|---|
| | 205 | $ dsss net deps |
|---|
| | 206 | |
|---|
| | 207 | However, dependencies on non-DSSS D libraries or C libraries can be more |
|---|
| | 208 | complicated. |
|---|
| | 209 | |
|---|
| | 210 | = INCLUDE PATHS = |
|---|
| | 211 | |
|---|
| | 212 | It is possible to specify include paths in the 'buildflags' settings. Import |
|---|
| | 213 | paths are specified with the -I flag: |
|---|
| | 214 | buildflags=-I../prerequisite/import |
|---|
| | 215 | |
|---|
| | 216 | = PREREQUISITE LIBRARIES = |
|---|
| | 217 | |
|---|
| | 218 | Library search paths are specified with the -S flag: |
|---|
| | 219 | buildflags=-S../prerequisite/lib |
|---|
| | 220 | |
|---|
| | 221 | Libraries can be explicitly linked in with the -ll flag. -ll works similarly to |
|---|
| | 222 | -l in most compilers. On POSIX and similar platforms, a flag such as |
|---|
| | 223 | -ll<library> |
|---|
| | 224 | will link in a library named |
|---|
| | 225 | lib<library>.a (or lib<library>.so) |
|---|
| | 226 | |
|---|
| | 227 | On Windows (except GDC), the same flag will link a library named |
|---|
| | 228 | <library>.lib |
|---|
| | 229 | |
|---|
| | 230 | Libraries linked in with the -ll flag are searched for in the search paths |
|---|
| | 231 | specified by the -S flag. |
|---|
| | 232 | |
|---|
| | 233 | The -ll flag is only useful for explicitly linking libraries into binaries. If |
|---|
| | 234 | the DSSS-implemented library depends on a non-DSSS library, the dependency must |
|---|
| | 235 | be specified in a .d file which is part of the DSSS-implemented library. This |
|---|
| | 236 | is done with the 'link' pragma, which must always be specified within |
|---|
| | 237 | version(build): |
|---|
| | 238 | version (build) { |
|---|
| | 239 | pragma(link, "example"); |
|---|
| | 240 | } |
|---|
| | 241 | |
|---|
| | 242 | The above example will cause any binary linked against the DSSS-implemented |
|---|
| | 243 | library to link against the library named libexample.a (or example.lib on |
|---|
| | 244 | Windows). |
|---|
| | 245 | |
|---|
| | 246 | |
|---|
| | 247 | == HOOKS == |
|---|
| | 248 | |
|---|
| | 249 | DSSS can run arbitrary commands while building software. There are a number of |
|---|
| | 250 | points at which commands can be run: before and after building, before and after |
|---|
| | 251 | installing, and before and after cleaning up. These commands are added to |
|---|
| | 252 | 'prebuild', 'postbuild', 'preinstall', 'postinstall', 'preclean' and 'postclean' |
|---|
| | 253 | lines, respectively. |
|---|
| | 254 | |
|---|
| | 255 | Hook commands can be anything which can be run on the shell of the host system, |
|---|
| | 256 | such as: |
|---|
| | 257 | prebuild = echo Hello |
|---|
| | 258 | |
|---|
| | 259 | Any number of hook commands may be strung together between semicolons: |
|---|
| | 260 | prebuild = echo Hello ; echo World |
|---|
| | 261 | |
|---|
| | 262 | And may span multiple lines by ending each line with a backslash: |
|---|
| | 263 | prebuild = echo \ |
|---|
| | 264 | Hello ; \ |
|---|
| | 265 | echo World |
|---|
| | 266 | |
|---|
| | 267 | |
|---|
| | 268 | |
|---|
| | 269 | There are also a number of special, builtin commands available. |
|---|
| | 270 | |
|---|
| | 271 | = warn and error = |
|---|
| | 272 | |
|---|
| | 273 | A warning or error condition can be specified by the hook commands 'warn' and |
|---|
| | 274 | 'error'. |
|---|
| | 275 | |
|---|
| | 276 | An example of 'error': |
|---|
| | 277 | version (!Posix) { |
|---|
| | 278 | prebuild=error Only POSIX is supported. |
|---|
| | 279 | } |
|---|
| | 280 | |
|---|
| | 281 | An example of 'warn': |
|---|
| | 282 | version (Posix) { |
|---|
| | 283 | prebuild=warn POSIX support is untested. |
|---|
| | 284 | } |
|---|
| | 285 | |
|---|
| | 286 | When an error hook command is run, building of course halts. |
|---|
| | 287 | |
|---|
| | 288 | = install = |
|---|
| | 289 | |
|---|
| | 290 | The 'install' command installs a file to the specified directory. If the |
|---|
| | 291 | directory does not exist, it is created. For example: |
|---|
| | 292 | postinstall = install docs/README $DOC_PREFIX |
|---|
| | 293 | |
|---|
| | 294 | Files installed in this way are recorded, so that they may be uninstalled |
|---|
| | 295 | easily. |
|---|
| | 296 | |
|---|
| | 297 | = installdir = |
|---|
| | 298 | |
|---|
| | 299 | 'installdir' is similar to 'install', with the exception that it can install |
|---|
| | 300 | entire directories (and all of their subdirectories). The /content/ of the |
|---|
| | 301 | first directory will be installed into the second directory. |
|---|
| | 302 | |
|---|
| | 303 | = cd = |
|---|
| | 304 | |
|---|
| | 305 | The 'cd' command changes the current directory. It works exactly as on POSIX |
|---|
| | 306 | and Windows shells: |
|---|
| | 307 | prebuild = cd c_source ; make |
|---|
| | 308 | |
|---|
| | 309 | It is unnecessary to return to the original directory after 'cd'ing. The |
|---|
| | 310 | directory will be restored after the hook commands have finished. |
|---|
| | 311 | |
|---|
| | 312 | = .d files = |
|---|
| | 313 | |
|---|
| | 314 | Any .d file may be used as a command. It will be compiled and run on-the-fly: |
|---|
| | 315 | prebuild = generateBindings.d |
|---|
| | 316 | |
|---|
| | 317 | = set = |
|---|
| | 318 | |
|---|
| | 319 | The 'set' command sets a dsss.conf file setting while DSSS is actually running. |
|---|
| | 320 | The parameters are: |
|---|
| | 321 | set <section>:<setting> <value> |
|---|
| | 322 | |
|---|
| | 323 | It is also possible to omit the section from the command to set in the current |
|---|
| | 324 | section: |
|---|
| | 325 | set <setting> <value> |
|---|
| | 326 | |
|---|
| | 327 | The special section '*' may be used to set a setting in all sections: |
|---|
| | 328 | set *:<setting> <value> |
|---|
| | 329 | |
|---|
| | 330 | For example, |
|---|
| | 331 | set example.d:postbuild echo Hello |
|---|
| | 332 | |
|---|
| | 333 | 'set' is most useful in concert with the 'eval' command (described below), as |
|---|
| | 334 | it can then be used to set dsss.conf file settings programatically. It is |
|---|
| | 335 | also usable independently of 'eval', but is no better than merely specifying |
|---|
| | 336 | the setting. |
|---|
| | 337 | |
|---|
| | 338 | = add = |
|---|
| | 339 | |
|---|
| | 340 | The 'add' command is identical to the 'set' command, except that it appends to |
|---|
| | 341 | the current value instead of replacing it. |
|---|
| | 342 | |
|---|
| | 343 | For example, |
|---|
| | 344 | add example.d:postbuild World |
|---|
| | 345 | |
|---|
| | 346 | = eval = |
|---|
| | 347 | |
|---|
| | 348 | The 'eval' command runs a specified command, captures its output, and then runs |
|---|
| | 349 | its output as a command. This allows for very general processes to be |
|---|
| | 350 | encapsulated into binaries, rather than the dsss.conf file itself. |
|---|
| | 351 | |
|---|
| | 352 | For example, imagine the scenario that some system specifics need to be detected |
|---|
| | 353 | and utilized in the building of a section. There can be a program, analyze.d, |
|---|
| | 354 | which does the analysis and outputs commands such as |
|---|
| | 355 | add *:postbuild echo Hello |
|---|
| | 356 | |
|---|
| | 357 | This program could be run and used with the hook command: |
|---|
| | 358 | prebuild=eval analyze.d |
|---|
| | 359 | |
|---|
| | 360 | |
|---|
| | 361 | == VERSIONING == |
|---|
| | 362 | |
|---|
| | 363 | dsss.conf files support version statements with a similar syntax to D's own |
|---|
| | 364 | version statements: |
|---|
| | 365 | |
|---|
| 74 | | [foo/windows.d] |
|---|
| 75 | | target=foo_for_windows |
|---|
| 76 | | } else { |
|---|
| 77 | | [foo/notwindows.d] |
|---|
| 78 | | target=foo_for_notwindows |
|---|
| 79 | | } |
|---|
| 80 | | |
|---|
| 81 | | The version statement in dsss.conf has a fairly strict syntax: the { must be on |
|---|
| 82 | | the same line as the statement, and the version being tested must be in |
|---|
| 83 | | parenthesis. |
|---|
| 84 | | |
|---|
| 85 | | |
|---|
| 86 | | There are quite a few other settings supported: |
|---|
| 87 | | |
|---|
| 88 | | * exclude |
|---|
| 89 | | * Exclude a list of .d files from being included in a library: |
|---|
| 90 | | exclude=foo.d bar.d |
|---|
| 91 | | |
|---|
| 92 | | * buildflags |
|---|
| 93 | | * Flags that will be added to the command line for rebuild when building this |
|---|
| 94 | | section. |
|---|
| 95 | | |
|---|
| 96 | | * prebuild, preinstall, preclean, predigen, postbuild, postinstall, postclean, |
|---|
| 97 | | postdigen |
|---|
| 98 | | * Commands to be run before or after (pre or post) building (build), |
|---|
| 99 | | installing (install), cleaning (clean) or generating .di files (digen) for |
|---|
| 100 | | the current section. Can be any number of ;-separated commands, and |
|---|
| 101 | | supports some special command types: |
|---|
| 102 | | * .d files. If a .d file is specified as a command, it will be compiled and |
|---|
| 103 | | run. |
|---|
| 104 | | * Notably, D files can always use DSSS' headers. That is, the package |
|---|
| 105 | | 'sss'. |
|---|
| 106 | | |
|---|
| 107 | | * install: DSSS has an internal 'install' command, which takes the |
|---|
| 108 | | following syntax: |
|---|
| 109 | | install <file> <target directory> |
|---|
| 110 | | |
|---|
| 111 | | * eval: Run a command (.d file or otherwise), and execute its result |
|---|
| 112 | | * For example, the command could print "install chosen/file/to/install |
|---|
| 113 | | $INCLUDE_PREFIX" |
|---|
| 114 | | |
|---|
| 115 | | * set: Set a setting in DSSS' environment. The syntax is as follows: |
|---|
| 116 | | * set <section>.<setting> <value> |
|---|
| 117 | | * You may use * to apply a setting to all sections, or simply exclude the |
|---|
| 118 | | section (but still include the .) to set a global setting. |
|---|
| 119 | | * This is most useful when used via eval, as in: |
|---|
| 120 | | eval detectsettings.d |
|---|
| 121 | | |
|---|
| 122 | | * add: Like set, but adds to a setting. |
|---|
| 123 | | |
|---|
| 124 | | * In any command, you can use environment variables with a '$', such as |
|---|
| 125 | | $PREFIX. The following environment variables are provided by DSSS: |
|---|
| 126 | | * $DSSS : The dsss binary, if you need to call DSSS recursively. Better |
|---|
| 127 | | than counting on it being on the PATH. |
|---|
| 128 | | |
|---|
| 129 | | * $PREFIX : The prefix to which the software is being installed. |
|---|
| 130 | | |
|---|
| 131 | | * $BIN_PREFIX : The prefix to which binaries are being installed. |
|---|
| 132 | | |
|---|
| 133 | | * $LIB_PREFIX : The prefix to which libraries are being installed. |
|---|
| 134 | | |
|---|
| 135 | | * $INCLUDE_PREFIX : The prefix to which generated .di interface files are |
|---|
| 136 | | being installed. |
|---|
| 137 | | * This is the /base/ prefix, so for example the module foo.bar will be |
|---|
| 138 | | installed to $INCLUDE_PREFIX/foo/bar.di |
|---|
| 139 | | * This directory can also be used for .d files. |
|---|
| 140 | | |
|---|
| 141 | | * $DOC_PREFIX : The prefix to which documentation is installed. |
|---|
| 142 | | |
|---|
| 143 | | * $ETC_PREFIX : The prefix to which configuration files are being |
|---|
| 144 | | installed. |
|---|
| 145 | | |
|---|
| 146 | | |
|---|
| 147 | | Furthermore, there is a global section for settings which are not specific to |
|---|
| 148 | | any binary or library. You can add settings to this section simply by adding |
|---|
| 149 | | them before any section declarations, or by making an empty section declaration |
|---|
| 150 | | like so: |
|---|
| | 381 | [winlib] |
|---|
| | 382 | } else version (Posix) { |
|---|
| | 383 | [posixlib] |
|---|
| | 384 | } |
|---|
| | 385 | type = library |
|---|
| | 386 | |
|---|
| | 387 | |
|---|
| | 388 | == GLOBAL SETTINGS == |
|---|
| | 389 | |
|---|
| | 390 | There are several settings that DSSS supports which are global. That is, they |
|---|
| | 391 | are specified for the software package as a whole, rather than any section. |
|---|
| | 392 | These are included at the top of the dsss.conf file. Common settings are 'name' |
|---|
| | 393 | (the name of the software package) and 'version'. |
|---|
| | 394 | |
|---|
| | 395 | There is also a global setting available to specify which sections should be |
|---|
| | 396 | built normally, 'defaulttargets'. Without it, all sections will be built by |
|---|
| | 397 | default. The section list is simply separated by spaces: |
|---|
| | 398 | defaulttargets=xlib xbin |
|---|
| | 399 | |
|---|
| | 400 | It is also possible to specify global settings later in the dsss.conf file by |
|---|
| | 401 | adding an empty section header: |
|---|