aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Include profile.h via qbs.h.Christian Kandeler2014-01-212-0/+4
| | | | | | | It's part of the public API. Change-Id: Ieb835e99dccbe6c0decb37fd67d24808842418ed Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix compilation on Windows.Christian Kandeler2014-01-201-1/+1
| | | | | Change-Id: I6f31008d3cc0e7fbff1cc47703ad05861b0eb67d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Check all output artifacts if checking timestamps was requested.Christian Kandeler2014-01-201-2/+3
| | | | | | | | | | Normally, those artifacts for which "alwaysUpdated" is false are skipped as to not cause false positives. However, if the user indicates that the build directory was messed with, they could, for instance, have been deleted and must therefore be taken into account. Change-Id: I5b0e498c4926c617956ff4e59864489cfc769d15 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Tighten sanity checks, part XXXIII.Christian Kandeler2014-01-173-3/+9
| | | | | | | | | | - Check whether the artifacts in a child list actually appears in their products' artifact list. - Do sanity checking right before storing the build graph. This makes sure that a corrupted build graph never gets written to disk. Change-Id: I06b02b97c3621ecdc1f6dae8e6ce818519f9736e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make config commands understand booleans.Christian Kandeler2014-01-161-0/+6
| | | | | | | | | | The user frontends for our settings assume everything is a string, so do the necessary conversions. Note that this means there is no way to set the string values "true" and "false". For a correct implementation, users would need to supply types when adding new values. Change-Id: If3638525eeebe73857834389bae46484eee92cc3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix build data rescuing.Christian Kandeler2014-01-141-6/+6
| | | | | | | | | The old implementation allowed more than one connection to a child with the same file path represented by different artifact objects. Change-Id: I38db86c50f0f671fdcb05d481f51fb512442cbfd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Take source artifact properties into account when change tracking.Christian Kandeler2014-01-141-1/+11
| | | | | | | | | When properties on source files change, rules might have to be re- applied and the installation of the respective source file may have to be re-done. The current code catches none of that. Change-Id: I7d87eb1d6bbb9918f2633ec8cbb9640ca23b90a4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Use a qbs-specific group for the settings.Christian Kandeler2014-01-141-11/+9
| | | | | | | | | | Otherwise, non-qbs settings from fallback locations will add noise for users. This patch is in effect an addendum to commit 065d89fa2c, which assumed that this happened only on OSX. However, we have now seen such problems also on Linux. Change-Id: If4e40d5941c8e1bd249cf75096b59d4b10880d00 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Tighten sanity check.Christian Kandeler2014-01-131-0/+11
| | | | | | | | Check for the same file appearing as different artifacts in a child list. See QBS-491 for an example. Change-Id: Ie93268c05386ccfae2a57097a19e5ec7d135902a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix profile test.Christian Kandeler2014-01-101-53/+28
| | | | | | | We don't throw exceptions anymore. Change-Id: I4a8baba0b3fd0d6af7adceb4c6ef905f63b84efd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Do not leak exceptions from the Profile class.Christian Kandeler2014-01-103-11/+30
| | | | | | | This is public API. Change-Id: I37cfd018e350a3ff4cecba34af42bf23a8aaf0fd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix corner case in "up to date" check.Christian Kandeler2014-01-101-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the timestamps of target artifacts (and only these) are always retrieved from disk before checking whether artifacts are up to date. This can lead to problems, for instance in the following scenario: - The transformer creating the target artifact has another output artifact, i.e. the target artifact has a non-target sibling. - The sibling is created in a different command that runs after the one creating the target artifact. - While the command creating the target artifact is in progress, a different, unrelated command running at the same time fails. As a result, the executor will wait until the in-flight commands have finished and then cancel the build, not running any commands still queued for execution. This means that the target artifact will have a different on-disk timestamps than its sibling. On the next build, this newer timestamp will be retrieved. Since the current code assumes that all sibling artifacts have the same timestamp, it only checks one random output artifact. If that happens to be the target artifact, the up-to-date check will report that the transformer does not need to be re-run, even though one artifact is not up to date. This patch fixes the two closely related subtle bugs that can lead to this behavior: 1) Get rid of the "convenvience functionality" that always checks the timestamp of target artifacts as a service to users that do not know that they are not supposed to manually touch files in the build directory. This behavior has been obsolete since the introduction of the "--check-timestamps" option. 2) If the "--check-timestamps" option has been given, our invariant about all output artifacts of a transformer having the same timestamp is not guaranteed to hold, as they come from an outside source. Therefore, in this case we must check the timestamps of all output artifacts, not just one. Change-Id: I482fe6060c0dee5fef74a9236a787dc7d40f3b24 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-08267-269/+269
| | | | | | Change-Id: Ib7f9a00bb891fa39c5bc1f891ddbfba1e4d23227 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix artifact cleaner.Christian Kandeler2013-12-121-3/+8
| | | | | | | | | If the "remove all" flag is not set, we must take care to not only skip target artifacts, but also their siblings that are not target artifacts. Otherwise, the build graph can end up in an unexpected state. Change-Id: Ie2fa36f3e489c3bee19f461e16fa093515b01020 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix installation for read-only files.Christian Kandeler2013-12-111-9/+16
| | | | | | | | | | On Windows, we must explicitly add write permissions to the target file before removing it, as the operation will fail if the file is not writable. Task-number: QBS-475 Change-Id: Ide40cc4310e327265b0a5c08f4935866762797b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix transformer comparison.Christian Kandeler2013-12-101-1/+2
| | | | | | | A member was not being taken into account. Change-Id: Icba9831d4536044d2b1dfc8e98dc3e935f944e1e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix serialization of ResolvedTransformer.explicitlyDependsOnJoerg Bornemann2013-12-102-1/+3
| | | | | Change-Id: I814d2662562ce5d31abfc249529d2a2a52f62abc Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix serialization of RuleArtifact.alwaysUpdatedJoerg Bornemann2013-12-102-5/+9
| | | | | Change-Id: I975d6a9b1bbea2ac45a37a9172d2d1490e6fbd96 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix "clean" operation.Christian Kandeler2013-12-041-2/+10
| | | | | | | | We were missing some artifacts, and we also left some empty directories behind. Change-Id: Ib93fb7a6a644e09526c8d4e177d580fe2d870c54 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix artifact visitor.Christian Kandeler2013-12-044-10/+12
| | | | | | | | | The current implementation is overly complex and misses sibling artifacts. Just go through the list of artifacts instead of traversing top-down. Change-Id: Ic665bfc977a1718ee298efda66d741bb701886c3 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* simplify output of detect-toolchainsv1.1.1Joerg Bornemann2013-11-271-2/+1
| | | | | | | | Don't display the Windows SDK version on a separate line. Change-Id: I48d4127c32145e4bde0138f2cfb960378a56c4f4 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* use the Windows SDK version, not the ProductVersionJoerg Bornemann2013-11-271-1/+1
| | | | | | | | | The "ProductVersion" of the Windows SDK is mostly useless for the user. Also, it can contain strange values like "6.2..9200", so better don't use it. Change-Id: I8c56979e4c020215558e328e0d936a8e0765554b Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix Windows SDK lookup for x86_64 buildJoerg Bornemann2013-11-271-6/+14
| | | | | | | | | 64 bit builds of qbs must look in the Wow3264 registry tree. We already did that for VS but not for the SDKs. Change-Id: If96b7d184816c20b7075c5392bc1fdbb45d6f01d Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* add /FS to cpp.platformC(xx)Flags for VS 2013Joerg Bornemann2013-11-271-4/+10
| | | | | | | Task-number: QBS-411 Change-Id: I83436f66e9de4f22e0a980c6322909e9854b91cf Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Better error diagnostics.Christian Kandeler2013-11-272-0/+9
| | | | | | | | - Add sanity check for multiple artifacts with the same file path. - Print more information in case of multiple inputs to a non-multiplex rule. Change-Id: Ic76248fe61ba02bf3ff0820b9c968efc4b04ff20 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix formatting of command line option descriptions.Jake Petroules2013-11-261-23/+28
| | | | | | | Lines now wrap at 80 characters and each line is properly indented. Change-Id: I38f6e25550dfdd4f8fbf84a9431cfca4ba3f9427 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix "invalid subsystem" warning for MSVCJoerg Bornemann2013-11-262-10/+43
| | | | | | | | | | | | Look at the MSVC version of the mkspec Qt is built with to determine the minimum Windows version. Also, use 5.2 as minimum Windows version for 64 bit. Task-number: QBS-406 Change-Id: I4693cc055eb5309e8c5528e94a03d264fc553c67 Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Braces cleanupOrgad Shaneh2013-11-268-26/+18
| | | | | Change-Id: I6ed221814912d80c6fdf41276d521b4da2345df2 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix regression introduced in e0a8ec89Joerg Bornemann2013-11-223-1/+12
| | | | | | | | | Accessing module properties in Group.condition didn't work anymore. We must first propagate the modules to the group, then evaluate the condition. Change-Id: Id3eb799faf91f449740c8213671e32af47683c3f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Take the qbs.install* properties into account when change tracking.Christian Kandeler2013-11-216-0/+49
| | | | | | | | | | | These are currently ignored, because we only look for properties that were requested in prepare scripts. This does not typically happen for installation parameters, but since they end up in the output artifacts, changes to them still require re-setting up the respective build data. Task-number: QBS-359 Change-Id: I571cb4c1a02ea790ddde2f244136c6a0fd6fb627 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix settings export.Christian Kandeler2013-11-211-2/+4
| | | | | | | The current code does not work for list values. Change-Id: I21ae1dcdc1185c48bbccc1ed94b31259f41fb5a4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* evaluate qbsSearchPaths after the item has been fully set upJoerg Bornemann2013-11-204-5/+29
| | | | | | | | | This makes sure that builtin functions like qbs.getenv can be called in qbsSearchPaths. Task-number: QBS-463 Change-Id: I74d50f25fd7e62663a5680741b22bc27db8ea80f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* allow invalid bindings in disabled groupsJoerg Bornemann2013-11-193-1/+10
| | | | | | | | | | | | | | | | This fixes a regression introduced in 7f83ff024e1fe56c71d193a95cc9af988c12660d. It's now valid again to do something like Group { condition: qbs.targetOS.contains("haiku") cpp.specialHaikuOption: "yes, please" } Task-number: QBS-409 Change-Id: I693df9202603c9af7fd7482fa537ed1fb16591a7 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix check for qbs library type.Christian Kandeler2013-11-182-2/+2
| | | | | | | | | | Qt 5 no longer guarantees that "shared" or "static" appear in the CONFIG variable. So assume "shared" whenever "static" is not set. Change-Id: I9f9f71d4aeacd4c083842a01458fdd25a9980523 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* fix filetags language test for 1.1 branchJoerg Bornemann2013-11-141-1/+1
| | | | | Change-Id: I29ace9cb84da2ba2e8eb3be7df55f5a1794d5854 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix FileTagger application for other patterns than *.fooJoerg Bornemann2013-11-144-2/+14
| | | | | | | | | fileTagsForFileName must be called with a file *name*, not the full file path. Task-number: QBS-459 Change-Id: I68c2910c78c4a7cc1ac53100e1fec57faaa46272 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix 'Unexpected item type' error messageJoerg Bornemann2013-11-146-7/+25
| | | | | | | | | | | | | | | The property declaration check shadowed this error. An erroneous file like Appliaction { // mis-spelled Application name: "foo" } Yielded the error "undeclared property 'name'", when it should say "I know nothing about Appliaction". Change-Id: I20d03b13a3fa02b6539950a50d7bae1c5acbfbac Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* build fixJoerg Bornemann2013-11-131-1/+1
| | | | | | Change-Id: I05dcf2d3a4e4f1e20081469382faf1912f676f8d Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* detect-toolchains: set qbs.endianness for MinGWJoerg Bornemann2013-11-131-0/+2
| | | | | | | | Task-number: QBS-446 Change-Id: I4a1b88d1657e7ec71dc6e41e690f00dc606d3931 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* detect-toolchains: set qbs.architecture for MinGWJoerg Bornemann2013-11-131-0/+7
| | | | | | | | Task-number: QBS-446 Change-Id: I1c67c780dad5b5cc0444ede950809ae3cf71c67a Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
* translate multipart module names in moduleProperty functionJoerg Bornemann2013-11-122-1/+9
| | | | | | | Task-number: QBS-452 Change-Id: Ibd83e1866aee0e2922bfa6f2541151b58fb24ea5 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix bug in rescuing build data.Christian Kandeler2013-11-112-9/+18
| | | | | | | | | | We tried to get information about an artifact's children from the artifact itself. However, that artifact could have gotten disconnected along the way and not know anything about its children anymore. We must therefore save such information in an extra data structure. Change-Id: Id2043f97e857bf8779184e88b1425fdcf85e3f2e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* don't throw exceptions through script engineJoerg Bornemann2013-11-111-2/+11
| | | | | | | Task-number: QBS-452 Change-Id: I199c77236196f60cad485999f7b909976a6dd90d Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Take rules into account when tracking changes.Christian Kandeler2013-11-113-0/+62
| | | | | | | | | This will cause rebuilding if, for example, a rule in a module that the product uses gets its source code changed (and the rule is actually being used). Change-Id: I009685c85fcc8fa0ae3ecc7c32194685a1558104 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* make qbs-config-ui a non-console applicationJoerg Bornemann2013-11-062-0/+2
| | | | | | | Task-number: QBS-445 Change-Id: Ib26846fefb620e4ade6b7d7b727e21fdf44b9103 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix look-up of scalar module properties.v1.1.0Christian Kandeler2013-11-052-9/+9
| | | | | | | | | | | | These must not be searched for recursively. For instance, if such a property is set to different values in different instantiating modules, there is no sensible heuristic which value should be used. The current implementation just takes the one found first, which is just as wrong as any other solution that looks beyond what is set directly in the product or artifact. Change-Id: I65c29538a437872e2d1e1c4043f2c5cfa301ebb9 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix crash on missing Depends items in Export itemsJoerg Bornemann2013-11-051-0/+1
| | | | | | | Task-number: QBS-442 Change-Id: I6f08ca595665fca35451027c79be99f5ebcefb9f Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* fix use_installed.priJoerg Bornemann2013-11-053-4/+13
| | | | | | | The lib version number must be taken into account. Change-Id: Ic97dc43ef526e8f528c94ed15d92e498b143fc7d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix static buildJoerg Bornemann2013-11-041-2/+6
| | | | | Change-Id: Idd750eca86e123e01a61b68046115b54e951ae40 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Fix file tagger pattern matching.Christian Kandeler2013-11-041-1/+2
| | | | | | | | | | | | When first creating a FileTagger object, we implicitly set the pattern syntax to "RegExp". On restoring, we set it to "WildCard". We now use wildcards always, as the documentation says. Note that the only reason the bug has not manifested itself yet is that the shortcut in FileInfo::globMatches() catches all our existing file tags. Change-Id: Ibedb54fb3a890ae6ab35a8f073d85cc4ebfc36bc Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>