summaryrefslogtreecommitdiffstats
path: root/qmake
Commit message (Collapse)AuthorAgeFilesLines
* clean up specdir()Oswald Buddenhagen2012-06-262-8/+6
| | | | | | | | | the only callers which used non-default arguments are gone now, so remove the arguments entirely. this also enables us to re-enable result caching. Change-Id: I62f76e17e531a4eeafddb9b29716ca0a0eb3dbea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* fix -spec/-xspec argument re-assemblyOswald Buddenhagen2012-06-262-2/+10
| | | | | | | | | | the specs in Option are now only fixifiable absolute paths if an actual path was passed on the command line - otherwise these are just names, and we should pass them on verbatim. Change-Id: I5b3535dadf2d6b2b3116331e6636f6e363a5361f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* fix somewhat common edge case in $$shadowed()Oswald Buddenhagen2012-06-262-4/+7
| | | | | | | | | | | | 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>
* Fix return type of isActiveConfig("host_build")Simon Hausmann2012-06-241-1/+1
| | | | | | | | The return type of isActiveConfig is a boolean, so return that when host_build is queried. Change-Id: I6d1420b49b09e51442c4b2d482e2f19b165081d8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Fixed Wince Makefile environmentBjoern Breitmeyer2012-06-197-6/+258
| | | | | | | | | Integrated the checksdk tool into qmake and made the makefiles selfcontained, so configure make, is now enough to build qt for wince Change-Id: I29076702eca2ec23d4d06bb3d5c5cef9d4f95161 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* revamp automatic makefile generation for sub-projectsOswald Buddenhagen2012-06-192-33/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of making the "real" targets depend on the makefiles, add conditional makefile generation to the targets themselves. this causes makefile generation to follow the recursion order determined by the project, which is important when dealing with prl and module pri files. a side effect of this is that qmake and make calls are interleaved now, which is entirely different from a 'qmake -r' run. on the downside, calling make with multiple targets which operate on the same subprojects without prior makefile generation will make a mess, as the qmake calls will be racing. this should be no problem, as qmake does not generate recursive targets where this would be useful - at least by default. it is not sufficient to just order the creation of the makefiles non-recursively (e.g., by using gnu-specific order-only-prerequisites), as an interrupted and subsequently resumed build would happily skip the nested makefiles. workable alternative approaches would be walking the entire tree in a pre-pass to ensure makefile presence (which is incredibly slow) or creating additional stamp files only after recursing and having the makefiles depend on them (which is ugly). Task-number: QTBUG-23376 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Change-Id: I88d3e7610215677d362026de316513d3bea04b06
* introduce $$QMAKE_CHK_EXISTS_GLUEOswald Buddenhagen2012-06-192-7/+5
| | | | | | | instead of hard-coding platform differences, use a variable. Change-Id: I20e98811ad5f07429148c6f88aedbabc3ba58fff Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* normalize $$QMAKE_QMAKEOswald Buddenhagen2012-06-192-5/+4
| | | | | | | | | everything in the projects should be normalized. only the makefile generators need to adjust it to the native form. Change-Id: I06a4e997f32134d13949ec4a9dd1b44367aab7cb Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* fix in-/out-dir mixupOswald Buddenhagen2012-06-191-4/+4
| | | | | | | | | no point in entering the outdir and leaving the indir. this doesn't really matter except for the obsolete borland generator, but whatever. Change-Id: Ieb4e4c549ebd65f99e4d00819c52822968b060a4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove unnecessary conditionalOswald Buddenhagen2012-06-191-6/+2
| | | | | | | the code above already deals with the differences Change-Id: Ifb799e46f5187e7bd3d0f0169e868ad267bcfe23 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove duplicate assignments of MKDIR & CHK_DIR_EXISTSOswald Buddenhagen2012-06-191-2/+0
| | | | | Change-Id: I314659a1ba25227380176dc65a9c81e3c6df28c1 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* unobfuscate makefiles re $(CHK_DIR_EXISTS)Oswald Buddenhagen2012-06-192-1/+5
| | | | | | | | no need to define an obscure variable for it. just inline it. the assignments are left in for compatibility with hand-written commands. Change-Id: I9bc3914e2c4116f3b8fe00a421ca0f036bb7e214 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make 'qmake_all' targets respect .depends and CONFIG+=orderedOswald Buddenhagen2012-06-191-0/+7
| | | | | | Change-Id: I010a9886ee0d40e4319cb6bd873b038336a42111 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* make 'qmake_all' target of SUBDIRS projects properly recursiveOswald Buddenhagen2012-06-192-7/+21
| | | | | | | | | so far it would rebuild the makefiles one level down only, which is somewhat arbitrary and not really helpful. Change-Id: I5fe01f379ecc4b210610a674d7df7dfc18131eef Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* make 'qmake' target of SUBDIRS projects non-recursiveOswald Buddenhagen2012-06-192-7/+1
| | | | | | | | | that's consistent with other projects. 'qmake_all' can be used for recursion. Change-Id: Ie6d620f7a3e0e28d3f2f82f01ca94c2f46137c68 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* don't use $(MAKEFILE) to refer to SUBDIRS' makefilesOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | $(MAKEFILE) is our own file, and using it would wreak havoc if it was named anything but Makefile. Change-Id: I51cae2014a85399b409f18788f864ff2a82e493e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* do not add "/." to _PRO_FILE_PWD_Oswald Buddenhagen2012-06-191-1/+1
| | | | | | | | if a "subdir" project added a project file from the same directory as itself, "/." would be appended to the path, which is obviously not useful. Change-Id: Ia733dedb57e568c5cf9a3d5eb29727176a5142c5 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* allow projects to suppress qmake recursionOswald Buddenhagen2012-06-191-0/+2
| | | | | | | | | | | webkit does some unholy tricks with the ordering of qmake and make invocations, so it does not work with qmake -r. to make it still possible to integrate it into the qt5 aggregator project, give it a chance to "break out" from the recursion. Change-Id: I926836e44c0e0790cdd90e6b0c8f766dccc33c4d Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* look for mkspecs/ even below .qmake.cache/.conf-determined rootOswald Buddenhagen2012-06-191-19/+26
| | | | | | | otherwise a cache/config in an aggregator project may unduly hide the mkspecs/ of the aggregated project from qmake's view. Change-Id: Idb0b124de071822f8f55463d9f8a4d194ef3130e
* add support for a super cacheOswald Buddenhagen2012-06-192-13/+57
| | | | | | | | | | | | | | | | | qmake will now look for .qmake.super, just like it looks for .qmake.cache, and the cache() function has a mode to write this super cache. this allows the creation of aggregator projects like, say, qt5. a notable difference to the normal cache is that this file is *not* added as a dependency of the Makefile. this means that modifications done by later sub-projects will not cause a re-processing of earlier projects, and consequently that one should be cautious regarding what information to store there. another notable difference is that this file is read *before* the spec, so the spec can use the variables from the cache without resorting to $$fromfile() & co. Change-Id: I4807b6d34014261fa9eebd6f0ae128b802d86691 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* look for .qmake.conf filesOswald Buddenhagen2012-06-193-19/+33
| | | | | | | | | this is the source dir equivalent of .qmake.cache and can be checked into the repository. it can be used to make project-wide settings, or just to signal the presence of an mkspecs/ directory. Change-Id: I5f1cebad2aa2a89e78089341b2051613b6b7a613 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* find .qmake.cache for subprojects independentlyOswald Buddenhagen2012-06-193-41/+52
| | | | | | | | | | this allows the creation of aggregator projects, like, say, qt5. this is not expected to have a negative impact, as no project could reasonably expect a nested .qmake.cache to *not* take effect - in fact, if the project was processed stand-alone, it would already use it. Change-Id: I33f2935d309baba7e95465f2fefb8231c4f03eda Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* allow setting QMAKEPATH and QMAKEFEATURES in .qmake.cacheOswald Buddenhagen2012-06-191-0/+24
| | | | | Change-Id: Ie383abb57c06cb49d38345d64750837b8fe14c70 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* don't duplicate project_build_root's calculation needlesslyOswald Buddenhagen2012-06-191-7/+2
| | | | | Change-Id: Id2f343c450149b13b52c2cae8eb6eb4bfd73fc03 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* remove some symbian cruftOswald Buddenhagen2012-06-193-14/+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-193-28/+10
| | | | | | | | 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>
* make splitPathList() return an empty list for an empty stringOswald Buddenhagen2012-06-192-20/+10
| | | | | | | this makes the user code a bit cleaner Change-Id: I3713c73c5c19cf69341be65480917eda0b967b77 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* introduce /get property variantsOswald Buddenhagen2012-06-193-5/+11
| | | | | | | | | | | | | | | properties are now split into a write location $$[FOO] and a read location $$[FOO/get]. the write locations are hard-coded and configurable via qt.conf/Paths as before, while the read locations are configured via qt.conf/EffectivePaths. this finally provides a clean solution to the problem that during the qt build itself tools and libraries need to be taken from somewhere else than they are installed to. Change-Id: I956c43bd082afd465e690fe75d0bee3c2c0f7c25 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* purge unused VcprojGenerator::findTemplate()Oswald Buddenhagen2012-06-192-17/+0
| | | | | | it looked fishy for years. now i know why. ;) Change-Id: I822cadecaf8d914f383f9f907b92507852e434b4
* don't generate make_default targetsOswald Buddenhagen2012-06-191-5/+3
| | | | | | | | | | | | make_first really means the same, as the default target is 'first' which immediately invokes make_first. as a nice side effect, this fixes ALL_DEPS not being used by the subdirs template's default target - make_default wasn't special-cased in the right place, while make_first is. Change-Id: I946cea3b2dae198eda61d31dbd19c6ccd15deac7 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$reverse() functionOswald Buddenhagen2012-06-191-1/+13
| | | | | | | | | returns the list with the order of the elements reversed. one can easily implement this with existing functions, but this is way faster and more readable. Change-Id: I12d306eb9fe58fc332622274ea6b658192529491 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* add $$shell_quote() functionOswald Buddenhagen2012-06-191-1/+71
| | | | | | | | to be used in system() calls and when assembling EXTRA_COMPILER and INSTALLS .commands by hand. Change-Id: Id706cd56aa267a9fb4b14e3416692b4716fafa5b Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$absolute_path() and $$relative_path()Oswald Buddenhagen2012-06-191-1/+19
| | | | | | | just exposes QDir::fooFilePath() wrapped into QDir::cleanPath() Change-Id: I7a7644084825fd8092a9910ac20f695c4d9351f6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$native_path() functionOswald Buddenhagen2012-06-191-1/+9
| | | | | | | more or less QDir::toNativeSeparators(QDir::cleanPath()) Change-Id: I52deee1e8086559eda5833b387a0cf64d21cbcd9 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$clean_path() functionOswald Buddenhagen2012-06-191-1/+9
| | | | | | | just QDir::cleanPath() Change-Id: I2d51e2385939d8926c00f296537ab7f6757d9a79 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$format_number() functionOswald Buddenhagen2012-06-191-1/+75
| | | | | Change-Id: I04266c1f5fb72af94073f3f508cee59085e365b6 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$shadowed() functionOswald Buddenhagen2012-06-194-1/+40
| | | | | | | | | 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>
* add $$val_escape() functionOswald Buddenhagen2012-06-191-1/+13
| | | | | | | | this quotes the elements of a variable in a way suitable for re-parsing as qmake code. Change-Id: I0e6ea2478c43b5aeff45f485a48ac8c86705dd4a Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add $$enumerate_vars() functionOswald Buddenhagen2012-06-191-1/+5
| | | | | | | this simply returns the keys of all variables in the context. Change-Id: I0092f827744fcd257dfb9e7ca664c87c6f1cc763 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make defined() support testing definedness of variablesOswald Buddenhagen2012-06-191-0/+2
| | | | | Change-Id: I58d2dd402d72ee5a19012a6b5a4ba111717d40cc Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add mkpath() functionOswald Buddenhagen2012-06-191-1/+15
| | | | | Change-Id: I8809b9ee4e85fbe8cec95641d659f237c5f51a26 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add log() functionOswald Buddenhagen2012-06-191-6/+13
| | | | | | | this is a literal print to stderr. Change-Id: Ib0a2f53373ebbc4e0bda07a38d656bce145b31cf Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add touch() functionOswald Buddenhagen2012-06-191-1/+74
| | | | | | | | | this is equivalent to unix "touch --no-create --reference <ref> <file>". QFile has no setLastModified() (even though QFileInfo has lastModified()), so the implementation is low-level. Change-Id: I6783e8f2613e168ad0c24e79e7384d5b2e4901ee Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add write_file() functionOswald Buddenhagen2012-06-191-1/+38
| | | | | | | | | this dumps the contents of a variable into a file. each element of the variable is considered a line; line terminators are added. all missing directories are automatically created. Change-Id: Idafeb873cea64e6705c894b3ab0ef21df69e7170 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add cache() functionOswald Buddenhagen2012-06-191-3/+222
| | | | | | | | | | | this function adds the current contents of the named variable to the cache. this comprises populating base_vars and appending an assignment to .qmake.cache. if no cache file exists yet, it will be created in the current output directory (and inherited by subdirs projects). if called without a variable name, only create the cache file if missing. Change-Id: I1e81c2238aa6a5817a6ebbfb022e2b995c349363 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* add "blob" and "lines" modes to $$cat() and $$system()Oswald Buddenhagen2012-06-191-25/+63
| | | | | | | this bypasses the otherwise done insane word splitting Change-Id: Ia9b8980bc0770de3999544a06d239f55fb34f801 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* properly declare the host tools as such in the project filesOswald Buddenhagen2012-06-191-0/+1
| | | | | | | don't mess with the qmake cmdline args any more. Change-Id: I399d87145d31d25e29951b6acd96387a3c7282f0 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* introduce ability to build projects for the host systemOswald Buddenhagen2012-06-197-39/+98
| | | | | | | | | | | | | | | | | 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 "make default_pro.prf advertize dynamically created .qmake.cache"Oswald Buddenhagen2012-06-191-2/+0
| | | | | | | | ... and followup fixes. this is not needed any more due to the breaking patch being reverted. Change-Id: Ia3416fcc16ddece680efbd0322286a601879fa0a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Revert "move .qmake.cache search to Option"Oswald Buddenhagen2012-06-194-72/+59
| | | | | | | | | | | | | | | | 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>