summaryrefslogtreecommitdiffstats
path: root/qmake/library
Commit message (Collapse)AuthorAgeFilesLines
* add qmake evaluator testOswald Buddenhagen2015-05-201-0/+1
| | | | | Change-Id: I31b95daede5edef245dd1ba447f2937a0db34232 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* move get{,Hash}Str from QMakeEvaluator to ProFileOswald Buddenhagen2015-05-204-28/+32
| | | | | | | this makes it possible to use these functions without an evaluator. Change-Id: I23e4ec141b427f4c3c8b647305532be179058c07 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove bogus parens from error messagesOswald Buddenhagen2015-05-201-2/+2
| | | | | Change-Id: I2683a4fb19a7251dc537e3265db3ba28079eb4b8 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* trim whitespace from windows error messagesOswald Buddenhagen2015-05-201-1/+1
| | | | | | | the messages contain a trailing CRLF, which is not helpful. Change-Id: I4a27115a191dc416a62e28a41f2a9c5893bdc64b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* remove trailing dots from some error messagesOswald Buddenhagen2015-05-201-3/+3
| | | | | | | | the i/o functions are not very consistent about having the dot already in the message. the windows api does, and qt passes this on. Change-Id: I2d1a213965e15478985d6eff205689ea44aa2a03 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* make defined() error message tell about "var" typeOswald Buddenhagen2015-05-201-1/+1
| | | | | Change-Id: I21d994ebaee2db0d9b114812a8f89bb680ca311e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* make infinite loop protection work even without an iterator variableOswald Buddenhagen2015-05-201-2/+2
| | | | | | | ... (which is the usual case). Change-Id: I464b6b284f963df45c7340ed079d540b528136f0 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* fix quote nesting in split_value_list()Oswald Buddenhagen2015-05-201-1/+2
| | | | | | | a single quote must not disrupt a double quoted string and vice-versa. Change-Id: Ibb277bc1c930a7dbe9199ca572507ababbcfae4c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* add autotest for ProStringOswald Buddenhagen2015-05-201-0/+12
| | | | | | | also adds documentation, which is kind of a sanity test. ehm. Change-Id: I6b520e8b505a2bfbb1e376fa72be0f140227a3a4 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* add autotest for qmake parserOswald Buddenhagen2015-02-253-0/+259
| | | | | Change-Id: Ib3dcb6c1aaac20ca6a3bc0dc564e16ec7bd152db Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* catch missing closing braces outside any scope as wellOswald Buddenhagen2015-02-251-1/+1
| | | | | | | | it doesn't make a whole lot of sense, but it's possible to create braced blocks which have no semantic meaning. Change-Id: Id55dfdee1aa3fade507cbd1eb34bdffcd7eb6bff Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* don't make an even number of bangs almost entirely invisibleOswald Buddenhagen2015-02-252-10/+9
| | | | | | | | otherwise we'd silently accept this nonsensical code: !!defineTest(foo) {} Change-Id: I66b59c8a89852c6451ce8d7269a3dc66a53e3b1f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* be more strict about bogus operatorsOswald Buddenhagen2015-02-252-6/+59
| | | | | | | | we now warn about the pointless ones, and error out in cases that already were semantically bogus. Change-Id: Ifd80014af0fc53e3cc42561c4270d1dca234568f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* make some messages less ambiguousOswald Buddenhagen2015-02-251-3/+3
| | | | | Change-Id: I6032fdc1c1e6b1fb852da09e47990de03966fa3c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* don't write pointless TokAnd at start of control scopesOswald Buddenhagen2015-02-251-2/+8
| | | | | | | | | | a colon after else/for is non-AND-ing, i.e., it's no logical operator, but "punctuation". therefore, putting an operator into the token stream is bogus. it didn't hurt execution, so it went unnoticed, but it still wasted some bytes and cpu cycles. Change-Id: If5578074257feed299bda1630bf0dfe72eb395ae Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* factor out putOperator()Oswald Buddenhagen2015-02-252-7/+10
| | | | | Change-Id: I1b01e36e15dc93fc4e37597b66841d7102fa6b0d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* move parseError() call into bogusTest()Oswald Buddenhagen2015-02-252-23/+15
| | | | | | | they come always in pairs (with one exception). Change-Id: Ia2f69a8776bd7146ff2fb18d13cc6bb5b2c71139 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* make all parse errors invalidate the parse resultOswald Buddenhagen2015-02-252-12/+6
| | | | | | | they have been semi-warnings for a long enough time now. Change-Id: I3fffd63f7b44b30d2dc18cdcd74221c10e98399d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* always flush scopes on closing braceOswald Buddenhagen2015-02-251-1/+2
| | | | | | | | | | | | | without that, both the lines cond1 { cond2: VAR = val } and cond1 { cond2: else: cond3 } would yield two bogus errors: first an excess brace, and then a missing one. Change-Id: I8609106c1ad387577deec2077e2ce13507ac4d3f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* don't write pointless TokFuncTerminators into the streamOswald Buddenhagen2015-02-251-1/+3
| | | | | | | | | | | | we are transforming "magic" function calls into other structures. past that point it's wrong to keep the function argument list terminator in the token stream. this went unnoticed, because in this context it was equivalent with the expected value list terminator (which was simply never reached). Change-Id: I3dc6719273ce9d663db867f355eba682ba6ccf2c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| * fix fallback architecture for MSVCJoerg Bornemann2015-01-291-0/+4
| | | | | | | | | | | | | | | | | | Use x86 for a 32 bit build of qmake and x86_64 for 64 bit. This is needed for shells that do not set VCINSTALLDIR. Change-Id: I0843c1a590161669530b99f45ab59d523e6596c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | move some functions into ProStringList for saner OO designOswald Buddenhagen2015-02-125-35/+30
| | | | | | | | | | Change-Id: I60f00f38f459fc9f8eebee9187158e4198fc9546 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1115-105/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | make quoting in the prl writer more robustOswald Buddenhagen2015-02-052-2/+4
| | | | | | | | | | Change-Id: Idd9f64ac608b7e4ed840d5d9925bf741e03d78ab Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | make shellQuoteWin() be more sparing with circumflexesOswald Buddenhagen2015-02-041-13/+35
| | | | | | | | | | | | | | | | | | | | | | | | ... as newer versions of nmake (and jom, for compatibility) have botched circumflex processing (they simply don't do it when shortcutting the shell evaluation). as a side effect, the output is also more readable if the string contains quotes. Change-Id: I0506b59ceecb70da258c482f9973156b2803066d Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | always use single quotes in shellQuoteUnix()Oswald Buddenhagen2015-02-041-1/+1
| | | | | | | | | | | | | | | | double quotes cause mingw32-make to switch from direct execution to going through the shell, so avoid them. Change-Id: I05b71a050e425a1b327f747fab01755ff528ba0b Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | remove pointless return value from QMakeParser::read()Oswald Buddenhagen2015-02-044-30/+22
| | | | | | | | | | | | | | | | | | | | it always returned true nowadays. an obvious followup effect is that the return value of parsedProBlock() doesn't need to be null-checked any more as well. Change-Id: I782785cab9b721a78a342a010921a73e642ebe7f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-01-211-15/+42
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
| * fix MSVC target architecture detection for amd64_x86Joerg Bornemann2015-01-161-15/+42
| | | | | | | | | | | | | | | | | | | | | | When using the cross-compiler toolchain for 32 bit on a 64 bit machine, qmake generated a 64 bit VS project. This was because qmake didn't know about the amd64_x86 cross-compiler, and qmake did not use the first MSVC bin directory it found in PATH. Task-number: QTBUG-43457 Change-Id: I50c6f7bb9afe44a58321c670d680dbcc7cd07223 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Let qmake find the number of processors onlineThiago Macieira2015-01-111-0/+37
|/ | | | | | | Instead of trying to load in ltcg.prf and cache the value. Change-Id: If485ff68fc6ff9d9cf7009cd72d5e702d0199c7f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* work around MSVC2010 ICEOswald Buddenhagen2014-10-291-2/+2
| | | | | | Task-number: QTBUG-42064 Change-Id: Ifffcc0cf9109b76d79f603a13792d7fd9979761c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-2415-285/+165
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix compilation after qstringlist.h stopped including qdatastream.hThiago Macieira2014-08-081-0/+1
| | | | | Change-Id: Ida09e794262dce78cd5169aac56b610fabc9082c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* add priority sorting to $$resolve_depends()Oswald Buddenhagen2014-07-302-14/+21
| | | | | | | | all else being equal, items with a higher numerical priority will appear first in the result. Change-Id: I4ee37ff404a53c4152a1e4fc2fc3c23ef525234d Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* pass a pointer instead of a reference to initFrom()Oswald Buddenhagen2014-06-202-11/+11
| | | | | | | | | | msvc thinks that it's impossible to create a null reference (because some language lawyer said so) and thus complains about our assert that checks the reference's validity. work around by not dereferencing the pointers we already have. Change-Id: Ife2288d4187860105de12fdebc0e671e0159ace3 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* qmake: Use QDir::toNativeSeparators on paths printed as infoAlessandro Portale2014-05-081-3/+3
| | | | | Change-Id: I8c587164bcff742f7ac8ad3f3f28e0b16645cb2a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* fix $$shell_path() for mingw+shOswald Buddenhagen2014-04-301-2/+10
| | | | | | | | the msys shell expects unix-like paths with drives converted from d:\ to /d/. Change-Id: I09e25ed2c868702e5d7d8b9cc8c04cc13410eeff Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* de-duplicate codeOswald Buddenhagen2014-04-041-3/+3
| | | | | Change-Id: Ic056acf739659215241c1cab6a462b1ab591dc78 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qmake: add replacement function getenvJoerg Bornemann2014-03-201-1/+11
| | | | | | | | | This is useful for querying environment variables which have parentheses in their name. Such jewels exist on Windows. The usual $$(VARNAME) syntax fails for those. Change-Id: I1d2766cabdc7f637caa9ae6408967685e02f5029 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* don't turn = into += in cumulative modeOswald Buddenhagen2014-01-151-25/+4
| | | | | | | | | | | | | | | | it leads to pathological cases where the number of loop iterations may go way beyond the reasonable. this means that users need to avoid using the = operator in alternative branches that lead to different sources/subdirectories being included into the project. this is a bit of a corner case anyway, as people usually add directly to SOURCES/SUBDIRS. Task-number: QTCREATORBUG-1595 Change-Id: I7783e318fbc2790f6a853ba4e3f4a12db881feb5 Reviewed-by: Daniel Teske <daniel.teske@digia.com> (cherry picked from qtcreator/30bd7fcce1aef974f6af9eaa6532aa1f2b6192d2) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* set QMAKE_INTERNAL_INCLUDED_FILES even without PROEVALUATOR_FULLOswald Buddenhagen2014-01-151-4/+0
| | | | | | | | | | some qt prfs use this variable, so better set it it to avoid some noise. Change-Id: I606c88dd7664b1cd8b490d60badd5c6bf80fd1c9 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> (cherry picked from qtcreator/e64cc71194cbe283dfe9bd2cd688f01fcdcadf34) Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* do not look for mkspecs/ directories in project treesOswald Buddenhagen2014-01-071-21/+0
| | | | | | | | | | | | | this pretty surprising behavior would interfere with building the examples from an installed qt tree with qmakes from other qt builds. .qmake.conf (and .qmake.cache) files provide a possibility to explicitly "anchor" project roots, so there is no point in having a second, even more magic way to do it. Task-number: QTBUG-35485 Change-Id: I8fd4fda67cabafdf55e7a98282dcdfaffb4a405e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* support a cache that is really just a cacheOswald Buddenhagen2013-11-144-27/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | unlike .qmake.cache & co., the presence of this file has no magic effects on where mkspecs, modules and other things are searched. as the obvious name "cache" is of course already taken, we call it "stash". the file is searched up to the super cache (if present), otherwise up to the normal cache/conf (if present), otherwise up to the root. if it's not found, it is created next to the super cache (if present), otherwise next to the cache/conf (if present), otherwise in the current output directory. note that the cache really should be created and populated by the top-level project if there are subprojects: otherwise, if there is an "anchor" (super/cache/conf), subprojects would race for updating the cache and make a mess. without an "anchor", each subproject would just create its own cache, kind of defeating its purpose. this is no different from the existing "cache", but it's worth mentioning that removing the "anchoring" function does not remove the "nesting order" constraint. Task-number: QTBUG-31340 Change-Id: I786d40cef40d14582a0dd4a9407863001bec4c98 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* clean superfile and cachefile paths upon creationOswald Buddenhagen2013-11-141-2/+2
| | | | | | | | | otherwise, if the output dir is the root, the path would be denormalized. the code for finding existing files already does that. Change-Id: I56d70477e9c9ffcd936325068624a84df10ffd87 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* 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>