summaryrefslogtreecommitdiffstats
path: root/qmake/option.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix host vs. makefile directory separator messOswald Buddenhagen2012-07-281-1/+0
| | | | | | | | | | | | | | | | | the system path separator and shell are bound to the host system (system() will use cmd even on mingw with sh.exe in path). the makefiles otoh may depend on what the qmakespec defines. consequently, add $$system_path() and $$system_quote() (for use with system() & $$system()). $$native_path() is renamed to $$shell_path() and should be used with $$shell_quote() to produce command lines in makefiles. $$QMAKE_DIR_SEP needs to be applied to Option::dir_sep right after parsing the spec, so it is available to $$shell_{path,quote}(). Change-Id: If3db4849e7f96068cf03a32348a24f3a72d6292c Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* move cachefile_depth calculation out of project evaluatorOswald Buddenhagen2012-06-271-0/+5
| | | | | | | it has no business there Change-Id: I6d1a4b55b5acacc470cc109a6c69a907abbba312 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* remove possibility to request project recursion from within a pro file againOswald Buddenhagen2012-06-271-4/+4
| | | | | | | | | | the feature was implemented for the abld/sbs2 generators only, and is of course undocumented. this reverts most of commit e795e61ef93f8080f9938ac49f2fca306644af85. Change-Id: Ibd1726b036ce6c45f8e678ea996218f774f8aed2 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* dispose of Option::host_modeOswald Buddenhagen2012-06-271-19/+4
| | | | | | | | | it was used only for determining the path separator, so do that directly. the -macx option went bye bye, as it is redundant with -unix now. Change-Id: Ib8344c042db56e05af75d263447311d4b43a3bf0 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* dispose of Option::shellPathOswald Buddenhagen2012-06-271-2/+0
| | | | | | | use isWindowsShell() in the one remaining case. Change-Id: I25eab398ef50df5a7f4ec808279b83ca900e3c58 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* repurpose deprecated -E switchOswald Buddenhagen2012-06-271-1/+0
| | | | | | | | | instead of dumping the variables as we are going, dump everything at the end. this is potentially useful, as opposed to the previous functionality which was redundant with -d. Change-Id: Icf14703cb93e03f7079dfc0266b219ad9c902133 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* don't overuse variables()Oswald Buddenhagen2012-06-271-4/+4
| | | | | Change-Id: Ib2da88e5e29c0bfecc39a9c06e82a34a4bd0b1e6 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make a bunch of invariant variables non-magicOswald Buddenhagen2012-06-271-0/+8
| | | | | | | | instead of resolving them on-demand, just initialize the value hash with them. less magic and faster. Change-Id: I28cb6c21ae6ae60a33734f62acdef0794420ba8f Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* move initialization of numerous variables to spec_pre.prfOswald Buddenhagen2012-06-271-73/+14
| | | | | | | | this is cleaner by design and allows removing some hacks. Change-Id: I3270195b5d62caa476ffde7c1e1ef43cec99c565 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* remove QMAKE_EXT_H_MOC and QMAKE_CPP_MOD_MOC from OptionOswald Buddenhagen2012-06-271-8/+0
| | | | | | | | these are not actually used inside qmake since ever the code was factored into moc.prf. Change-Id: I545f4857ca3f0b4bf2439703700069ac67ad4ca2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* purge QMAKE_MOD_SYSTEM_ENV from Option & co.Oswald Buddenhagen2012-06-271-4/+0
| | | | | | | this is entirely unused Change-Id: Ia0368b1d90f61b64178e28479a2088a19aa418e3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't read QMAKE_DIRLIST_SEP back into Option::dirlist_sepOswald Buddenhagen2012-06-271-2/+0
| | | | | | | | it's really only a host setting which is not used any more past the now removed assignment. Change-Id: I62c61c893697eb9a7e7be550311bf152d5a8206e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't make prf_ext overridableOswald Buddenhagen2012-06-271-4/+0
| | | | | | | | it's entirely pointless Change-Id: I1da3c05a0b4f6ac8cea6ecc64ce3a237957440f5 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* revamp handling of qmake target modeOswald Buddenhagen2012-06-271-9/+0
| | | | | | | | | | | the project evaluator becomes oblivious of the target mode. the mode is set up in spec_post.prf according to the spec. $$QMAKE_TARGET contains the feature suffixes to search, and is also contained in $$CONFIG. the target_mode variable itself becomes private to the Makefile class. Change-Id: I3c06d9dab536b753343cec6c5c491d3203e50bd8 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* purge the integrity target modeOswald Buddenhagen2012-06-271-2/+0
| | | | | | | | | | it wasn't really wired, so the only effect it had was disabling the unix scopes (despite an attempt to override that in the spec, which probably worked before qt 4.6, and will start working again soon). Change-Id: I95daff75b508edaf83a8a06fd327350acd62b124 Reviewed-by: Rolland Dudemaine <rolland@ghs.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* don't let the make spec determine the host mode any moreOswald Buddenhagen2012-06-271-16/+15
| | | | | | | | | | | (some of) the generators are (moderately) x-platform, so it makes no sense to nail the host platform to a generator (and thus a spec). overriding the host platform is only a debugging mesasure anyway, so one can use the (now undocumented) -unix/-macx/-win32 options for that. Change-Id: If2a059f1feeb2c726e5838625ede1c7add829985 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Mark Brand <mabrand@mabrand.nl>
* repurpose -unix/-macx/-win32 optionsOswald Buddenhagen2012-06-271-10/+0
| | | | | | | | | | they have been deprecated long enough, so we can mess with them now. don't make them set the target mode any more; the makespec can do that autoritatively. instead, they can be used to override the host mode for debugging purposes. Change-Id: Ife5fdcf4f1b6b926901a80896ac92b7d821278d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* fix somewhat common edge case in $$shadowed()Oswald Buddenhagen2012-06-261-2/+2
| | | | | | | | | | | | if source and build dir are direct children of the common root and we are shadowing the top-level source dir, there is of course no trailing slash to match. Change-Id: I8a34a6a72d16cb21d77d056e037235af9b32a008 Reviewed-by: Davide Pesavento <davidepesa@gmail.com> Reviewed-by: Andreas Hartmetz <ahartmetz@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* remove some symbian cruftOswald Buddenhagen2012-06-191-2/+0
| | | | | | | | - Option::mmp_ext - references to dead QMAKE_INTERNAL_ET_PARSED_* variables Change-Id: I863605b23798cbca3f6c8ab5a154fd432f1f4dcc Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove last traces of js supportOswald Buddenhagen2012-06-191-2/+0
| | | | | | | | don't even complain about trying to use js-based feature files. we have been doing that for long enough. Change-Id: Ib58ec204322442c488e8d780989f26b1e32595ed Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* add $$shadowed() functionOswald Buddenhagen2012-06-191-0/+25
| | | | | | | | | return the build directory corresponding to a given source directory. this is the identity function if not shadow-building. if input lies outside the source directory, return empty value. Change-Id: I2d2a6b1112bd19989fe29cfe19a12d39a0d208c1 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* introduce ability to build projects for the host systemOswald Buddenhagen2012-06-191-1/+14
| | | | | | | | | | | | | | | | | when qmake runs into the new option(host_build) command, it will restart the project evaluation with a host spec. the new default host spec is called default-host (gasp!). it is overridden with the pre-exising -spec / -platform option, while the new -xspec / -xplatform option overrides the pre-existing default spec. specifying -spec but not -xspec will set the xspec, too, so the behavior is backwards-compatible. same for the XQMAKESPEC override read from .qmake.cache and the environment variable. the cleaner solution would be adding -hostspec, to be symmetrical with the override semantics, but that would deviate from configure in turn. Change-Id: I4297c873780af16ab7928421b434ce0f1d3820da Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Revert "move .qmake.cache search to Option"Oswald Buddenhagen2012-06-191-58/+0
| | | | | | | | | | | | | | | | We are now moving in the exact opposite direction. This logically reverts commit 059200a44ba7177d0c9ec6bb5e6ee0b7e0c3f017. Some adjustments were necessary to maintain the project root stuff. Conflicts: qmake/main.cpp qmake/option.cpp qmake/option.h qmake/project.cpp Change-Id: Ic14fa571cbbfe9ac159f92493e49741d70a87eff Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Revert "move finding the makespec to Option"Oswald Buddenhagen2012-06-191-46/+0
| | | | | | | | | | | | | | Needed for an upcoming revert. This reverts commit 74a6669fa7c0d6e2cb7d34d56332d620d2a07755. Conflicts: qmake/option.cpp qmake/project.cpp qmake/property.cpp Change-Id: I56088506d27bf1f095f9261c75224f4bee17ec60 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't add bogus /mkspecs to QMAKE_MKSPECSOswald Buddenhagen2012-03-061-1/+2
| | | | | | | | the project build root can of course be empty - if there is neither an mkspecs/ nor a .qmake.cache - or no project in the first place (-query). Change-Id: I9595b0b4ad80a9086dcd48c9ae62b3e8bd1b6f2f Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Fix finding specs in the unsupported/ directory.Thomas McGuire2012-03-061-2/+5
| | | | | | | | | The -spec argument was interpreted as a relative directory as soon as it contained a slash. Fix this by checking if the directory exists before attempting to interpret it. Change-Id: Ide8f0418abc719b0be582d2d72642a141f6c6dea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* de-duplicate feature and mkspec root candidate listsOswald Buddenhagen2012-03-061-0/+1
| | | | | Change-Id: I03f5b5903a133e5386b9ebef640ddbacdf3ebcd4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Merge remote-tracking branch 'origin/api_changes'Lars Knoll2012-03-041-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.0.0 mkspecs/features/qt_module_config.prf qmake/project.cpp qmake/property.cpp Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
* | get rid of Option::user_configsOswald Buddenhagen2012-03-021-2/+6
| | | | | | | | | | | | | | | | | | merge them into before_user_vars. they are evaluated right after another anyway. Change-Id: I11859284b363fee01233f6e20989444fef711d0d Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | clean up build pass project initializationOswald Buddenhagen2012-03-021-1/+0
| | | | | | | | | | | | | | | | | | instead of messing with the Option singleton, add a way to inject extra config values into QMakeProject. Change-Id: Ia347dcc38af2c72913e30ebf5c2b4044f93b4f5f Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | move finding the makespec to OptionOswald Buddenhagen2012-03-021-0/+44
| | | | | | | | | | | | | | | | | | this is a one-time operation which depends only on the invocation, so this new home is much more appropriate. Change-Id: I07c66d95a9ae01a664cec17564995311fb78ec9b Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | look for mkspecs in the project root, not next to every projectOswald Buddenhagen2012-02-291-1/+30
|/ | | | | | | | | | | | | | | | | | qmake would look for mkspecs/ in the directory containing the current project file. this makes completely no sense with recursive projects: a) nobody would make per-project specs and b) specs meant to be global would not be found. consequently, we look for a project root when starting qmake and use only that directory. if .qmake.cache is found/set, we assume that to be the project root. otherwise, we search for mkspecs/ the same way we search for the cache - just to up until we find one or hit the root. if we are shadow-building, search the build dir as well. Change-Id: Ie66b189a40c21203d956e681cbef44a89f98cd17 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* resolve relative spec paths already on the command lineOswald Buddenhagen2012-02-281-1/+9
| | | | | | | this is way more predictable than resolving it later. Change-Id: I0ce27977b795bde9235e1d51d6f2d0d917f2398c Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* move .qmake.cache search to OptionOswald Buddenhagen2012-02-281-0/+29
| | | | | | | | this is a one-time operation which depends only on the invocation, so this new home is much more appropriate. Change-Id: I11ef30a8227afed06e58e64e65809dba25e81567 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* qmake: Normalize paths instead of converting to native separatorsOrgad Shaneh2012-01-191-2/+9
| | | | | | | Task-number: QTBUG-22738 Change-Id: I40163a883d84beff79f52bff141d61dfe921c129 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* find qt.conf more reliablyOswald Buddenhagen2011-09-121-56/+3
| | | | | | | | | | | | | | a qmake invoked with a relative path would not find qt.conf, because it already changed CWD, which would confuse our copy of QCoreApplication::applicationFilePath() (see also QTBUG-21381). we already have the absolute path to the qmake executable in Option::qmake_abslocation, so just use it. (cherry picked from commit c378e16e57e8ce2255116e7fdb5436524cccb8c7) Change-Id: Icfe4254722e0855f6755b639f4c86f15bc7323ba Reviewed-on: http://codereview.qt-project.org/4565 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+813
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12