Uploaded image for project: 'Qbs ("Cubes")'
  1. Qbs ("Cubes")
  2. QBS-1365

make build directory locations less unexpected

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • Command Line Frontend
    • 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:

      1. the config name 'default' is never embedded into file names; it's just empty
      2. 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kandeler Christian Kandeler
            buddenha Oswald Buddenhagen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes