Commit Graph

597 Commits

Author SHA1 Message Date
Oswald Buddenhagen
849f1f9efd don't allow overloading of built-in functions
the functions are not versioned or scoped, so user-defined overloads would
mess up qmake's own feature files. it seems safer to break user projects
than to allow the user to break qmake.

Change-Id: I020a2e6416bbb6e2fd2ece339629d848c00c8398
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-18 07:47:14 +02:00
Oswald Buddenhagen
c3c4f1eb53 remove the entirely insane whitespace compression
it was merely an artifact of using QString::simplified() on the
unparsed (!) project code. there is no reason why anyone should actually
rely on it, so just remove it.

Change-Id: If9b957c4b1263f3990a2331f8851bb1c06154ea8
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-18 07:47:05 +02:00
Oswald Buddenhagen
1b569fe455 fix QMAKE_MANIFEST for shadow builds
Change-Id: Iea71f4a4d483e9465b3a7f0ce4560b2e9fa6cd63
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
Oswald Buddenhagen
53ab67cdfe properly C-quote the manifest file name in the rc file
Change-Id: I8c8eb85d412becc8c4029c2aa393abf6f8e949b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
Oswald Buddenhagen
d113faefb8 rewrite *_manifest.rc unconditionally
the file has no dependency tracking, so changes to the source would get
missed and cause hard to debug build issues.
and as nothing does dependency tracking on that file, this change
doesn't even cause a noticable performance regression.

Change-Id: I108b490b71a43018e0c7ef5d7c0b11d79a8e726b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 00:59:08 +02:00
Sergio Ahumada
89b12da2ef qmake: Include own header first
cpp files should include their own headers first (but below config.h)

Change-Id: I10ef37854843ae6438d68f96ce5ee83eede33db5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-17 22:14:18 +02:00
Oswald Buddenhagen
b04192d94b remove support for non-lowercased $$eXpaNd() functions
we have been warning about such functions for a while now, now execute.
the qmake language is (generally) case-sensitive, so this wasn't all
that useful anyway.

Change-Id: I1388ac2d5a1104389aeb3347e739a0d5e69e138d
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-13 03:42:57 +02:00
Oswald Buddenhagen
5e559b1b2f delete grossly outdate changelog file
Change-Id: Ibd35690e82849457a10d8d2f99564d2e0bde257b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-13 03:42:54 +02:00
Oswald Buddenhagen
5889fca313 bump qmake version
the world has awaited this moment for a long time. very patiently.

Change-Id: Iba8697e7eebb5cdd43caadb64cd89126de395e66
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-13 03:42:51 +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
8400896cfe don't pretend that break()/next()/return() are functions
it's a pretty braindead thing to implement control flow statements as
(built-in) functions.

as a "side effect", this fixes return() value handling for lists.

(cherry picked from qtcreator/f53ed6c4b3feca59a94d4f0de8b1a7411122e30e)
(cherry picked from qtcreator/f529e22ec38fb9a656d74394e484d2453cf42c69)
Change-Id: I59c8efa0e4d65329327115f7f8ed20719e7f7546
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-13 03:42:44 +02:00
Oswald Buddenhagen
ae3f95a951 improve parse error recovery paths
to reduce collateral damage from parse errors.

(cherry picked from qtcreator/00c0d0d5e42d28e03c2846c17d3acbcd8420859d)
Change-Id: Ic59700d657069d3b15372509b4bff966057d27a9
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-13 03:42:42 +02:00
Oswald Buddenhagen
8df98b43be compile without CamelCase headers
for faster bootstrapping without a full syncqt run

Change-Id: I648f0a8fb09be021590c46e8e5e15667a316c817
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-11 17:23:23 +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
Simon Hausmann
0c0c04b405 Fix semantics of the src dir in the include search paths with MinGW
This issue originates from https://bugs.webkit.org/show_bug.cgi?id=95736

Suppose we have
    main.cpp
    somedirectory/someheader.h -- which has #include "anotherheader.h"
    anotherheader.h

With unix generator, the directory where main.cpp is located is included,
unless no_include_pwd is set. Hence the look-up of anotherheader.h from
within someheader.h will work.

With MSVC this works because MSVC looks "in the directories of any
previously opened include files in the reverse order in which they were
opened." (from http://msdn.microsoft.com/en-us/library/36k2cdd4.aspx)

Unfortunately the build breaks with MinGW, because it lacks support for
including the source directory in the include search path just like the
unix generator does.

This patch adds the same functionality to the MinGW generator as well as
an auto-test.

Change-Id: Iea8bb06e34862c51b8fd4eca2ee26668e24a319a
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-09-10 14:09:45 +02:00
Sergio Ahumada
67cb9e24e5 Removing duplicate includes
Do not include a header more than once

Change-Id: Ia2e5d66e72988ad833cf5177a3f8aa988bf510e9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-09 18:30:43 +02:00
Sergio Ahumada
ce8e6abe7f Check for C++ operators that should be 'const'
Make sure all C++ class comparison operators are const.

Change-Id: Ib4a66f2afe6c62f437dae1ecde94287d3db8442d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <faure@kde.org>
2012-09-08 09:08:27 +02:00
Oswald Buddenhagen
aca5c2b3c2 fix c string comparison
Change-Id: If9cc96e240047cfe301804d57a33b937afadef72
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-07 23:35:30 +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
d7cfd02082 restore support for QMAKE_LIBDIR_FLAGS
unexpectedly, this internal variable is documented. grumble.

Change-Id: I272c1f553b56f253d2f59f875de78d5bc279186a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-09-05 03:03:15 +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
791cb02463 make QMakeMetaInfo a little less inefficient with libtool .la files
don't read the spec from scratch for every library just to get
QMAKE_LFLAGS_RPATH. we can perfectly use our current project for that
purpose.

Change-Id: I4e408b3fd5de81652181df032aa53cd8f2f8f806
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-05 03:03:10 +02:00
Oswald Buddenhagen
09df6bec73 pre-initialize more invariant properties
Change-Id: I0add2e7ead5a3d63124ef7ff85362895dd64bd23
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-05 03:03:08 +02:00
Oswald Buddenhagen
19e3441b7c remove QMAKE_MKSPECS property from qmake -query's view
it's a dynamic property which is something between meaningless and
misleading when used outside a project file.
also, experience from creator shows that people would consistently
abuse it (not handling it as the list it is).

Change-Id: Id52cd40da5c38c0c74535d0701fdae53dfa39cad
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-05 03:03:06 +02:00
Oswald Buddenhagen
6efec23b10 remove handling of QMAKE_FILETAGS
it was unused for a decade. and broken, of course.

Change-Id: I9713d595d95c5b074ef96dfe9b1c314b9198bd7e
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:39:02 +02:00
Oswald Buddenhagen
b2d574e83f remove unnecessary QMAKESPEC fallback code
QMAKESPEC is now always set

Change-Id: Ib3f7356a9260d42315747095e28db6604b2dcfe9
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:38:58 +02:00
Oswald Buddenhagen
001d4763b5 remove pretenses of manual dependencies
now that "make depend" actually works again, just clean out the gunk.

Change-Id: Ia1858a2474c9a4544ae16c53349aa7ae09e0c685
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:36:16 +02:00
Oswald Buddenhagen
07a6b2968e unbreak "make depend" for shadow builds
Change-Id: Ib79ba79e41cfeac9350852395b03c331dc4fe2a3
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:36:12 +02:00
Oswald Buddenhagen
279c4de35a unify c*flags in the hand-written makefiles somewhat
Change-Id: I7a7139fd71bce879b3ee4d9e26e30d2ca63da69e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:36:06 +02:00
Oswald Buddenhagen
aeebe1db79 fix assignment of MSVCPROJ_TARGET
i'm only guessing what was intended here.

Change-Id: I72bfa3b5fad63f5b144d34762152e4dd851197ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-03 19:36:03 +02:00
Oswald Buddenhagen
3db9344f04 beautify string operations
Change-Id: I895a1ae26ee0c884c404bf585261d1a7e8a8242c
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 20:48:13 +02:00
Oswald Buddenhagen
996bbcd78b micro-optimize: use POD-initializable lists of variable names
Change-Id: I3732fef509b358949ef90002dbfc1960360afef8
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 20:48:07 +02:00
Oswald Buddenhagen
7251683085 remove unused checkMultipleDefinition()
Change-Id: I533c2091333942f145063ad04f4420b7a2de0a37
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-08-28 20:48:03 +02:00
Oswald Buddenhagen
7033560e54 remove dead variable assignments
Change-Id: I032e9116ca1b7250497f56ea26103f2173f0fc09
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-28 20:47:55 +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
Joerg Bornemann
8633f7ac0d qmake: fix manifest resource for non-trivial target names
The Microsoft Resource Compiler bails out if the rc file contains
non-trivial file name references. In particular it doesn't like
dashes in file names. We're now always quoting the file name.

Change-Id: I67b8d2c13010a0b2ec26cac915ebd1be95f1c274
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-23 15:54:02 +02:00
Joerg Bornemann
d45ef22158 qmake: fix embedding of generated manifests in debug mode
The existence of the manifest backup is used as a marker to decide
whether to embed the manifest in a second link step or not.
If it's present, the embedding took place in the first link step.
If it's not present, we must link again incrementally.
That logic was implemented faulty.

