Add support for a "mainSourceFile" field.
The main source file is used as the root to access the whole package. This is important for dependency based building, such as with RDMD and for special build kinds, such as for a future unit test command. This also improves the robustness of "dub build --rdmd". Main source files are automatically inferred as follows, if not explicitly given: 1. search first in "source/", followed by "src/" 2. take the first match of ("app.d", "main.d", "<pkgname>/main.d", "<pkgname>/<pkgname.d>") as the main file for the automatic "application" configuration 3. take the first match of ("<pkgname>/all.d", "<pkgname>/package.d", "<pkgname>/<pkgname>.d") as the main file for the automatic "library" configuration |
---|
|
source/dub/compilers/compiler.d |
---|
source/dub/generators/build.d |
---|
source/dub/package_.d |
---|