Commit Graph

64 Commits

Author SHA1 Message Date
Oswald Buddenhagen
c99f909bed don't make relative paths if we don't know the top-level build dir
regression from qt4.

Task-number: QTBUG-37113
Change-Id: I34813f03d8ec686e3ecb49f66629079489a3d83d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-16 07:28:52 +02:00
Oswald Buddenhagen
882bf3475c expand tabs and related whitespace fixes in *.{cpp,h,qdoc}
the diff -w for this commit is empty.

Started-by: Thiago Macieira <thiago.macieira@intel.com>
Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-13 22:46:50 +01:00
Oswald Buddenhagen
8a5657b9f7 fix warnings about unused variables & parameters
Change-Id: Ia5816671267ea21dae0d90560b239c4498f9156c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-11-04 19:50:05 +01:00
Tor Arne Vestbø
1cdbe4752b qmake: Expose qmake arguments as QMAKE_ARGS
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>
2013-10-24 20:20:59 +02:00
Sergio Ahumada
f7837e28b5 Merge branch 'stable' into dev
Conflicts:
	src/concurrent/qtconcurrentmedian.h
	src/corelib/itemmodels/qabstractitemmodel.cpp

Change-Id: Iac46a90bbb2958cef7670031a4b59c3becd8538a
2013-09-13 18:04:17 +02:00
Oswald Buddenhagen
6a41fa832e fix finding qmake.exe when called on the command line as ... qmake.exe
Task-number: QTBUG-33333
Change-Id: I026659fc779d1cf2fde46b5bcb4990b151b8c51e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-09 11:16:33 +02:00
Oswald Buddenhagen
b215176da3 implement simple VFS to support caching during project parsing
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>
2013-08-07 13:58:41 +02:00
Oswald Buddenhagen
e7c3b21b7c make sure qmake finds itself in CWD on windows
and consequently that it finds qt.conf.

Task-number: QTBUG-30583
Change-Id: I48441477e941d9609270d6e5e1b405127c0c0aca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-26 12:08:24 +02:00
Joerg Bornemann
dbe74582a6 remove unused member Option::application_argv0
Use QMakeGlobals::qmake_abslocation instead.

Change-Id: I1d0f39549b477ede674730937d879c492407fb28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-01 11:07:19 +01:00
Oswald Buddenhagen
864e1ceaf6 don't flush qmake command line twice
otherwise variable assignments (including -config options) from
$QMAKEFLAGS are lost.

Change-Id: I818e9372d2b0ff44333dc3eb8fc3420f84ab01c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-01 17:38:29 +01:00
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
Sergio Ahumada
cd765bbae0 qmake: Change copyright information from Nokia to Digia
Task-number: QTBUG-28156
Change-Id: If54615a465504b4124891fb393185eb324372874
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
2012-11-26 17:33:37 +01:00
Pierre Rossi
f71170aa35 Tools: add QLibraryInfo to the bootstrapped library.
For future use by qdoc.

Change-Id: Id9079a6fa581ff16810df9a8f2bb94314ee11ca9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-10-08 17:14:24 +02: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
1d999dadeb replace qmake_version() with a simple string literal
Change-Id: I12e715aab23e01267e8a1434a3a965276c1a6182
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-13 03:42:47 +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
Miikka Heikkinen
62b0f41ae0 Remove automatic drive letter lowercasing from Option::fixString()
This enforced lowercasing causes subtle errors, like changing the
drive letter case when doing $$files(), which makes it difficult
to do any string matching against the result later.

Task-number: QTBUG-26985
Change-Id: I4973e3ac3e851e24af944295edf290cc98f02fb6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-28 00:10:45 +02:00
Oswald Buddenhagen
4350054ab8 revamp preparation of command line for qmake calls in makefiles
instead of re-assembling a list from the variables, take the original
command line minus some explicitly stripped out options. this is way
less code and poses no synchronization problem between the two parts.

as a "side effect", variables obtained from $QMAKEFLAGS won't multiply
with each makefile nesting level, as the generated command line won't
replicate data obtained from the environment.

Change-Id: I5d1ce0f11efb338f60405529f9818910103b1b0e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-14 23:12:23 +02:00
Oswald Buddenhagen
1447b6c55b make command line parser use qt containers
way more legible code