Change-Id: I10154dbbbe70c7981795ac66d46a166907ba13ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-22 18:40:17 +02:00
Joerg Bornemann
0330798037 qmake: fix generated rc file for embedding manifests
The rc file is in the same directory as the manifest file.
Therefore the include must consist of the filename and must not include
the file's path.

Change-Id: I4f5ac11b131f39ea8c425aca93fcf82d150c0204
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-22 18:40:17 +02:00
Joerg Bornemann
a72420d012 qmake: object_with_source feature removed
By putting object_with_source into CONFIG one could force qmake to
output each object file into the same directory as its source file
came from. This was a rather nasty work-around from Qt 3 times to
support source files with the same file name in a project.
Unfortunately this doesn't play nicely with shadow builds.

Change-Id: Ie79e14d36ba6eac4219edc14ea75ab6a96f9ea96
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-17 12:27:40 +02:00
Oswald Buddenhagen
af2847260c unbreak "aux" template for mingw & msvc
we cannot just completely stub it out, as then there are no dependencies
on whatever targets we actually *want* to be built.

Change-Id: I32a92fa937d099c153a0082feae5d23e3998ba48
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-17 12:27:05 +02:00
Oswald Buddenhagen
e243f4e291 beautify "aux" target
it works better when it castrates the app template, rather than staticlib

Change-Id: If52960fb48d770e8ec096c66b579539512b8d299
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-17 12:27:01 +02:00
Joerg Bornemann
c9406bcffe qmake: support incremental linking when embedding manifests
When embedding manifests we modified the EXE/DLL after linking using
the manifest tool. This breaks the incremental linking feature of MSVC.

The MS way to embed a manifest without breaking incremental linking is:
   - let the linker create the manifest file,
   - create a resource that contains the manifest file,
   - invoke the linker again to embed the resource.

The embed_manifest_{exe|dll}.prf files have been removed.
All manifest logic is now in qmake's nmake makefile generator.

With QMAKE_MANIFEST one can specify a custom manifest file that gets
embedded without disturbing incremental linking.

Task-number: QTBUG-22718
Change-Id: Idb9d2644a0577b2002cbdd2d62b695b9171b1bd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-16 08:26:24 +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
Marius Storm-Olsen
addc9984fb Sync .pr[oi] with the Makefiles so qmake builds again
Change-Id: Ief766ac61f98859b84fc61b03b8c1292d3c06525
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-13 14:52:25 +02:00
Oswald Buddenhagen
f8ff2ae69e support installs with target dir
this adds a .base "member" to the install "structure". if specified, only
this much is stripped from the front of each element of .files, rather
than the entire path, to obtain the target filename.

Change-Id: Ic39fcf71c4ad874ffabbbad113be9cdc6e3f7260
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-08 12:04:49 +02:00
Oswald Buddenhagen
ff192b3c62 reshuffle assembly of install commands as well
don't make a single string, but a string list which is join()ed in the end.
this is a tad slower, but the code is way easier to work with.

Change-Id: I1ff7168c2770998761a6081be8080c743ddc94a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-08 12:04:49 +02:00
Oswald Buddenhagen
350d5ff3dd reshuffle assembly of uninstall commands
make a proper stringlist of commands, and join it in reverse order
only at the end. the reversal ensures that we can cleanly fold up
directory hierarchies we may build.

Change-Id: I9a241361588a6965283aec5258e1d622b35514e0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-08 12:04:49 +02:00
Oswald Buddenhagen
14d0dc1dca remove pointless appending of trailing dir separator under unix
Change-Id: Ia9b181db57ac2ee93cd412d58fe6ecbc5637a2f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-08 12:04:49 +02:00
Andreas Holzammer
495017e5d4 Rename msvc11 to msvc2012
Microsoft has named their new Visual Studio again
after the old naming schema.

Change-Id: Ib1b971807fa89d90b10892a2d78570058e564f3a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
2012-08-07 23:27:17 +02:00
Joerg Bornemann
e81d7fd1e5 qmake vcxproj generator: map TARGET_EXT to $(TargetExt)
Task-number: QTBUG-26782

Change-Id: Ib143fa6b8674c4d09d798a9301bb209b886e791d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-07 18:55:43 +02:00
Joerg Bornemann
b4ae57c881 qmake: un-copy-and-pastify vcxproj generator a bit
Reusing already built strings improves readability and performance.

Change-Id: I8555fb860561ff214ae123efeda78fc770b6459f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-07 18:55:43 +02:00
Andy Shaw
372cc6b506 Add the filters for extra compilers for vcxproj files
The files were grouped into the relevant filters but the filters
themselves were not added.  This now ensures the filters are added to the
vcxproj files so they appear grouped correctly.

Task-number: QTBUG-26755

Change-Id: I7d2c6fa96dcbb0496fd9d1bb1d01e7dd660052f4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-07 18:55:43 +02:00
Oswald Buddenhagen
c292f1dc8a respect copy_dir_files with manually flagged directories as well
otherwise the second installation on unix would be bogus.

Change-Id: I162533ee262c6820e7e2d4710b5342cafecd9d59
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-07 16:40:07 +02:00
Oswald Buddenhagen
86d1f7a61b remove not particularly useful branch
we just determined that the file does not exist, so it's entirely
pointless to query its type from the file system. consequently, the
respective fallback branch would assume a regular file anyway.

Change-Id: I42590ffc2a5f650fb430a9398cb1859217ed4350
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-07 16:40:07 +02:00
Oswald Buddenhagen
3c2f56aaf2 remove clearly bogus escapeFilePath() call
the value is still re-processed numerous times, end each "exit path"
does own escaping, while not every path can deal with an escaped path.

Change-Id: I0bf4a043809bf4b7877d02e5d8dfe8f794a7dd00
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-07 16:40:07 +02:00
Oswald Buddenhagen
68cbeb59d9 make $$relative_path() minimize already relative paths
QDir::relativeFilePath() doesn't do anything if the path is already
relative, so make it absolute first to force a re-calculation.

the cleanPath() is gone, as relativeFilePath() already does that.

Change-Id: I8f4d0d839db3fe99a608f70916b4b5bd52c56535
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-07 16:40:07 +02:00
Rafael Roquetto
6f580d6a5a Fix qmake -project
qmake -project was always outputting a project with subdirs template, because
Option::h_moc_mod was not being properly read, causing addFile() to misbehave.

Change-Id: I2c07aea132f9885eabf188de993b0fabfb352886
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-06 16:04:03 +02:00
Oswald Buddenhagen
e185f343e4 findLibraries(): don't remove -L options for system paths
the paths may be explicitly added before some other paths, so it would
be wrong to remove them.

Change-Id: I68ae93fd307afe14a07a0f24de952783950b5bea
Reviewed-by: Holger Freyther <holger+qt@freyther.de>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-04 08:15:18 +02:00
Andy Shaw
44a7330d67 Remove references to Borland and bmake
Remove references to an old compiler that has not been
supported for a long time.  Also remove Borland specific
configuration flags which have no meaning elsewhere.

Change-Id: I3634a52b78f737ea972073e14c2b6669dcd0ae63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-01 12:39:39 +02:00
Oswald Buddenhagen
9a8d74de0a remove second argument from $$eval() (access to global scope)
sam added this based on a vague notion of backwards compatibility when
he fixed the function to use the local scope, but it kind of makes no
sense - there is very little reason for accessing the global scope from
within a function. google doesn't find any relevant hits except our
source code, so let's just nuke it.

Change-Id: Ie957bb47b531f7e9b5dfcceb4e09f65dd826b422
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:50 +02:00
Oswald Buddenhagen
c595405124 run processPrlFiles() over QMAKE_LIBS_PRIVATE as well
there is no reason why private libs should not have prls resolved.

the two variables are resolved independently, so it's possible that
(even more) libraries will appear duplicated on the linker command line,
but that seems easiest for the time being.

Change-Id: I9070ba53808a0661fa72949db8111106b7aca487
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:43 +02:00
Oswald Buddenhagen
14bf7ef504 inline MakefileGenerator::processPrlVariable()
the visitor-pattern like approach is not needed any more

Change-Id: I990db681cbeee91d89ecba97745a8104595247e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:40 +02:00
Oswald Buddenhagen
f71a5c8cde make the windows prl processing more like the unix variant
it's more elegant, and more similar code is better.

Change-Id: I2b8b036cb70a932fd171e23cf7d3389188401924
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:37 +02:00
Oswald Buddenhagen
202f08dc09 remove apparently useless code
it wouldn't actually *do* anything, as l is not a reference. i cannot
figure out the original intention, so let's just drop it.

Change-Id: Ic0a3457a1872cde827259ee5530959120456e934
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:34 +02:00
Oswald Buddenhagen
02cbc0746d stub out MakefileGenerator::processPrlFiles()
the unix and windows variants don't rely on it.
not making it purely virtual only because the project generator inherits
MakefileGenerator as well but does not need an implementation.

Change-Id: I80099b3f5d07cd037b408cf1099c58ff3a2904cd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-31 11:17:30 +02:00
Oswald Buddenhagen
5e965df21d do not look for frameworks in library path
it's just wrong

