Commit Graph

42 Commits

Author SHA1 Message Date
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Joerg Bornemann
f0f12ea5f1 accept hex/octal values for RC_LANG and RC_CODEPAGE
Task-number: QTBUG-28624

Change-Id: I6188045b05ebb8b9d285d1b30f8082a2fe46ff8b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-17 14:08:17 +01:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Oswald Buddenhagen
0da7f09724 make error() abort the qmake run, not just the current file
Change-Id: I82fc55680f9ffb227e25acb39c797596225ba89e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
cc2cd0db5d fold m_qmakespecFull back into m_qmakespec
the original value is not used any more after the final resolution.

Change-Id: Icadc219f045a1bbfd20506c4c72c53d1fb352969
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
3322759b49 give location information for QMAKE_SUBSTITUTES conditionals
Change-Id: I9b6bee252d4ed4bf263394ace29a4fb3b324a8cd
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-11 07:04:20 +02:00
Oswald Buddenhagen
0e78e50802 port qmake to qt creator's qmake language evaluator
this is a monster commit which does the following things:
- import the evaluator as-is from qt creator into qmake/library/
  - integrate it into qmake's makefiles
  - overwrite proitems.h with actual special types
- remove the parts of Option which are redundant with QMakeGlobals
- make QMakeProperty a singleton owned by Option::globals. the dynamic
  handling so far made no sense.
- make QMakeProject a subclass of QMakeEvaluator, with relatively few
  extensions

the changes to existing qmake code outside project.* and option.* are
minor. implementing the changes gradually would mean changing a lot of
code which will be just replaced in the next commit, so i'm not wasting
my time on it.

Change-Id: I9746650423b8c5b3fbd8c3979a73228982a46195
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-11 00:13:01 +02:00
Oswald Buddenhagen
df175f190d introduce qmake variable abstractions
this is preparation for adapting to a new evaluator.

Change-Id: I6fc59f5525735754a00afa6629fbfe257e84db97
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-07 15:39:31 +02:00
Oswald Buddenhagen
b32f3ba9e4 remove pretenses of supporting projects on stdin
this may have worked a decade ago, but now it only produces funny
Makefiles (and needs hacking main.cpp). the feature doesn't seem *too*
important, so just clean it out.

Change-Id: I50a60b0e30341f0b523e4a5731c770c9c1013f8b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-05 03:03:12 +02:00
Oswald Buddenhagen
689aa4da2d move cachefile_depth calculation out of project evaluator
it has no business there

Change-Id: I6d1a4b55b5acacc470cc109a6c69a907abbba312
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:33 +02:00
Oswald Buddenhagen
b6b6e85f6b remove possibility to request project recursion from within a pro file again
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>
2012-06-27 14:35:32 +02:00
Oswald Buddenhagen
2ca26162f8 repurpose deprecated -E switch
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>
2012-06-27 14:35:30 +02:00
Oswald Buddenhagen
a54875057f make a bunch of functions const
values() and variables() get both const and non-const overloads

Change-Id: Idfabea1acc488bf78f24edb831681ee07f0074c4
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:30 +02:00
Oswald Buddenhagen
cb43947738 make magicValues() const
the weird debugging feature is not used anyway

Change-Id: I07f481a94f2b2ab2a5b61270f0e00183cefd4cd1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:29 +02:00
Oswald Buddenhagen
e0f1de0788 don't use backwards compat mapping for generator accesses
we can rely on only user code needing variable mapping, so apply it only
in the evaluator.

Change-Id: I6fc58e7bcf24cf0fa8783d5341ab1e7b9f001c88
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:28 +02:00
Oswald Buddenhagen
79d6839306 introduce magicValues() function
the only place where the two remaining magic values need to be
referencable is doVariableReplaceExpand(), so make a separate function
and use it only in that place.

Change-Id: I6e2fcfa3a4f16727d90ace56eb88fc99ef272ffc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:28 +02:00
Oswald Buddenhagen
075d4a6d5d make $$TEMPLATE magic on write instead of on read
Change-Id: I03a68993dd7d4488f8212132a9d492d135295b9e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:26 +02:00
Oswald Buddenhagen
602ef59e85 make a bunch of invariant variables non-magic
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>
2012-06-27 14:35:26 +02:00
Oswald Buddenhagen
4b637bf1f0 fix specdir()
get the actual spec path directly from the project - the specs in Option
are not necessarily resolved.

Change-Id: Ia2bf2199c5269aa5b5a9d4c38de36171f25d448b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:23 +02:00
Oswald Buddenhagen
30d1522b7a resolve real qmakespec name right after loading it
this is cleaner than resolving it on-demand, as it avoids statics (with
potential side effects on dynamic spec switching).

Change-Id: I2bc15a4c3108376e1b4a01351875fe0c445ee5d5
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
4753958db7 revamp handling of qmake target mode
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>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
1f83f0cf2a add support for a super cache
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>
2012-06-19 16:46:03 +02:00
Oswald Buddenhagen
16d5b6911f look for .qmake.conf files
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>
2012-06-19 16:46:02 +02:00
Oswald Buddenhagen
f86f3613a5 find .qmake.cache for subprojects independently
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>
2012-06-19 16:46:02 +02:00
Oswald Buddenhagen
14bbab09c1 introduce ability to build projects for the host system
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>
2012-06-19 16:37:49 +02:00
Joerg Bornemann
ee4d723ecc qmake: QMakeProject::intValue added
For variables that are supposed to contain a single int,
this method returns the numeric value.
Only the first value of the variable is taken into account.

Change-Id: Ifa11ba5ac044e0a4703a387a9bcf02043e4681d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-17 03:26:32 +02:00
Oswald Buddenhagen
84ddc06380 do not re-evaluate spec+cache in build passes
clean up the somewhat convoluted code paths which forced re-evaluation.
now that the spec+cache are evaluated in a completely clean context
anyway, there is no point in re-evaluating them for build passes.

Change-Id: I12279083238e9ca7028af97f45e2638c8dc715b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-06 06:34:49 +01:00
Oswald Buddenhagen
a30074bab8 remove now unused QMakeProject c'tors
Change-Id: Ia65d49df50a5610bbd88417ca90ac348a774a1e1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-02 21:33:08 +01:00
Oswald Buddenhagen
dce3821b8a make evaluation of spec+cache independent of build pass context
don't inject the build pass specific variables into the project even
before evaluating the .spec file and the .qmake.cache. they are not
supposed to base configuration on that - feature files should do that
later.

the immediate advantage of this is that base_vars is never manipulated
upfront any more, which allows for cleaner setup paths. also, we can do
more caching of the spec+cache contents.

Change-Id: I19d7f8bec1fb7c3b54121e26794340b287055ebf
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-02 21:33:08 +01:00
Oswald Buddenhagen
93ee903da7 clean up build pass project initialization
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>
2012-03-02 08:43:21 +01:00
Oswald Buddenhagen
a0da58b5dd make resolution of default spec less inefficient
resolve only once, in particular on unix.

Change-Id: I090698fc6029322a3a16d179d461af3e8336f6ad
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-21 22:31:00 +01:00
Oswald Buddenhagen
af93c70de7 consolidate Read* options
this brings some clarity which combinations are actually possible, which
allows for some optimization later on.

Change-Id: I930027e426c5f9abea8d21eb1ebaa39bd29787b8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-09 22:11:13 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
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>
2012-01-30 03:54:59 +01:00
Oswald Buddenhagen
365b5f7a92 "cache" is used only locally, so move it into scope
Change-Id: I0ba45d5620a8e5a79fdc6a1854245a0bfcc489f0
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-01-27 10:54:48 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Oswald Buddenhagen
3e4f7ed5ed QMap => QHash
this should make the evaluator quite a lot faster. the total win for
qtbase/src is only 6%, though.

i made some effort to avoid that output files get randomized. however, i
didn't bother to keep debug output sorted.

Change-Id: Id9cef4674c0153c11ebbb65cb63bf8c229eb56e3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-10 16:16:34 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +01:00
Oswald Buddenhagen
0f32f596ea inline resoveDepends()
that's common practice for the expand functions, and that one isn't even
particularly big

Change-Id: I66c22e11edb66bd00d211fc1282eb75f5dd4832d
Reviewed-on: http://codereview.qt.nokia.com/1456
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-11 18:58:41 +02:00
Oswald Buddenhagen
1aa9affcf1 fix misnomer: $$resolve_depends() => $$sort_depends()
... and re-add a real $$resolve_depends(), just in case.

Change-Id: I489d6056546340ce95280fe7fd571e30c14470e7
Reviewed-on: http://codereview.qt.nokia.com/1455
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-07-11 18:58:41 +02:00
Jyri Tahtela
f9f395c28b Update licenseheader text in source files for qtbase Qt module
Updated version of LGPL and FDL licenseheaders.
Apply release phase licenseheaders for all source files.

Reviewed-by: Trust Me
2011-05-24 12:34:08 +03:00
Marius Storm-Olsen
bca5a5d6f6 Add resolve_depends(var, prefix) function to qmake
This function calculates the topological order of variables.
We will use it to determine which and in what order to link
module libraries.

The function is not tied to libraries/modules only, but requires
the variables to be ordered to have their dependencies in the
[prefix]<var>.depends subvariable.

Due to the recursive nature of the algorithm it was just much easier
to implement it directly in C++ rather than in a qmake-language
function.
2011-04-27 12:05:46 +02:00
Qt by Nokia
38be0d1383 Initial import from the monolithic Qt.
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
2011-04-27 12:05:43 +02:00