Change-Id: I7ba5a66f1f0bc7ae78ba0537ef8e5c780506a149
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-14 23:12:23 +02:00
Oswald Buddenhagen
807579ff64 take parsing of qmake mode out of parseCommandLine()
it wouldn't do anything particularly useful when parsing QMAKEFLAGS, so
take it out of the common path.

Change-Id: I60f1215c4645707e1f99932dd19160e1d1c9d953
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-14 23:12:23 +02:00
Oswald Buddenhagen
910c717461 remove rather pointless parameter from parseCommandLine()
Change-Id: I97998555c41e8eab2438ac355950abf9dace24a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-14 23:12:23 +02:00
Oswald Buddenhagen
e07372ff50 fix host vs. makefile directory separator mess
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>
2012-07-28 00:09:45 +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
031ac3c167 dispose of Option::host_mode
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>
2012-06-27 14:35:32 +02:00
Oswald Buddenhagen
a47c6e5ea0 dispose of Option::shellPath
use isWindowsShell() in the one remaining case.

Change-Id: I25eab398ef50df5a7f4ec808279b83ca900e3c58
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
6957cb26b3 don't overuse variables()
Change-Id: Ib2da88e5e29c0bfecc39a9c06e82a34a4bd0b1e6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:29 +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
b40b91cb39 move initialization of numerous variables to spec_pre.prf
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>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
1b1aa3b4f8 remove QMAKE_EXT_H_MOC and QMAKE_CPP_MOD_MOC from Option
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>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
621b42e53d purge QMAKE_MOD_SYSTEM_ENV from Option & co.
this is entirely unused

Change-Id: Ia0368b1d90f61b64178e28479a2088a19aa418e3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
073badf9d2 don't read QMAKE_DIRLIST_SEP back into Option::dirlist_sep
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>
2012-06-27 14:35:24 +02:00
Oswald Buddenhagen
f375fa19c9 don't make prf_ext overridable
it's entirely pointless

Change-Id: I1da3c05a0b4f6ac8cea6ecc64ce3a237957440f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:24 +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
757cad45d7 purge the integrity target mode
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>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
0ce1a6ba24 don't let the make spec determine the host mode any more
(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>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
fc1bca8608 repurpose -unix/-macx/-win32 options
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>
2012-06-27 09:39:49 +02:00
Oswald Buddenhagen
ed96d199f1 fix somewhat common edge case in $$shadowed()
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>
2012-06-26 08:14:17 +02:00
Oswald Buddenhagen
a07d4f8fb3 remove some symbian cruft
- Option::mmp_ext
- references to dead QMAKE_INTERNAL_ET_PARSED_* variables

Change-Id: I863605b23798cbca3f6c8ab5a154fd432f1f4dcc
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:02 +02:00
Oswald Buddenhagen
7d44bd0646 remove last traces of js support
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>
2012-06-19 16:40:01 +02:00
Oswald Buddenhagen
bf984d5f24 add $$shadowed() function
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>
2012-06-19 16:39:56 +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
Oswald Buddenhagen
4e9cbfc90f Revert "move .qmake.cache search to Option"
We are now moving in the exact opposite direction.
This logically reverts commit 059200a44b.
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>
2012-06-19 16:37:49 +02:00
Oswald Buddenhagen
d8b2998dae Revert "move finding the makespec to Option"
Needed for an upcoming revert.
This reverts commit 74a6669fa7.

Conflicts:

	qmake/option.cpp
	qmake/project.cpp
	qmake/property.cpp

Change-Id: I56088506d27bf1f095f9261c75224f4bee17ec60
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:49 +02:00
Oswald Buddenhagen
4958c138a7 don't add bogus /mkspecs to QMAKE_MKSPECS
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>
2012-03-06 21:50:25 +01:00
Thomas McGuire
11f9d18731 Fix finding specs in the unsupported/ directory.
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>
2012-03-06 17:47:46 +01:00
Oswald Buddenhagen
52843c1988 de-duplicate feature and mkspec root candidate lists
Change-Id: I03f5b5903a133e5386b9ebef640ddbacdf3ebcd4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-06 12:28:18 +01:00