Change-Id: Ia21e9fb7e67623d6c4f70eab1f76360624ba314b
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
5bc9541e7a insert explicit library search paths before system search paths
... as the linker does.

Change-Id: I4a030d9e2f281b892b78ba25b11f6df6b0893712
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
baf1f46b21 look into /Library/Frameworks as well in processPrlFiles()
Change-Id: I445b9d1d3cd349eb7981b1aec824e6878b0c16e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
b9a41f9630 unify default search paths between findLibraries() & processPrlFiles()
i see no reason why they should deviate

Change-Id: Iaa0445b79a95d348f51df74a74c7c89216c468ec
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
c451a1087e fix lookup of libraries with a full path but without extension
given that nobody noticed so far how broken this was, this doesn't
appear to be a particularly common path. but anyway ...

Change-Id: Ic17b239d724a4d69ff414a24be2e8588732bc8dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
ad5e583956 don't actually resolve frameworks in findLibraries()
the code wouldn't actually *do* anything with them, because it was
completely broken. didn't seem to hurt, so just remove it.
we still need to parse -framework, though, so we don't do funny things
with its possible argument.

Change-Id: Ia3266538612d3314a72f4965ee9c1ea2d3046ac9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-28 00:09:45 +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
022f8ebd13 merge QMAKE_LIBDIR into QMAKE_LIBS early
dealing with the directories separately doesn't buy us anything. it's
easier to mix them into the libs, as that contains some paths, too, both
in projects and in prl files.

this brings the windows generators in line with the unix ones.

Change-Id: I1f58f7edd8e21d28bfabf04384bac2e315aaf446
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:38 +02:00
Oswald Buddenhagen
10fba42d71 unifiy initialization of QMAKE_LIBS{,_PRIVATE} among windows generators
Change-Id: Ib24ec6e290bfb277232c2483768c1b863f961462
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:34 +02:00
Oswald Buddenhagen
b053aaa9ef clean up fixTargetExt()
there doesn't appear to be a point in having the function virtual; the
part in the mingw generator can be inlined somewhere else just fine.

Change-Id: I50d66d505095b43fce601928c6240a684389a4b7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:29 +02:00
Oswald Buddenhagen
a102f1abf2 de-virtualize some more functions
they are not re-implemented anywhere

Change-Id: I444a967bb39ec6b5994747c9fa3f605b4c53ce4f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:23 +02:00
Oswald Buddenhagen
e38af23470 dispose of QMAKE_LIBDIR_FLAGS, "demote" QMAKE_FRAMEWORKPATH_FLAGS
merge their content as early as possible into QMAKE_LIBS. that's where
they ultimately end up anyway, and this approach is way simpler.
QMAKE_FRAMEWORKPATH_FLAGS is also used for the compiler flags, so it
remains as such in this second function.

Change-Id: Idc3ba4a9b2569fce3252d5f5ddc3f6ebf93650cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:18 +02:00
Oswald Buddenhagen
14bdff32e2 remove duplicate -L flags in findLibraries()
unlike duplicated -l options, duplicated -L options are really redundant.

Change-Id: I4fa42d8ee2f10c6e6263457d9bb97291e13685ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:12 +02:00
Oswald Buddenhagen
a699fa520f unify handling of non-standard linker -L flags
findLibraries() now consistently expands to the linker-specific syntax,
and processPrlFiles() expects that syntax.

Change-Id: Ifd7b51d01378c91d6f2b132aca33629f21ca72f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-27 16:29:08 +02:00
Rafael Roquetto
3a27d4b480 Fix qmake hash function to use XOR
Use XOR instead of OR in order to avoid saturating all bits when computing the
hash value.

Change-Id: I50b1a044eb827239dae1c04732ca6a065f6233b4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-25 13:31:05 +02:00
Oswald Buddenhagen
1a470256e1 remove support for rvct_linker config from MinGW generator again
yet another symbian remnant (building windows arm executables for the
simulator).
This reverts commit 5c88141ed0b25d8ab9318bf4cb5dda54b90b2ce1.

Change-Id: I6eb147c0e2710eba09a4339fa4a08a5b08f8dab3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
8fa9249acc $$QMAKE_LIBDIR contents belong into $(LIBS), not $(LFLAGS)
unlike for the unix linker, this does not matter for the windows linker,
but keeping it consistent has advantages.

Change-Id: Ib9b9efa18c31d87c026d3cac5a8737f4612ad1c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
2184b27462 do not run findLibraries() over QMAKE_LFLAGS
libraries and related flags have no business in that variable, by
definition.

Change-Id: Ic958a3e082a498945ab56bc12ec05d4083ee43a5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
e5b203dbc7 dispose of MSVCPROJ_LIBS
this way QMAKE_LIBS{,_PRIVATE} can be treated the same as in all other
generators, which allows us to:
- make the windows generators' findLibraries() be more like the unix
  version
- dispose of QMAKE_INTERNAL_PRL_LIBS handling while reading prl files
  (because the output always goes to QMAKE_LIBS)
- as a side effect, QMAKE_LIBS_PRIVATE are not subjected to prl file
  resolution any more, which is again consistent with unix - the
  correctness of that needs to be assessed separately.

Change-Id: Ie9bc04d117eff6a7cde846677f98acf3c64aa6ee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
c1056c80fb remove apparently pointless call to findLibraries()
the function was already called long before. if it really needs to be
called again, it's a) probably affecting the other windows generators as
well and b) the actual problem should be fixed instead.

This reverts commit d50c3c6624b2343e42d0df4b72212d9ced8f3682.

Change-Id: Iaa2007640fbc9acdc50ba3b0681efeb0d184f224
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-24 12:45:02 +02:00
Oswald Buddenhagen
80749d946b use QT_INSTALL_LIBS directly instead of messing with QMAKE_LIBDIR
this is what this code assumes anyway

Change-Id: I667412b101c18325321a568cc22d25ef07418ffb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-18 22:35:10 +02:00
Oswald Buddenhagen
a89bd2d2fb remove QTDLL_POSTFIX stuff
the libinfix provides a way cleaner solution to that. i don't expect it
to be still actually used anyway.

Change-Id: I051522ec3abb3d92c529b5462b8514a706aa2ba1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-07-18 22:34:49 +02:00
Oswald Buddenhagen
9651738f2d automatically fix separators in QMAKE_{DIST,}CLEAN
it's a tad insane to expect the user to do that

Change-Id: I75c68f2a28656c9ba2e3fabcc79718b899b29ce7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-16 01:06:51 +02:00
Oswald Buddenhagen
c5195bcb49 remove another symbian remnant: QMAKE_RVCT_LINKSTYLE
Change-Id: Ibac060ecae061c72d4c7076b2d61a5cdd6247420
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-12 17:19:13 +02:00
Oswald Buddenhagen
079a87fec1 make the prl lookup search in standard locations
qtAddModule() skips adding standard library paths to LIBS. however, as
processPrlFiles() didn't know anything about that, it would not find the
prl files of qt libraries in these paths.
so centralize the definition of these default paths (we should actually
ask the linker for them) and use it in both places.
do the same for the include paths for symmetry.

Change-Id: I7e3692dc2d1c2d0c97a9151d15887b1263de137a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-12 10:40:50 +02:00
Bjoern Breitmeyer
e7b28bce3b fixed ce makefileenvironment
XQMakeSpec is not available after configure
but the QMakeSpec contains the correct value

Change-Id: I6cd4da8b0d6c95565f31842c17611ffd361bc010
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-06 13:58:21 +02:00
Oswald Buddenhagen
c27d78f6b0 ifdef out the "clears variables previously set" warning
it produces way too many false positives to be useful.

