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
1 parent f240fac commit c9a5efbde86b53c6655fee93cacf5dcac7d79905
@Sönke Ludwig Sönke Ludwig authored on 29 Nov 2013
Showing 3 changed files
View
source/dub/compilers/compiler.d
View
source/dub/generators/build.d
View
source/dub/package_.d