Commit Graph

357 Commits

Author SHA1 Message Date
Joerg Bornemann
9e9911715c qmake: fix overescaped defines in vcxproj files
Task-number: QTBUG-27345

Change-Id: I00848d611163afb549191f41adff628622a899e0
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-26 19:12:31 +02:00
Kai Koehne
7ec788705f qmake: Fix gcc warning about anonymous type linkage
Fix "warning: anonymous type with no linkage used to declare variable
'<anonymous struct> dotNetCombo []' with linkage".

Change-Id: Iaff0d460df53fd6d0732d39bf633688805f5c653
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-26 10:08:59 +02:00
Joerg Bornemann
461a01c1df qmake: support for Visual Studio 2012 project files added
The differences to VS 2010 project files are the
version number (surprise!) and the PlatformToolSet tag which
sets the version of the toolchain.

Change-Id: If26f08fad1a69d7e6cd28cc5e860ff964f19b264
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-25 07:26:37 +02:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Marc Mutz
f4d47945ba Use QStringList::join(QChar) overload where applicable [qmake]
This is an automated change performing the following replacements:
                    join\("(.)"\) -> join('\1')
  join\(QLatin1String\("(.)"\)\)  -> join(QLatin1Char('\1'))
  join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1'))

Change-Id: I9c9964703dedfdab6e7bfac80be22bd5570e2e49
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-21 02:44:22 +02:00
Marc Mutz
cbf447069c qmake: add ProStringList::join(QChar)
Same reasoning as for 68e04c3ac1 applies.

Adding the overload was easier than to teach a Perl script to distinguish
between QStringList and ProStringList instances...

Change-Id: I6de6ecf21fdad135ac213b5c794927a9bc120a92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
0da7f09724 make error() abort the qmake run, not just the current file
Change-Id: I82fc55680f9ffb227e25acb39c797596225ba89e
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-21 02:44:22 +02:00
Oswald Buddenhagen
04cd23428a resolve only one level of symlinks, and only for the default specs
otherwise we end up in the source tree, which is counterproductive.

Task-number: QTBUG-26869
Change-Id: Id44a94f827dc285c75b9b243c8ef6478e668e3ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
cc2cd0db5d fold m_qmakespecFull back into m_qmakespec
the original value is not used any more after the final resolution.

Change-Id: Icadc219f045a1bbfd20506c4c72c53d1fb352969
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-19 19:54:44 +02:00
Oswald Buddenhagen
d92fd4ca54 fix non-bootstrapped $$system()'s line end conversions on windows
Change-Id: I026da1312bc28619dc7aa5974b7f4c00710517ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-18 17:39:50 +02:00
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