Change-Id: Iefa423f96fa5574267b1468abb5efc8454ab54a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-06 13:58:10 +02:00
Oswald Buddenhagen
2b4ae9651f don't use a different de-duplication algo for the library list in mingw prl files
i have no idea why that was done (the commit message says "not sure why
it works elsewhere"), but it makes no sense whatsoever, specifically
doing it only on mingw. probably some workaround, as usual. the
de-duplication is broken by design anyway.

This reverts commit 7a6302c2baf6861fdaf65992b71a7676859860c2.

Change-Id: I6edecaa062570e59eccd24d50919ba132e65a403
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-05 21:10:40 +02:00
Stephen Kelly
6bd4be9436 Uppercase the CONFIG for verbatim mode.
Change-Id: Iec883e0218af80fc329d866affb2b95db72c54d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-04 15:52:00 +02:00
Oswald Buddenhagen
43663bc87d export QMAKESPEC to the project
this makes it unnecessary to dump qmakespec to .qmake.cache and
qmodule.pri.

Task-number: QTBUG-22700
Change-Id: I678c7ee7df2512184b9cd06d7a3be8bbd0b0da15
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-07-03 16:48:33 +02:00
Konstantin Ritt
d53f5db953 qmake: improve the .pc files generator
Don't hardcode the "qt_config" EXTRA variable and use QMAKE_PKGCONFIG_VARIABLES instead.
This allows qmake create the .pc files that are unrelated to Qt.

Change-Id: Ic72005e8819a15f6c50f3aaf79424a247fba20af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-03 01:08:44 +02:00
Joerg Bornemann
ee4f32acfa qmake: remove support for X.sources in DEPLOYMENT variables
This has been deprecated in Qt 4.8.0. Use X.files instead.

Task-number: QTBUG-3216
Task-number: QTBUG-25106

Change-Id: I581321591291118a13403e92da5997497e12c3fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-03 00:44:55 +02:00
Oswald Buddenhagen
f06a928978 fix bugs surrounding reading super cache when no local cache is present
we would ignore the early read variables and fail to export the super
cache's path to the project.

Change-Id: I3c467802b4af22f73be05b25dbd8ccb6196d28a8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-06-30 08:43:28 +02:00
Oswald Buddenhagen
1491065506 Merge branch 'buildsystem' (second round)
refactoring and cleanup. fixes x-builds between different os families.

Conflicts:
	mkspecs/features/qt.prf

Change-Id: I0205e6f07f77c9b015cf055dd87a471883949a91
2012-06-29 09:06:37 +02:00
Thiago Macieira
7395e6abc6 Clean up the use of QT_NODLL
QT_NODLL is replaced by QT_STATIC, but the latter is implied if
QT_BOOTSTRAPPED is already defined. Therefore, simply remove the
QT_NODLL definitions.

Change-Id: Iac7ec0b494b7a78197c25d59547f45eaf92d7465
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-28 06:21:52 +02:00
Oswald Buddenhagen
61c775684f remove abuses of warn_msg()
this function is not meant to be used for debug statements

Change-Id: I84575e64814e2c9fd2e09c33fc680d0e6648f4ea
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-27 14:35:33 +02:00
Oswald Buddenhagen
533b4f1afd remove support for versioning qmake properties
the rationale is mostly the same as in 568e714fdf, plus the additional
point that the qmake version didn't change for a decade.
fallback paths for version 2.01a properties are provided.

Change-Id: I3d3f16595eca9eca71c78fda9dbaf53da9f874a9
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:33 +02:00
Oswald Buddenhagen
2106ab2e75 use source root also for finding features
Change-Id: I108914c6d2c6d06414156584aeb3a1afb0f5838d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:33 +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
e18ceca47e assume windows shell iff dir separator is backslash
Change-Id: I411a4d6691e18b818ee7d1ced7f126f97af0902f
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
c0abbd39fc reduce a bit of code dupe while assembling feature search path
instead of having a bunch of nested loops, collect into a temporary list
and process it at the end.

Change-Id: I97e5642f7e13f7c7b69eae00833e61cdf46a02ed
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
104ee69216 purge "dumping all variables" debug loops
the as-we-go dump is sufficient (and usually necessary to actually find
the problem). if only the summary is interesting, the -E option can be
used now.

Change-Id: I9e34c6db9dcb99b38013c4d0cb80b8cb88ca36b5
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +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
aac040b188 const correctness for variables()
Change-Id: Id11453ccbae3ffa32580badadada945d342d727a
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
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
f85292ab20 const correctness for values() calls
Change-Id: I1476ae8d3fb7364686398c5650729dee94a8e933
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
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
96702729c8 make $$PWD non-magic on read
like the other variables, we can just store it in the hash.

Change-Id: I49ad39dca8d498119b27f16ea4bdc44ae698d72e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:28 +02:00
Oswald Buddenhagen
5ef3c155db set $$_DATE_ only on project startup
this changes the semantics a bit - it will be the datetime of qmake
startup rather than the time a particular file is processed. i'd argue
that this is insignificant.

Change-Id: I75918967bef25038ce54aa81ab03c027384c0268
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:27 +02:00
Oswald Buddenhagen
b2b72eea04 deprecate $$IN_PWD
it suggests a symmetry to $$OUT_PWD which simply isn't there. the
shorter alias $$PWD is much more popular anyway.

Change-Id: Iefbfd56f1a3e526f15c9d6cd1bf59778be6f2f8d
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:27 +02:00
Oswald Buddenhagen
dfbaf479c8 make project-related variables non-magic
$$_PRO_FILE_, $$_PRO_FILE_PWD_ and $$OUT_PWD can be cleanly initialized.
no need for magic.

Change-Id: I2e339d17bae42ecb573c2f82c716f6be15a35b98
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:27 +02:00
Oswald Buddenhagen
b1c92a3dea move initialization of $$TARGET to setupProject()
that's what we have it for

Change-Id: Ib734b97d337a82c73b086dfeb2b263171f2a02b7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:26 +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
95e7106400 don't make $$TEMPLATE_PREFIX available any more
this is a purely internal variable. projects are supposed to
query $$TEMPLATE only.

Change-Id: I32a3aa7012a4fedcf6e77e2e1302ed978baac700
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
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
caa2263051 use real qmakespec as basis for finding features
doesn't make much of a difference on unix (as the default specs are just
symlinks).
on windows, it makes the gross hack used for finding spec-specific wince
default_post.prfs unnecessary.

Change-Id: Id403dce5be487e1ae22c1f54b8095a6afdd98bc8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:51 +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
32bc46a90b remove support for loading features relative to current directory
it's completely counterproductive. just include() the file instead.
i don't think anyone knew about this "feature", so just removing it.

as a side effect this removes the repeated existence check of already
found feature files, as we can use a clean else-if cascade.

Change-Id: I5d38d38d0a897f2e8857ac68d5649fd4367941c4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
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
777fa561ab read spec_pre and spec_post features
these are read before the qmakespec and before the cache, resp.
this will allow moving some hard-wired logic out of qmake.

Change-Id: I6a63050d7798bc30a4add8c009bcd801a29a0deb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
88b4ee22c9 prune feature search paths which don't actually exist
this should significantly cut down the time wasted looking for files in
non-existing directories, in particular on windows.

Change-Id: I7ab3523fe8c028e3787ebc78e4543ab04f53448e
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:50 +02:00
Oswald Buddenhagen
5ced28ed3f eliminate some use of base_vars
this limits references to this variable to its setup and explicit cache
manipulation.

Change-Id: I88dd2418051501abea201f223da7759a15f1c249
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
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
003d294cd6 clean up specdir()
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>
2012-06-26 19:29:34 +02:00
Oswald Buddenhagen
851d666bcc fix -spec/-xspec argument re-assembly
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>
2012-06-26 19:29:23 +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
Simon Hausmann
03e3fa5dd1 Fix return type of isActiveConfig("host_build")
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>
2012-06-24 21:22:51 +02:00
Bjoern Breitmeyer
00f9ac93c2 Fixed Wince Makefile environment
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>
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
575a516630 revamp automatic makefile generation for sub-projects
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
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
5290f6df89 introduce $$QMAKE_CHK_EXISTS_GLUE
instead of hard-coding platform differences, use a variable.

Change-Id: I20e98811ad5f07429148c6f88aedbabc3ba58fff
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
3c144b54cf normalize $$QMAKE_QMAKE
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>
2012-06-19 16:46:07 +02:00
Oswald Buddenhagen
46d35cc566 fix in-/out-dir mixup
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>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
4fdd663208 remove unnecessary conditional
the code above already deals with the differences

Change-Id: Ifb799e46f5187e7bd3d0f0169e868ad267bcfe23
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
d83619f65f remove duplicate assignments of MKDIR & CHK_DIR_EXISTS
Change-Id: I314659a1ba25227380176dc65a9c81e3c6df28c1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
a40469ce57 unobfuscate makefiles re $(CHK_DIR_EXISTS)
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>
2012-06-19 16:46:06 +02:00
Oswald Buddenhagen
76f0ce06e2 make 'qmake_all' targets respect .depends and CONFIG+=ordered
Change-Id: I010a9886ee0d40e4319cb6bd873b038336a42111
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
2bbd50c6e4 make 'qmake_all' target of SUBDIRS projects properly recursive
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>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
76ed07168d make 'qmake' target of SUBDIRS projects non-recursive
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>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
0e6ddb71cc don't use $(MAKEFILE) to refer to SUBDIRS' makefiles
$(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>
2012-06-19 16:46:05 +02:00
Oswald Buddenhagen
91cf67c85d do not add "/." to _PRO_FILE_PWD_
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>
2012-06-19 16:46:04 +02:00
Oswald Buddenhagen
426d1ef0c1 allow projects to suppress qmake recursion
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>
2012-06-19 16:46:04 +02:00
Oswald Buddenhagen
e78c3bb620 look for mkspecs/ even below .qmake.cache/.conf-determined root
otherwise a cache/config in an aggregator project may unduly hide the
mkspecs/ of the aggregated project from qmake's view.

Change-Id: Idb0b124de071822f8f55463d9f8a4d194ef3130e
2012-06-19 16:46:03 +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
c80697cfbe allow setting QMAKEPATH and QMAKEFEATURES in .qmake.cache
Change-Id: Ie383abb57c06cb49d38345d64750837b8fe14c70
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:02 +02:00
Oswald Buddenhagen
e894155a41 don't duplicate project_build_root's calculation needlessly
Change-Id: Id2f343c450149b13b52c2cae8eb6eb4bfd73fc03
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:02 +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
ad92c6c7de make splitPathList() return an empty list for an empty string
this makes the user code a bit cleaner

Change-Id: I3713c73c5c19cf69341be65480917eda0b967b77
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:40:00 +02:00
Oswald Buddenhagen
6a8f64136e introduce /get property variants
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>
2012-06-19 16:39:58 +02:00
Oswald Buddenhagen
ab0d55e361 purge unused VcprojGenerator::findTemplate()
it looked fishy for years. now i know why. ;)

