Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
currently, qbs has two rather unexpected behaviors relating to build directories:
- as the build dir is named after the config, and the default config is named 'default', one gets a 'default' subdirectory in the source directory when doing an "in-source" build. this is just weird; nobody expects such a name.
- the config name is appended even when doing an explicit shadow build (by specifying -d and/or building from another directory and using -f), so one gets an extra hierarchy level (usually named 'default'), which is also weird.
we can fix this with two modifications:
- the config name 'default' is never embedded into file names; it's just empty
- if the build base directory (-d or $PWD) is the source directory, the build directory is prefixed with 'build-' (or just 'build' when rule #1 takes effect)
this yields the following cases:
- default in-source build => src/build
- non-default in-source build => src/build-config
- default shadow build => bld
- non-default shadow build => bld/config
to avoid mistakes, we could complain if -d specifies a parent of the source dir.
it's ok if -d is explicitly set to the source dir itself; rule #2 simply takes effect then.