summaryrefslogtreecommitdiffstats
path: root/qmake/library
Commit message (Collapse)AuthorAgeFilesLines
* move setting of _QMAKE_{SUPER,CONF,CACHE}_ to a more logical locationOswald Buddenhagen2013-11-041-24/+25
| | | | | | | | | | | | | there is no point in setting the variables already when peeking into the caches, as that is done in a separate evaluator anyway. it also makes no sense to have them set while loading the spec itself, as it's not permitted to do anything with the caches. so set them at the next convenient point, which is right before actually loading the caches. Change-Id: I3717ddf94353dc04e12c52e542f16ed27b578e14 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* qmake: Expose qmake arguments as QMAKE_ARGSTor Arne Vestbø2013-10-242-0/+3
| | | | | | | | Allows project files or mkspecs to call qmake recursively using system() with the right arguments, which we use to fix the ios default_post.prf. Change-Id: I90d69e2b156bb0f0af1279188b11f81c84c24fb8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add JSON parsing support to qmake.Morten Johan Sørvig2013-10-171-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add qjson* implementation files from corelib/json to the qmake build. Add a read-only compile mode, enabled by defining QT_JSON_READONLY. Add qmake built-in function parseJson(file, into) which parses a json file into the given variable. qmake uses a flat key -> value-list implementation for storing variables, which means that some hackery is need to represent arbitrarily nested JSON. Use a special "_KEYS_" variable for arrays and objects: Arrays: ["item1", "item2"] $${array._KEYS_} -> 0 1 2 $${array.0} -> "item1" $${array.1} -> "item2" Objects: { "key1" : "value1", "key2" : "value2" } $${object._KEYS_} -> key1 key2 $${object.key1} -> value1 $${object.key2} -> value2 Change-Id: I0aa2e4e4ae14fa25be8242bc16d3cffce32504d2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qmake: Update internal mkspec on changes to QMAKESPECTor Arne Vestbø2013-10-112-1/+9
| | | | | | | | | | Allows the macx-xcode mkspec to be a wrapper around other mkspecs. Since QMAKESPEC can now be set in the spec, we have to ensure not to append to QMAKESPEC. Change-Id: Idf33ff38147f14c488f14b426c02d9a739fdaecf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* qmake: Evaluate extra configs before loading default_preTor Arne Vestbø2013-10-112-6/+19
| | | | | | | | | | Exclusive builds uses setExtraConfigs to apply the particular CONFIG of each build pass. Unfortunately we were not applying these extra configs early enough in QMakeEvaluator::visitProFile() for them to be picked up/usable by default_pre, something that can be useful. Change-Id: I423a4688250a15f0c1a2cc65a48f0bbc14ad4497 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* qmake: Load extra variables only if also loading pre-filesTor Arne Vestbø2013-10-111-4/+4
| | | | | | | | | | The extra variables only need to be applied once, when we are loading the pro file (and hence are loding pre files), not for every single pri/prf that's loaded as a result of that (which do not load pre files themselves). Change-Id: I3118694a8eeccf2dc32c4f62df754033fad13528 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* make setting a bad $$[QMAKEFEATURES] not crash qmakeOswald Buddenhagen2013-10-073-12/+17
| | | | | | Task-number: QTBUG-29642 Change-Id: I9cc209eb313f03bf342bcb64b1de3005755700a7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qmake: add $$title() function to convert strings to title caseTor Arne Vestbø2013-09-241-2/+10
| | | | | Change-Id: Ic535a8f7cc2ab7b7f1948b2d0237ebe9a71c7ec7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qmake: Expose ARGC to qmake functions to be able to check argument countTor Arne Vestbø2013-09-212-0/+3
| | | | | | | | | ARGS already exists, but is a flattened list of the arguments, so both foo(bar, baz) and foo(bar baz) will give count(ARGS, 2), making it unreliable for validating arguments to qmake functions. Change-Id: I0bcc16614c64000169431327da48fd1a26708e67 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* avoid deadlock in cache() during spec/cache loadingOswald Buddenhagen2013-08-271-1/+1
| | | | | | | | | | | | | sync up; this doesn't actually do anything in qmake. if we end up calling cache() from within the initialization of the base context, we cannot wait for for the completion of that initialization before we proceed, obviously. Change-Id: If30c6f3665fe423e767373a8821c406b2f5e0eca Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/b64b4431c20afd9e39c1463e736f998ef450688f)
* lock baseEnv in cache()Oswald Buddenhagen2013-08-272-34/+58
| | | | | | | | | | | | sync up; this doesn't actually do anything in qmake. as we modify the environment, it must be properly locked. this implies that initFrom() also needs to be called with a lock. Task-number: QTCREATORBUG-9835 Change-Id: I48bae9af9adaa0518e5a9db0ba08ff057ae14f9f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtcreator/d022a2d19cecb00397c2a215fc4e3bf64b1e627b)
* always check for baseEnv init failureOswald Buddenhagen2013-08-271-0/+2
| | | | | | | | | | | | | sync up; this doesn't actually do anything in qmake. creator's file watcher can trigger many parallel, entirely non-hierarchical project reloads. if there is enough of them to exceed the thread pool size, some will be serialized already by qtconcurrent, not by our wait condition. these should notice a faulty spec, too. Change-Id: I8ce40cb90fbc28045127881d57ec94e125df79af Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qtcreator/759d0a69dd3973b4785b6f9412f46666a05cdf85)
* change reporting of missing filesOswald Buddenhagen2013-08-201-3/+4
| | | | | | | | | | use the new parser flags to report all i/o errors directly. as a notable side effect, the "WARNING" prefix is gone (even though it is still treated like that, which is mildly insane to start with). Change-Id: I084375d5e7a3314ae763795f7c318804a9fb84b6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* complain about absent files to -pro argument (in lupdate)Oswald Buddenhagen2013-08-202-6/+7
| | | | | | | | | this doesn't actually do anything in qmake. Change-Id: I908fc3792bdc321370e51be98adf7a9c81e37a85 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qttools/e1f3732197ef77a29cb7f3c1ce094b3f31a7b689) (cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
* avoid boolean argument trap: introduce QMakeParser::ParseFlagOswald Buddenhagen2013-08-203-4/+12
| | | | | | | Change-Id: I26ce032a1aa044e9a4da0c8708a4490b07374992 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qttools/066b08fc62c67d586996ea4e272ef05dd3865fac) (cherry picked from qttools/226f013441990aa4a58f7c82e284057cff659959)
* implement simple VFS to support caching during project parsingOswald Buddenhagen2013-08-077-66/+306
| | | | | | | | | | | | sync up with qt creator - for qmake itself, this is just a minor refactoring. Change-Id: I833253f81c3159056fab2ff888f293b36cc2ef56 Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/66802ef8bf7989dc025e34bf91d93576189c483c) (cherry picked from qtcreator/69542826fa643a0fed2fc9e717f072c2852dc017) (cherry picked from qtcreator/196424115338fb9a535810704b7d814d318b0462) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* update m_featureRoots less aggressivelyOswald Buddenhagen2013-07-191-1/+2
| | | | | | | | | | | | | it's not necessary to immediately re-calculate the roots after assigning QMAKE_PLATFORM - it's sufficient to do it on-demand, so merely invalidate them. this avoids that we re-calculate them multiple times without ever using them in between while processing specs with distributed platform assignments. Change-Id: If508594764811b96a577fc81c5ded34ab0453148 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> (cherry picked from qtcreator/28df27d924bb407791a76de8159c9ffa6efde283) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* cache results of feature searchOswald Buddenhagen2013-07-192-24/+62
| | | | | | | | | | | | | looking up the same files in the same locations over and over again is a rather significant waste. in particular, looking up the CONFIG flags that don't correspond with features has a measurable impact on qt creator's project loading time. Task-number: QTCREATORBUG-9154 Change-Id: Ibae3d8b7797e706a6416a7d45c77734ab1281b51 Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/fa27cd79e05aed4ebd16d5648480cc7d48fefd43) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* minor optimization: don't concatenate strings needlesslyOswald Buddenhagen2013-07-193-1/+8
| | | | | | | Change-Id: Iddec1a818ff9f3ad8b12491100883e433e4b8246 Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/12652c20711fd29dcba62b8d5ba71c077d8bd06c) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* don't unnecessarily use QFileInfo::filePath()Oswald Buddenhagen2013-07-191-3/+3
| | | | | | | | | just directly use the filename we constructed it from. Change-Id: Ia428a2cb4b192fea6bde62dfbf35361bcfc4b21e Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/571234786a3ff7e8e3a9220f12d22a9f74f7a53c) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-07-112-6/+10
|\ | | | | | | | | | | | | | | | | | | Conflicts: qmake/generators/mac/pbuilder_pbx.cpp src/corelib/json/qjsonwriter.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
| * don't crash if builddir is suffix of sourcedir (or vice-versa)Oswald Buddenhagen2013-07-041-1/+2
| | | | | | | | | | | | Task-number: QTBUG-32145 Change-Id: I97a6e2ebd51350cbf39c86efa5c26a376c49da95 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * make split_value_list() even less sane againOswald Buddenhagen2013-07-031-5/+8
| | | | | | | | | | | | | | | | | | | | | | contrary to what one may expect, it's actually *not* supposed to remove the meta-characters it interprets. luckily, this function is not used much any more ... Task-number: QTBUG-31877 Change-Id: I2b60f9b173140da78db2b07b596cc2e5f6e6d555 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-06-272-4/+5
|\| | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/create_cmake.prf Change-Id: I94aea83b83833395d5db399209e0e51b92ef23b5
| * Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-252-3/+4
| |\ | | | | | | | | | refs/staging/stable
| | * make Makefiles not depend on .qmake.superOswald Buddenhagen2013-06-152-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this avoids that an empty rebuild after a complete build re-runs qmake everywhere again. according to 1f83f0cf2a this is the behavior i originally intended, but somehow it got lost when switching to the new interpreter. Change-Id: Id5158d7e272fdee4f4a041fb7c828295a0a86684 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * | Fix incorrect uname usage.Chris Stylianou2013-06-211-1/+1
| |/ | | | | | | | | | | | | | | | | The POSIX function uname() can return any non-negative value for success. - Example: Solaris 10 returns 1 on success. See: http://pubs.opengroup.org/onlinepubs/009695399/functions/uname.html Change-Id: Ic3d51f94a31d8b562b28a2d09df3d31b04c77dc8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | don't copy mkspecs to build directoryOswald Buddenhagen2013-06-121-0/+2
| | | | | | | | | | | | | | instead, teach qmake to use the mkspecs dir from the source dir as well. Change-Id: I9edac11f8997fcb0594d0a67419d4733dd4ed86b Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | introduce /src qmake property variantsOswald Buddenhagen2013-06-121-19/+32
| | | | | | | | | | | | | | | | this is for shadow builds during build time, where the respective files are expected in the source dir. Change-Id: I18dcfbdef99e1562a51dacac333642cae8105ebd Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | remove pointless string conversionOswald Buddenhagen2013-06-121-2/+1
| | | | | | | | | | Change-Id: I1640083007ed0c428dfb8ab5ce8b68a7d7e2a749 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | make .qmake.{super,cache,conf} find "anchored" featuresOswald Buddenhagen2013-06-121-0/+2
| | | | | | | | | | | | | | | | | | these files function as "anchors" for mkspecs/ and features/ directories used by projects which load these files. ironically, these files didn't see these feature files themselves. Change-Id: I590855eb4a9d2c72b9abfcaa431d2f85a719c6e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | find features/ under mkspecs/ of source & build rootOswald Buddenhagen2013-06-121-2/+6
| | | | | | | | | | | | | | | | | | | | we were finding features/ directly in the source & build root, and we were finding features/ under mkspecs/ from $QMAKEPATH and other mkspecs locations, but we omitted the "transitive hull". this was counterintuitive. Change-Id: I9823e6606467c98f264c81385250da92311f51ca Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | add missing ifdeferyOswald Buddenhagen2013-06-121-0/+4
| | | | | | | | | | | | | | | | sync up implementation with qtcreator. Change-Id: I6a1578818512fa3b0773faf276a1d56881eb06d7 (cherry picked from qttools/582cbddc6ba1b74a7e4e07e0b5c23d47de6838cb) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | fetch all properties from qmakeOswald Buddenhagen2013-06-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sync up implementation with lupdate & creator. no actual effect on qmake. don't filter out ^QMAKE_.*: - QMAKE_MKSPECS is not printed any more, so needs no filtering - QMAKE_VERSION can be simply used now, as we are now rather close to the real qmake - QMAKE_SPEC and QMAKE_XSPEC need to be fetched - this fixes the default spec resolution Change-Id: Ifcfa8b5b9e2bbf5d995940e1bb7f55e7d67aed3e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qttools/0037bef09ca77c5ae4d20bd09294ba1d57537e09)
* | make stubs for dangerous/useless qmake functions in limited modeOswald Buddenhagen2013-06-121-8/+20
|/ | | | | | | | | | sync up implementation with lupdate & creator. no actual effect on qmake. Change-Id: I1bdeb759e895e4200f09332dadf8a6cef348182f Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> (cherry picked from qttools/94ab2efb2d155d3c1ca7b91c1daf443a149bcf1f)
* update size calculations for assignment statementsOswald Buddenhagen2013-05-202-4/+5
| | | | | | | | | this was forgotten when the value lists were extended by a size hint. Change-Id: I6f9b55ed671224a9b8735c8d937f94aac4a73a42 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> (cherry picked from qtcreator/f24c9865306624c2fc150d4bd262a5c4d5a3689a) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* QMakeEvaluator: Set pro file as source for internal variablesOrgad Shaneh2013-05-201-4/+5
| | | | | | | | | | Task-number: QTCREATORBUG-7006 Change-Id: I3f599f92d03b6f9fdf65b12cf4090e28cc497fbd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> (cherry picked from qtcreator/6e3af2bf2e2833e0ecbc9b366af8e06abd7ecf96) Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix warningOrgad Shaneh2013-05-201-1/+1
| | | | | | | | | | | Warnings came up using MinGW 4.4: * qmakebuiltins.cpp: 'QString windowsErrorCode()' defined but not used [...] Change-Id: I80827f7f740ff380f13cef96d6b43baaa7e179cb (cherry picked from qtcreator/0e13cf3faffc7463ae2bf535dfdb008202112cc4) Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Qt4Project: Do a build_pass evaluationDaniel Teske2013-05-202-12/+2
| | | | | | | | | | | | Some projects set TARGET or DESTDIR only in the build_pass Task-number: QTCREATORBUG-4273 Change-Id: I3673dd93b37b10102a0c1f1ce053e1aef8aaf53f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/95169eb8e39c6f43b7e74fbb18d4db19a38b0124) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* fix warning in ProStringList_joinJoerg Bornemann2013-05-071-1/+1
| | | | | | | | Fix C4267 MSVC warning. Make sepSize an int, because this function is never called with a size_t. Change-Id: I2b834fe7c1408e34d55d9f137231e2f5816f3f1d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'gerrit/release' into stableSamuel Rødal2013-03-211-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/features/qt_module_headers.prf mkspecs/features/qt_tool.prf src/angle/angle.pro src/tools/bootstrap/bootstrap.pro tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
| * clean paths of found files in prepareProject()Oswald Buddenhagen2013-03-121-3/+3
| | | | | | | | | | | | | | | | any of the directories may be the root, which would lead to double slashes in the constructed filenames. Change-Id: I053e167a19b795b40e780fc29db356c7f24d286a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | don't send output of $$join() and $$sprintf() through split_value_list()Oswald Buddenhagen2013-03-161-3/+2
| | | | | | | | | | | | | | | | | | in the case of sprintf it's surprising, in the case of join it's anti-thetical. Change-Id: I4eb7e56d31ac6ed68adf852f1a19b33554d38eb4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | make split_value_list() a bit less sane againOswald Buddenhagen2013-03-131-2/+7
| | | | | | | | | | | | | | | | | | let the backslash escape only quotes (and itself), after all - $$list() (one of the main users of this function) is commonly used with (windows) path lists, so letting it escape anything would make a royal mess. Change-Id: I2dae2e4508903e62c190c1497da68d53978118e7 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | make split_value_list() saneOswald Buddenhagen2013-03-121-31/+33
| | | | | | | | | | | | | | | | | | don't count parentheses, don't nest quotes, don't create empty elements, let backslash uniformly escape. in short, behave like a sane parser. Change-Id: I29252fbe14fd6d28217450ec41cf8acfb2e30681 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | permit returning from filesOswald Buddenhagen2013-03-121-12/+17
| | | | | | | | | | | | | | | | | | this allows skipping an entire feature file if a condition is not fulfilled, without putting the whole body inside a conditional. Change-Id: I84fe9c94dda58c794fb52c3f163b40563b0db30a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | remove pointless initialization of qmakespecOswald Buddenhagen2013-03-121-1/+0
| | | | | | | | | | | | | | we have proper fallback paths further down the line. Change-Id: I3648cc985d21bbec4c2c24e179830db4467af210 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-02-181-3/+3
|\| | | | | | | refs/staging/dev
| * remove automatic splitting from $$() expansionsOswald Buddenhagen2013-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $$(FOO) would automatically split the contents of the environment variable at whitespace (and interpret quoting inside it). the way to prevent the splitting (but not the quote interpretation) would be using "$$(FOO)". this behavior is entirely unexpected and thus an incredibly effective source of quoting problems - according to a grep over the whole qt sources, there isn't a single case where things were done right. in qt creator, well over half the cases are wrong. also, the "feature" seems entirely pointless: nobody uses spaces as separators in environment variables. consequently, simply remove it, even in a patch release. i'm postulating that nobody will complain. Change-Id: I9ed3df1b0d1ef602acd78ceb118611d294561da6 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Update feature paths on assignment to QMAKE_PLATFORMTor Arne Vestbø2013-02-182-1/+4
|/ | | | | | | | | | | Instead of after parsing the makespecs, were we assumed QMAKE_PLATFORM had been set by the makespec and did an explicit update. Allows loading platform specific features from within a makespec after updating QMAKE_PLATFORM. Change-Id: I0eb3b7fb88ce48b00a384850c5d87223c06234d7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>