Change-Id: I822cadecaf8d914f383f9f907b92507852e434b4
2012-06-19 16:39:58 +02:00
Oswald Buddenhagen
b35d8e651b don't generate make_default targets
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>
2012-06-19 16:39:58 +02:00
Oswald Buddenhagen
c85dc033dc add $$reverse() function
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>
2012-06-19 16:39:57 +02:00
Oswald Buddenhagen
083f7c501f add $$shell_quote() function
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>
2012-06-19 16:39:57 +02:00
Oswald Buddenhagen
09e01856b0 add $$absolute_path() and $$relative_path()
just exposes QDir::fooFilePath() wrapped into QDir::cleanPath()

Change-Id: I7a7644084825fd8092a9910ac20f695c4d9351f6
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:57 +02:00
Oswald Buddenhagen
d8e6c49bfa add $$native_path() function
more or less QDir::toNativeSeparators(QDir::cleanPath())

Change-Id: I52deee1e8086559eda5833b387a0cf64d21cbcd9
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:57 +02:00
Oswald Buddenhagen
f97913f2da add $$clean_path() function
just QDir::cleanPath()

Change-Id: I2d51e2385939d8926c00f296537ab7f6757d9a79
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:56 +02:00
Oswald Buddenhagen
1261c9b2f4 add $$format_number() function
Change-Id: I04266c1f5fb72af94073f3f508cee59085e365b6
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:56 +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
6a66fef520 add $$val_escape() function
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>
2012-06-19 16:39:56 +02:00
Oswald Buddenhagen
ade089907b add $$enumerate_vars() function
this simply returns the keys of all variables in the context.

Change-Id: I0092f827744fcd257dfb9e7ca664c87c6f1cc763
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:55 +02:00
Oswald Buddenhagen
1388199d4f make defined() support testing definedness of variables
Change-Id: I58d2dd402d72ee5a19012a6b5a4ba111717d40cc
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:55 +02:00
Oswald Buddenhagen
7da934d776 add mkpath() function
Change-Id: I8809b9ee4e85fbe8cec95641d659f237c5f51a26
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:55 +02:00
Oswald Buddenhagen
b500397809 add log() function
this is a literal print to stderr.

Change-Id: Ib0a2f53373ebbc4e0bda07a38d656bce145b31cf
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:54 +02:00
Oswald Buddenhagen
064a5a08d2 add touch() function
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>
2012-06-19 16:39:54 +02:00
Oswald Buddenhagen
84614cabfa add write_file() function
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>
2012-06-19 16:39:54 +02:00
Oswald Buddenhagen
2702f7637e add cache() function
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>
2012-06-19 16:39:54 +02:00
Oswald Buddenhagen
64f475aabd add "blob" and "lines" modes to $$cat() and $$system()
this bypasses the otherwise done insane word splitting

Change-Id: Ia9b8980bc0770de3999544a06d239f55fb34f801
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-06-19 16:39:53 +02:00
Oswald Buddenhagen
7d8578418d properly declare the host tools as such in the project files
don't mess with the qmake cmdline args any more.

Change-Id: I399d87145d31d25e29951b6acd96387a3c7282f0
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:37:50 +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
528192a78b Revert "make default_pro.prf advertize dynamically created .qmake.cache"
... 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>
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
Andy Shaw
4524187129 Remove unnecessary code from the XCode generator
Since we only support XCode 3 and later, then all of the legacy code can
be safely removed.

Change-Id: I9be8555aaa62c716b2277c2b97f41aa02d27ef13
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-12 17:40:21 +02:00
Debao Zhang
e5bd2ed18c qmake can not process project file with UTF-8 BOM
Project file contains UTF-8 BOM can't processesed by qmake and will
cause subtle errors.

Task-number: QTBUG-25848
Change-Id: Id69ed38c6be63a29fa3792a631cb8cb0ac176148
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-30 01:54:45 +02:00
Andreas Holzammer
1a4f58d3e6 Add Visual Studio 11 mkspec
This adds the Visual Studio 11 mkspec
and the corresponding changes to configure
and qmake makesystem.

Change-Id: I3a7e82a6f7f90aa0a94dedd493ebaa66bf100923
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-16 13:34:20 +02:00
Thiago Macieira
28aa3324de Port away from QString::{to,from}Ascii in qmake
Properly use from/toLocal8Bit when referring to user data, even file
names.

Change-Id: I8fc7afa2ea570f8b1b1eecf354f01d6dfe0883cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-05-14 17:33:04 +02:00
Thiago Macieira
fd63acdc83 Don't use the QRegExp methods that modify the object [qmake]
QRegExp matching methods modify the object, which we don't want to. In
particular, when we receive a QRegExp from the user or we store in a
context that might require thread-safety, make sure we make a copy
before using it.

QRegularExpression has no such shortcoming.

Task-number: QTBUG-25064
Change-Id: I6b2d2530238a7e04b44859664a2962f2f466ee30
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-23 19:20:19 +02:00
Mark Brand
8e053a5dfc fix static library names when generating .pc files for pkgconfig
219a688ac1 added the version extension
which only occurs on the DLL import library.

Change-Id: Ie913adf039d7f3a9aadf43f4af014289a8aeacbe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Hib Eris <hib@hiberis.nl>
2012-04-19 19:46:07 +02:00
Lars Knoll
64255ef650 Merge remote-tracking branch 'origin/api_changes'
Change-Id: I964b0a6f5c38351fdfafb8a2a128a349ff8c89d1
2012-04-17 12:58:52 +02:00
Joerg Bornemann
ac7dd2782f qmake vc(x)proj generator: don't create bogus directories
When creating the temporary project object,
Option::output_dir must be adjusted temporarily.

Task-number: QTBUG-22788
Change-Id: Ibf8897a46b63f48b9e33d7e2168b09e559cecec7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
8987e5d2cb qmake/Win: fix incomplete generated version resource
Since Windows Vista the resource language must be included to
make the version information visible in Windows Explorer.

Two new variables have been introduced:
RC_LANG (default: 1033) - resource language
RC_CODEPAGE (default: 1200) - resource codepage

Task-number: QTBUG-23218
Change-Id: I29e102d19501e3b7a43d5096fc4806bc38a4d846
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-17 03:26:32 +02:00
Joerg Bornemann
31cfe5ca1b qmake vcxproj generator: fix handling of /MANIFEST:NO linker option
Task-number: QTBUG-23513

Change-Id: I5dd6fb6fd7910e43acd28057133a3ad6613cfc1a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-17 03:26:32 +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
Joerg Bornemann
65425be8fe qmake vcproj generator: unused variable removed
Change-Id: Iaf8bb1772846001297e1a421c3860f5e4d090a35
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-17 03:26:32 +02:00
Lars Knoll
9bd0323551 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/corelib/io/qurl.cpp
	src/gui/kernel/qwindow.cpp
	src/tools/moc/generator.cpp
	src/widgets/kernel/qwidget_qpa.cpp
	src/widgets/styles/qstyle.h
	src/widgets/widgets/qtabbar.cpp
	tests/auto/corelib/codecs/utf8/tst_utf8.cpp

Change-Id: Ia457228d6f684ec8184e13e8fcc9d25857b1751e
2012-04-16 12:04:34 +02:00
Joerg Bornemann
99a2074369 qmake vc(x)project generator: fix VC++ Express detection
If VC++ 2010 Express and VC# 2010 Express are installed, then the
installation path is written in two places into the registry.
We're now filtering detected installations with the same installation
path.

Task-number: QTBUG-24956

Change-Id: I401430e7aa81d96c523d8172d2a2e9d40ebdb3ce
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-12 04:15:05 +02:00
Oswald Buddenhagen
143c4d3e13 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	configure
	src/widgets/styles/qwindowsxpstyle.cpp
	tests/auto/gui/kernel/qwindow/qwindow.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp

Change-Id: I624b6d26abce9874c610c04954c1c45bc074bef3
2012-04-10 15:31:45 +02:00
Thiago Macieira
7ae76153cb Remove -DQT_NO_STL from the bootstrapped builds
Change-Id: I37ea06426b66e617a49ec46952abdaad8814eadf
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-07 05:19:56 +02:00
Joerg Bornemann
0174c966f7 qmake vcxproj generator: properly escape XML attributes
Task-number: QTBUG-24954

Change-Id: I21299440ba3f268c2fa1e14d37003cdc3e6a35ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-05 17:48:15 +02:00
Giuseppe D'Angelo
33984e72ab QHash security fix (1/2): add global QHash seed
Algorithmic complexity attacks against hash tables have been known
since 2003 (cf. [1, 2]), and they have been left unpatched for years
until the 2011 attacks [3] against many libraries /
(reference) implementations of programming languages.

This patch adds a global integer, to be used as a seed for the hash
function itself. The seed is randomly initialized the first time a
QHash detaches from shared_null.

Right now the seed is not used at all -- another patch will modify
qHash to make use of it.

[1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf
[2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks
[3] http://www.ocert.org/advisories/ocert-2011-003.html

Task-number: QTBUG-23529
Change-Id: I7519e4c02b9c2794d1c14079b01330eb356e9c65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-04-03 19:12:13 +02:00
Yuchen Deng
c7f8f459bd Fix build all failed for 'TEMPLATE = aux'
NMAKE : fatal error U1073: don't know how to make 'all'
Stop.

Change-Id: I387a417d37e38811706a1ff460df8ee581c6a33f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-04-02 12:41:32 +02:00
Jędrzej Nowacki
fb650b0271 Compile QArrayData in bootstrap phase.
This change will be needed during migration from QByteArrayData to
QArrayData.

Change-Id: I0c8d6f9ed3ef7c33af62736af55259a8f9a70c0f
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-29 11:28:41 +02:00
Thiago Macieira
af3c7d35b6 Fix qmake's use of Q_ASSERT with side-effects.
The nice side-effect of having Q_ASSERT use the condition twice is
that we break code that has side-effects.

Change-Id: Ia0b7ed2a8030c8e222612af95eb2d58671433110
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-28 21:24:43 +02:00
Thiago Macieira
6ab6b0fc1c Disable QUrl support in QVariant in bootstrapped mode
The only use of QUrl in qmake, moc, uic and rcc is due to QVariant's
internals, so let's disable it. This means those binaries are now
probably a lot smaller since the parsing and IDNA code don't need to
be present.

Change-Id: Ie156b0817d119b2ba5d3dcb9712a9fea2ee7d4a1
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-03-24 16:30:58 +01:00
Kent Hansen
95d6f8a4cf Merge master into api_changes
Conflicts:
	src/corelib/tools/qvector.h
	tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp

Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
2012-03-19 10:03:48 +01:00
Marius Storm-Olsen
fbc251b364 Win32: Compile qmake when shadow-building
Change-Id: I803c733f744372701c51e4d629ff797c6648f833
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-18 12:36:48 +01:00
Olivier Goffart
3abc6be685 Build qmake with QStringBuilder.
QStringBuilder will be enabled by default so qmake should build with it.

qstringbuiler.cpp has to be compiled in just for the convertFromAscii
(The alternative was to build with QT_NO_CAST_FROM_ASCII, but that would
be too much work)

Change-Id: I1fbeed7ed8a9d3bc38ef591a687c50644980e2fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-16 23:02:15 +01:00
Oswald Buddenhagen
c0791b86ab allow the unix generator to run in windows host mode
this is a complete bastardization of the concept and breaks the (unused)
debugging feature to create proper unix makefiles under windows, but
apparently it permits cross-compiling unix targets under windows.

Change-Id: I4ee95a20e7d6a6b2063ec7aa22f52c1a97d78a77
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-16 18:12:41 +01:00
Lars Knoll
d5098f2802 Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
	tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp

Change-Id: I884afc3b6d65c6411733a897a1949e19393573a7
2012-03-12 21:03:49 +01:00
Sean Harmer
2dd6f1467f Allow qmake to find features when using mkspecs in nested dirs
Commit 8e5eb1bddc introduced the assumtion that mkspecs are
immediately below the mkspecs directory itself. This is not true for
e.g. unsupported/blackberry-armv7le-qcc.

This commit restores qmake's ability to find the "root" of the mkspecs
collection no matter how deeply the actual mkspecs are nested.

Task-number: QTBUG-24665
Change-Id: I98faaf8e6ae7b8524277aea6c17e685e507e37b3
Reviewed-by: Sean Harmer <sh@theharmers.co.uk>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-12 11:09:24 +01:00
Oswald Buddenhagen
aed6eaa5b2 QT_RAW_INSTALL_FOO => QT_INSTALL_FOO/raw
this makes the "sysrootable" properties more magic, with the raw
versions being omitted from the qmake -query output and automatically
falling back to the "cooked" variant if there is no sysroot set.

this makes the "normal" qmake -query less noisy. this will become even
more obvious when i add more "overloads" of the properties.

Change-Id: I08000986427264ec6238c8fe0a77f5cecdbf1201
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-12 11:01:02 +01:00
Oswald Buddenhagen
197ba93cf0 rip out -incremental from configure
the feature is rather obscure and unlikely to be used by anyone.

Change-Id: I2dfb4ca4d5d1f210d385c013f46bc6389fd6ea2d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-12 10:59:44 +01:00
Oswald Buddenhagen
46e51ce1dd do not copy/symlink qmake to build dir
make is perfectly capable of doing shadow builds

Change-Id: I7e1c27cddc385b7a17ae5645b9cd26fa56d2f029
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-09 14:23:15 +01:00
Oswald Buddenhagen
2640b71be4 remove support for QMAKE_PLATFORM_DIR
this was a somewhat magic support for sysroots, automatically rewriting
a number of path-holding variables. this was (as usual) completely
undocumented, extremely fragile, and we are coming up with something
better now anyway.

Change-Id: I045910f532cb3efc839ea81c7a48f8db695e4092
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-08 23:52:34 +01:00
João Abecasis
12f221410f Merge remote-tracking branch 'origin/master' into api_changes
Change-Id: I89dc2e193bd01624c1fb50484610d516e39b1538
2012-03-08 01:27:39 +01:00
Oswald Buddenhagen
6c612c9338 move postProcessProject() call to sane location
there is totally no reason to call it unless the project is actually
used for makefile generation, and the excessive calls actually mess up
things.

Change-Id: Idb7912a5404f6054010d2f29cce820a167de4f6f
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-07 22:46:29 +01: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
Max Desyatov
9d5e721e96 escape *_script_file usages in MingwMakefileGenerator::writeObjectsPart
Task-number: QTBUG-24595
Change-Id: I1e78a6015247b9e41ae2b05b50fdedf0613f00f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-06 12:28:26 +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
David Faure
dc75c20397 Split up base class QFileDevice for open-file operations (read/write)
This will be used later on as a base class for QTemporaryFile and
QSaveFile.

Change-Id: Ic2e1d232f95dc29b8e2f75e24a881ab459d3f037
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-03-06 12:09:57 +01: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
703ef4f79e make QMakeProject's copy c'tor actually behave like one
instead of initializing base_vars with the original's vars, initialize
vars itself. this has two consequences:
- there is no need to call read(0) to initialize vars
- one cannot usefully call the complex read() anymore, as that would
  re-initialize vars from base_vars

this is much closer to an actual copy than the previous "seeding with
existing project".

Change-Id: Ib007bc5b779aedb680a27329aa578f7c604a4308
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-06 06:34:47 +01:00
Oswald Buddenhagen
a91c997238 give load()/include() with target and infile()/$$fromfile() a clean environment
load()/include() with a target namespace would inherit the current
context. however, if you source a project with all bells and whistles,
this makes completely no sense and may be actually counterproductive.

infile()/$$fromfile() would have interited only the functions from the
current context. that was only a hack to support abusing them.

Change-Id: I2e992b923d9e5b0e5056001ca49b35de573abc63
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-05 14:46:36 +01:00
Oswald Buddenhagen
deb3c134b5 remove injection of default_pre in infile()/$$fromfile()
this is a hack from the times when these functions were (ab)used to
inspect proper project files, but the inclusion was done with a clean
project, so that the included files did not have any functions to work
with.

Change-Id: I19925e8ead597ca38df040000c183e368b32c06d
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-05 14:46:12 +01:00
Lars Knoll
96232be146 Merge remote-tracking branch 'origin/api_changes'
Conflicts:
	dist/changes-5.0.0
	mkspecs/features/qt_module_config.prf
	qmake/project.cpp
	qmake/property.cpp

Change-Id: I6e4af40743a9aeff8ed18533a48036e332acc296
2012-03-04 21:45:05 +01:00
Oswald Buddenhagen
c679b2f0a6 get rid of Option::user_configs
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>
2012-03-02 21:33:08 +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
74a6669fa7 move finding the makespec to Option
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>
2012-03-02 08:43:06 +01:00
Oswald Buddenhagen
c3a1af63ae search for default spec just like for other ones
that way qtbase will find its spec without hacking .qmake.cache.
note that passing "-spec default" on the command line would have already
triggered the normal path, so artificial limitation did not even provide
safety against abuse (it is arguably pointless/counterproductive for
other projects than qtbase to have a default spec).

Change-Id: Ib0c3e6498fd70cd6f9561951d72a47165878bb33
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-02 01:06:22 +01:00
Oswald Buddenhagen
054051d91f remove some bogus include locations
nothing to be found in <sourcedir>/include.
neither in <builddir>/src/corelib/xml.

Change-Id: I381391a64542dc2ac7b421b6646c60a1b7a14639
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:22:00 +01:00
Oswald Buddenhagen
5515b48ac9 use VPATH to locate sources
makes the file a "tad" more concise

Change-Id: I81d9721942890659ac93b32f5988f9c005c88e87
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:21:48 +01:00
Oswald Buddenhagen
d9bf972e2b merge Makefile.win32-g++{,-sh}
the only difference is in the copy & del commands. the msys tools are
tolerant about windows paths, so this just works.
the in-makefile variant detection is stolen from tools/configure/.

Change-Id: Ia283c1fe2e2aaa8cd5b1dfd7ae29244115f07d65
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:20:44 +01:00
Oswald Buddenhagen
012f799254 revamp -sysroot and -hostprefix handling
instead of being a variable added to the makespec (via qconfig.pri),
QT_SYSROOT is now a property.

the QT_INSTALL_... properties are now automatically prefixed with the
sysroot; the raw values are available as QT_RAW_INSTALL_... - this is
expected to cause the least migration effort for existing projects.

-hostprefix and the new -hostbindir & -hostdatadir now feed the new
QT_HOST_... properties.

adapted the qmake feature files and the qtbase build system accordingly.

Change-Id: Iaa9b65bc10d9fe9c4988d620c70a8ce72177f8d4
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:18:23 +01:00
Oswald Buddenhagen
0bb99c6ff3 cosmetics: remove redundant conditional, add a comment & reshuffle code
Change-Id: I71c7e18db63f3581b8c818ad178aeb4f6ccf9446
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:12:13 +01:00
Oswald Buddenhagen
8e5eb1bddc look for features relative to spec only in advertized place
that is, spec/../features/ (i.e., mkspecs/features/) - and not any
directory up to the root.

Change-Id: Ie5fdf2898fba5ac93583571edc24629471604798
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:12:05 +01:00
Oswald Buddenhagen
c0e9041b6d optimize QMakeProperty
make it table-driven and have it cache the immutable values from
QLibraryInfo.

Change-Id: I07ed89152aa964bc9edf4436ee7c42f99cc6bcd3
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 21:00:23 +01:00
Oswald Buddenhagen
4494ddfec7 make default_pro.prf advertize dynamically created .qmake.cache
moving the detection of .qmake.cache to the qmake startup had the side
effect that a suddenly popping up cache would not be picked up by
nested projects any more.
this is not supposed to work in the first place, but the syncqt hack for
building against non-installed modules relies on it. until we have
cleaned that up properly, we need a way to notify qmake about the
appearance of the cache file.

Change-Id: I450646b936e3bb2ef2ed3aba05df58e521ccdc61
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 19:00:15 +01:00
Andy Shaw
221fe8776b Add support for XCode 4 into qmake
This adds support for XCode 4 into qmake and also indirectly fixes a
couple of problems that are relevant for XCode 3.2 too

Task-number: QTBUG-17247
Change-Id: I722470ad1854bd740cbbd28ff4956057a0e1906b
Reviewed-by: David Forstenlechner <dforsten@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
(cherry picked from commit b5871311457ca97816c0abbb8b935570bbfb657c)
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-01 00:09:57 +01:00
Oswald Buddenhagen
8516194633 don't duplicate QLibraryInfo declaration
there is no reason for doing that. there is even reason for *not* doing
it (the enums running out of sync).

Change-Id: Ieb7d015ca497a6675cc85da4c2e0af0c1533dd7a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-29 15:53:21 +01:00
Rohan McGovern
98dd1781d9 Merge master -> api_changes
Includes fixes for tst_qfiledialog2, tst_qtextedit autotests on mac.

Change-Id: I49cac26894d31291a8339ccc1eb80b6a940f0827
2012-02-29 09:23:14 +10:00
Hib Eris
78faefdbb1 Implement missing replacements when installing .pc files for win32
This implements replacements for win32 makefile generators similar
to the replacement functionality in unix makefile generators.

To enable Makefile code generation for replacements in win32 makefile
generators, you must set QMAKE_STREAM_EDITOR to e.g. sed.

When building for win32, sed is normally only available in the
mingw/msys build environment and when cross compiling on unix.
In these cases QMAKE_STREAM_EDITOR is set to sed in qmake.conf.

For other win32 build environments QMAKE_STREAM_EDITOR is not set
in qmake.conf and the replacements Makefile code is not generated.

Change-Id: Ie5de5d517eafaeaa2544f1e972aec3fe11d0a6f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-29 00:05:38 +01:00
Oswald Buddenhagen
65b42dd4c8 look for mkspecs in the project root, not next to every project
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>
2012-02-29 00:05:38 +01:00
Oswald Buddenhagen
08fe1f6871 resolve relative spec paths already on the command line
this is way more predictable than resolving it later.

Change-Id: I0ce27977b795bde9235e1d51d6f2d0d917f2398c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-28 09:13:47 +01:00
Oswald Buddenhagen
059200a44b move .qmake.cache search to Option
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>
2012-02-28 09:13:31 +01:00
Oswald Buddenhagen
bf29a8a27d don't look for features in PrefixPath
it's generally redundant with DataPath which we already look into.
this is consistent with where mkspecs are looked for.
i don't think anyone will notice this "loss" ...

Change-Id: Iab7c35cc22ba53e1005f26b5d85d41cf4dafad07
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-28 09:13:00 +01:00
Oswald Buddenhagen
dd7befcfd8 scope context saving more minimally
no point in saving the context when we are not actually modifying the
current context.

Change-Id: Id6f51a163e86bdf402aa0713737b655db68e7ee8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-28 09:12:30 +01:00
Oswald Buddenhagen
e76d72aec5 don't generate bogus TARGETs
Change-Id: Ia99cd8862157e5630506d02b3c7e9b35d4bc3302
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-27 20:52:45 +01:00
Oswald Buddenhagen
e34ee31270 remove fallback re-initialization of TARGET after parsing project
we already initialize it before parsing a project. if a project is daft
enough to clear TARGET, it does not deserve differently than breaking.

Change-Id: I6c727bc27d72a00e84b676ae3c169024bdb2d929
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-26 13:23:49 +01:00
Marc Mutz
8397a44bed QByteArray: deprecate QT_NO_CAST_FROM_BYTEARRAY-protected operators
The QByteArray::operator const {char,void}*() implicit
conversions are a source of subtle bugs, so they right-
fully can be disabled with QT_NO_CAST_FROM_BYTEARRAY.

  const char *d = qstring.toLatin1(); // implicit conversion
  while ( d ) // oops: d points to freed memory
     // ...

But almost no-one ever enabled this macros in the wild
and many were bitten by these implicit conversions, so
this patch deprecates them.

I would have liked to remove them completely, but there
are just too many occurrences even in Qt itself to hope
to find all conditionally-compiled code that uses these.

Also fixes all code that needs to compile under
QT_NO_DEPRECATED (in qmake/, src/tools/).

I984706452db7d0841620a0f64e179906123f3849 separately
deals with the bulk of changes in src/ and examples/.

Depends on I5ea1ad3c96d9e64167be53c0c418c7b7dba51f68.

Change-Id: I8d47e6c293c80f61c6288c9f8d42fda41afe2267
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-26 09:14:11 +01:00
Hib Eris
219a688ac1 Add TARGET_VERSION_EXT to pkgConfiglibName
The libName that is used in pkgConfig files should include the
TARGET_VERSION_EXT.

This is needed because in Win32MakefileGenerator::fixTargetExt(),
the TARGET_VERSION_EXT is added to the library name.

In Win32MakefileGenerator::processVars(), if TARGET_VERSION_EXT is empty,
it is set to VER_MAJ.

On platforms != Windows, TARGET_VERSION_EXT does not seem to be used.

We probably got away with this so far because pkgconfig files generation
for win32 was just added in 4.8 and nobody uses them yet, and because on
platforms != windows the TARGET_VERSION_EXT is not used.

Change-Id: I56f239e389f0ef926030e4c2376cadd92c4f673c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-24 16:21:37 +01:00
Hib Eris
cbf8f03cf4 Create target pkgconfig dir in qmake generated Windows Makefiles
Change-Id: Icea70987ee3c6040ca3ba278a578849cb74156f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-24 11:29:43 +01:00
Rohan McGovern
8583bc914a Fixed resolution of QMAKESPEC on Windows.
base_vars["QMAKESPEC_ORIGINAL"] is not guaranteed to be set the first
time resolveSpec is called, since an include() can wipe it out.  Change
it so that resolveSpec is called repeatedly until some
QMAKESPEC_ORIGINAL is set.

The code which attempted to remove all of the path up to the last / was
incorrect and must have been dead code (or its wrongness didn't matter)
until now.

Change-Id: I2b31ae10fc284ac7293c3cd95e5a2fd503ca7ab0
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-23 21:51:24 +01:00
Andreas Hartmetz
553ffa0118 Revert "Escape project file name in makefile rebuild rules."
It was the result of miscoordination between Andreas Holzammer and me,
duplicating the functional change of commit
ea2c9f764f.
This reverts commit 8b7a9b4898.

Change-Id: I9a47746c1c12ca00b2dc5c5d50e99f9bf990e3f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-23 16:38:45 +01:00
João Abecasis
7bbe79fe5f Drop file-engine abstraction from public API
This abstraction imposed serious performance penalties and is being
dropped from the public API.

In particular, by allowing file names to be arbitrarily hijacked by
different file engines, and requiring engines to be instantiated in
order to decide, it imposed unnecessary overhead on all file operations.

Another flaw in the design with direct impact on performance is how
engines have no way to provide (or retain) additional information
obtained when querying the filesystem. In many places this has meant
repeated operations on the file system, where useful information is
immediately discarded to be queried again subsequently.

For Qt 4.8 a major refactoring of the code base took place to allow
bypassing the file-engine abstraction in select places, with
considerable performance gains observed. In Qt 5 it is expected we'll be
able to take this further, reaping even more benefits, but the
abstraction has to go.

[Dropping this now does not preclude that virtual file systems make an
appearance in Qt at a later point in Qt 5's lifecycle. Hopefully with a
new and improved abstraction.]

Forward declarations for QFileExtension(Result) were dropped, as the
classes were never used or defined.

Tests using "internalized" classes will only fully run on developer
builds. QFSFileEngine was removed altogether from exception safety test,
as it isn't its intent to test internal API.

Change-Id: Ie910e6c2628be202ea9e05366b091d6d529b246b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-22 00:07:31 +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
d5afe6e7e4 remove bizarre late feeding of user_configs into base_vars
there is no obvious reason why this should happen. if base_vars is used
again, the user configs will be parsed again, too.

Change-Id: Ib56e01a468cdb5e81d610bcaf0163bf730cbae05
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-21 18:41:40 +01:00
Stephen Kelly
7a7d82ffd9 Implement QMAKE_SUBSTITUTES.config = verbatim.
Change-Id: Ie0b333fa7fae2283e99e42f9cd7bab4e84991f40
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-11 13:30:31 +01:00
Andreas Holzammer
8b7a9b4898 Escape project file name in makefile rebuild rules.
Change-Id: I5407c2477613119b5aea2d00eb88cc24d35788ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-11 13:30:31 +01:00
Oswald Buddenhagen
8f7716c32c lower qmake optimization level on msvc
-O2 triggers an optimizer bug where compiling unixmake*.cpp would take
several minutes each. -O1 is not measurably slower, so use that instead.

Change-Id: Ibf8abbecdd69e35cef800841f781543121168f76
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-10 15:23:01 +01:00
Andreas Holzammer
e5830479d6 Escape Dependencies of precompiled header right.
Change-Id: I847c85250b78a934bd29e09250d209d9ef412f7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-10 11:24:48 +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
Kai Koehne
be98fa32c7 Allow customization of qDebug output at runtime
Check the QT_OUTPUT_PATTERN environment variable in the default
message handler to customize the output of messages. Following
place holders are right now supported:
 %{message}, %{type}, %{file}, %{line}, %{function}

The original cleanupFuncinfo was written by Thiago Macieira.

Change-Id: I6ad25baaa0e6a1c9f886105d2a93ef3310e512a9
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: David Faure <faure@kde.org>
2012-02-09 18:11:21 +01:00
Giotis Nikos
6b807a283c Fix qmake evaluation of QMAKE_TARGET.arch on msvc2010 x86_64
This change is needed because msvc2010 tools have a '\' character at
the end of environment variable VCINSTALLDIR. This variable on msvc2008
does not have this '\' character at its end. Without this change
QMAKE_TARGET.arch on msvc2010 x64 evaluates to x86 instead of x86_64.

Task-number: QTBUG-22686

Change-Id: Ifba833e9361c97568b8b3de9976023e8537b208a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-02-08 07:48:43 +01:00
Friedemann Kleint
9f54846d95 qmake: Work around MSVC compiler bug.
Disable optimization for getProjectUUID() as it triggers
ASSERT: "&other != this" at qstring.h:720 with -O2.

Change-Id: I51b31d4318ba9be187c186623099171d8f48235b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-05 19:03:18 +01:00
Andreas Hartmetz
ea2c9f764f Escape path names in qmake-generated Makefiles.
qmake-generated Makefiles since 4.6 (according to bug report) contain
recursive qmake invocations with absolute paths to .pro files, where the
absolute paths are not escaped.

Task-number: QTBUG-11776
Change-Id: I49772c7d9147efea3bb7b9623c61d92aa0bb6857
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-31 11:47:11 +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
Orgad Shaneh
f9b94a7ee1 qmake: Normalize paths instead of converting to native separators
Task-number: QTBUG-22738

Change-Id: I40163a883d84beff79f52bff141d61dfe921c129
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-19 00:17:32 +01:00
Kurt Korbatits
0d128aded5 qmake wasn't handling spaces in names when dealing with extra installs.
When installing extra binaries the paths where not being escaped,
causing stripping and deleting to fail when dealing with filenames
that contained one or more spaces.

Change-Id: Iba4517b1110f6af30f7e2662cb86024a8b7b81f7
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-14 05:36:54 +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
Joerg Bornemann
ece75a8adf qmake: fix default value for C++ optimization in vcxproj files
For the debug configuration the optimization should be turned off.

Task-number: QTBUG-23421

Change-Id: Ib63e0c51f9ab31180ff8ee01a1f6c57ab77e390e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-08 18:21:00 +01:00
Joerg Bornemann
c85121989f qmake: fix /MP option for VS 2010
Setting QMAKE_CFLAGS+=/MP in a project file did not work for VS 2010.

Task-number: QTBUG-23490

Change-Id: I39c349bf8dc2a4add2f32a430a245a20cc54147e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-08 18:20:54 +01:00
Friedemann Kleint
1ff1288c04 Make QUuid a class.
Silence MSVC warnings about forward-declarations as class
in the metatype system.

Change-Id: I676662e5919585e98c87413fd8360d6f41f73631
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-06 19:24:23 +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
Giuseppe D'Angelo
c580be804f Remove unused -DQT_NO_PCRE from qmake makefiles
That define is not used anymore when building qmake.

Change-Id: I6a478cf4bb6cc8dfe87a3cc96f1d520b08e4ba6f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-23 21:24:25 +01:00
Tor Arne Vestbø
47df122259 qmake: Add object_parallel_to_source config option
This solves the problem of two source files in the same project
having the same name, which ends up with colliding object files.
It also solves issues with moving files around in the source tree
when the GNUmake option is used together with gcc_MD_depends,
where the dependency file would end up with a dependency to the
old source location.

We already have object_with_source option, but that does not play
nicely with shadow-builds. The new option tries to keep the same
hirarcy in the output dir (while still respecting OBJECTS_DIR),
as the sources. Any source with a path outside of the root project
directory (absolute or relative, ../../foo.cpp), will be put inside
the objects directory with the full path appended.

Change-Id: I0c96291974f4801f4c55a26485d512b15c144c00
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-07 12:55:28 +01:00
Tor Arne Vestbø
f9d5d23508 qmake: Don't assume that GNUmake is able to resolve arbitrary dependencies
Extra compilers may define a depend_command that's used to generate
dependencies for each input. When GNUmake was enabled we failed to
run this command, which was affecting resource files, as resource
dependencies are handled by an extra compiler defined in resources.prf.

The result was that changes to resources included in a resources-file
did not trigger a re-run of qrc and subsequent recompile of the
resource object file.

We must always run these custom dependency commands, even when GNUmake
(and the extended gcc_MD_depends option) is enabled, as GCC is only able
to handle regular #include-type dependencies. Hence, the check for the
'include_deps' flag was removed from doDepends(), and the check for
GNUmake was moved to the one place where it still made sense -- when
deciding whether or not to do recursive dependency checking.

Change-Id: I5ddb75c873120c90f798808efc52e81500786301
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-11-28 15:08:01 +01:00
Tor Arne Vestbø
ca572a6144 qmake: Allow extra compilers to have the makefile depend on its inputs
And enable this configuration option for the resource compiler. This
results in a re-run of qmake whenever you touch a qrc file, which is
needed to keep the dependencies up to date. Otherwise you might end
up in the situation where you add a file to a qrc, edit the file some
time later, but a rebuild does not regenerate a cpp file and compile
that, so the final binary is stale.

Technically this dependency problem is present for all source files,
and qrc files are no different than any cpp file that you add a new
header #include to, or adding a Q_OBJECT macro to a header. To pick
up these changes we have to re-run qmake, so that qmake can run its
internal dependency checking, and any extra compiler dependency
commands.

The reason we're making this change for rcc files it that conceptually
people treat them as a "project" files, and expect them to behave similarly
to .pro or .pri files, in that editing the file will invalidate the
makefile. In practice this is often what happens when adding new
headers, as you touch the project file when changing the HEADERS
variable.

Task-number: QTBUG-13334
Change-Id: If69149678e7fba6d812d31dcc17877427f9a6122
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2011-11-28 13:35:42 +01:00
Rohan McGovern
9ffd7a339f Added build system support for installing tests.
Tests will install under $$[QT_INSTALL_TESTS].

TESTDATA may be used to install additional testdata required by the
test.

The default install rule may be disabled by
CONFIG+=no_testcase_installs.

Change-Id: I204de60c8e844775906ffd016ca50bffbb414142
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-23 00:13:46 +01:00
Rolland Dudemaine
6c0033f8e6 Add -nn for .cpp MOC preprocessing for INTEGRITY
qmake generates .gpj project files for INTEGRITY.
Calls to moc on headers or code that do not produce actual output cause
a Note to be generated. This is considered as an error during build by
the Green Hills gbuild build tool.
-nn can be added to not generate that note when no output is generated.
This was already done for headers in util/integrity/qt.bod, but it was
not there yet for .cpp files.

Merge-request: 2693
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 480b2f4c79160afaac7934936d3ae6ea382ae2bb)
Change-Id: I480b2f4c79160afaac7934936d3ae6ea382ae2bb
2011-11-18 20:25:53 +01:00
Rolland Dudemaine
a69446d4e9 Remove commented out code.
Merge-request: 2693
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit c37ba1319c5789b82e14b84e9bc85ceff7cc6b5e)
Change-Id: Ic37ba1319c5789b82e14b84e9bc85ceff7cc6b5e
2011-11-18 20:25:53 +01:00