Commit Graph

588 Commits

Author SHA1 Message Date
Joerg Bornemann
a79b898299 qmake: add ProductVersion to automatically generated resource
ProductVersion is set to the same value as FileVersion.

Task-number: QTBUG-27428

Change-Id: Ia01e14112d3a0e74b9fbe5fc8d9c4f9ae690db34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-06 16:46:03 +01:00
Joerg Bornemann
b4b02fe876 MSVC: don't use the variable name LINK in generated makefiles
Rename LINK to LINKER. The MSVC linker uses the environment
variable LINK to pass additional command line arguments.
We must not hide this variable.

Task-number: QTBUG-28332

Change-Id: Id78476d1cf4a73175b9f47292c67f38a43ae5ba4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-06 14:46:13 +01:00
Oswald Buddenhagen
9a07707996 centralize MAKEFILE writeout better
nmake depends on a variable being assigned before it is referenced, so
just write it out to every Makefile as the very first thing.
this is nicer than the previous hack anyway.

Change-Id: I50f409919352f560f7ef6c848a2f7c51d1878148
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-05 17:29:46 +01:00
Oswald Buddenhagen
d2179014f9 introduce QMAKE_RPATHLINKDIR (and QMAKE_LFLAGS_RPATHLINK)
complementary to QMAKE_RPATHDIR. this avoids that we need to sprinkle
linux/gcc specific code all over the place.

Task-number: QTBUG-27427
Change-Id: Iebafd1749d1a0d803704902473df8c743f074ddc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-03 16:26:37 +01:00
Sergio Ahumada
0df026de86 Stop using the name "Trolltech" in QSettings
Also change Trolltech for QtProject in other places

Task-number: QTBUG-23269
Change-Id: Ie4e344f23cab77c575562d18b481b3369ce30491
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-12-03 03:47:08 +01:00
Miikka Heikkinen
d31dbe1efe Remove duplicate libraries added via prl files in Windows
The LIBS statement generated into Makefiles contained duplicate
libraries when application was linking static libraries.

Fixed by adapting the logic from unixmake.cpp's version of
processPrlFiles() to remove duplicates.

Change-Id: I12e152900233d0376b7d7ac6cd18a92850a6d640
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-30 08:22:35 +01:00
Oswald Buddenhagen
5e525d283d fix bootstrapped build
Change-Id: I8c987e8eed555c9c976732e216553d8002ee2b87
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/d9dc9d34ec092ddc536a907b4f5009fb8bf01da4)
2012-11-29 08:30:54 +01:00
Oswald Buddenhagen
c0764ab9a1 fix non-qmake build of the evaluator
Change-Id: Ibbd00b415318bda928b5e6f9831b214e2657e291
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
(cherry picked from qttools/769fa282ac8a4b98698dada6969452363e0eb415)
2012-11-28 16:21:57 +01:00
Thiago Macieira
5dcc36b15c Add a -libexecdir option to the configures
User applications are those that users run directly, whether it be for
development or not. The executable binaries that the user does not
usually run but is still required for proper functioning are called
"program executables" in Autoconf and they are placed in libexec.

This commit adds support for "program executables" in Qt by adding the
-libexecdir option to the configures, the qmake variable
QT_INSTALL_LIBEXECS (note the plural, to match all other properties),
and QLibraryInfo::LibraryExecutables.

At the time of this commit, the only expected "program executable" is
the QtWebProcess, the WebKit2 helper process from QtWebKit.

Change-Id: I66c3a3e0cf7f9d93b5f88f55f18e957faff608fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-28 08:39:07 +01:00
Oswald Buddenhagen
80b99a6dd7 assign MAKEFILE even in non-subdirs Makefiles
this is necessary for having a clean way to recurse even from leaf
makefiles.

the location where the variable is written in the makefile is somewhat
bizarre, but the code is so convoluted that finding a better place would
mean either a lot of duplication or a lot of prior refactoring.

Change-Id: I68e4cf7e3814f6c60b2e3421d69775c993dafb23
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-27 19:31:21 +01:00
Sergio Ahumada
cd765bbae0 qmake: Change copyright information from Nokia to Digia
Task-number: QTBUG-28156
Change-Id: If54615a465504b4124891fb393185eb324372874
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
2012-11-26 17:33:37 +01:00
Friedemann Kleint
2d795717fc Ensure QMAKE_PRL_LIBS is a unique list.
Windows static builds currently fail due to overlong command
link lines containing multiple occurrences of base libraries.

Task-number: QTBUG-28131
Change-Id: Ibf7f551fc98c879111b32b27a16f4e96260743c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-26 17:33:37 +01:00
Joerg Bornemann
7ff393944e qmake: do not exclusively lock files for reading on Windows/MSVC
When sifting through a file to find Q_OBJECT and friends, qmake
was locking it for reading and writing (_SH_DENYRW).
This breaks parallel builds where multiple qmake instances might want
to scan the same file.
Changed the sharing constant to _SH_DENYNO, which doesn't lock the
file at all. This is consistent with the _sopen_s call in findDeps.

Change-Id: I9c0a06db7f580f411e79d9d96dd36a6d705679aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-23 10:08:10 +01:00
Thiago Macieira
df3631045c Add a new location for QML 2.x imports
This commits adds a -qmldir configuration option for the configures to
allow the user to change the default location (it defaults to
$archdatadir/qml).

It adds a QLibraryInfo::Qml2ImportsPath value for
QLibraryInfo::location, a qmake property of QT_INSTALL_QML and a qt.conf
configure location entry "Qml2Imports".

At the same time, it makes the qmake .prf files dealing with QML plugins
be the QML 2 version. Those files are new in Qt 5, so we have the option
to choose which version we want to use.

Discussed-on: http://lists.qt-project.org/pipermail/development/2012-October/007136.html
Change-Id: I8c1c53e8685a5934ed0a9a42ba5663297b81a677
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-19 15:25:54 +01:00
Kai Koehne
36270e4505 MinGW: Don't add version number '0' to the library name
This fixes linking on MinGW after the library renaming, and is also
in line with the logic in the nmake generator.

Change-Id: Ie25ce6c1d2b8f292c4e454db1cad9bcbbee7a05d
Suggested-by: Erik van Pienbroek
Task-number: QTBUG-27137
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-19 13:35:27 +01:00
Oswald Buddenhagen
ced111c74f complain about empty $$TARGET
this should be fatal, but so should be a lot of other conditions.

Change-Id: I0c2c0bb9590ea1e4d0eae76e29eda34915914217
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-13 18:51:15 +01:00
Thiago Macieira
4712b0e99f Add -archdatadir and change some of the default install dirs in Qt 5.
Architecture-depedent Qt data defaults now to something under
-archdatadir. Architecture-dependent data is everything that contains
machine code (e.g., plugins) as well as anything that hardcodes
build-specific data, like qconfig.pri and qmodule.pri. That is:

  QML imports:    $archdatadir/imports     (includes plugins)
  Qt plugins:     $archdatadir/plugins     (machine code)
  Mkspecs:        $archdatadir/mkspecs     (build-specific)

Architecture-independent Qt data defaults now to something under
-datadir. This option existed in Qt 4, but did not differentiate between
arch-dependent and independent. Following Autoconf's lead, --datadir is
the *independent* data root.

  translations:   $datadir/translations    (.qm files are arch-independent)
  docs:           $datadir/doc

By default, both new options are equal to the Qt install prefix.

(Strictly speaking, for complete Autoconf compatibility, we'd need a
--datarootdir=$prefix/share, --datadir=$datarootdir/qt5 and
--docdir=$datarootdir/doc/qt5, but that's just nitpicking and
unnecessary)

Change-Id: I39c886a6a2d2d2c0b11923c50974179e21f2af76
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-11 07:41:50 +01:00
Thiago Macieira
565b6bd635 Make it possible to suppress the automatic version number in DLLs
qmake automatically appends the library's major version number to the
DLL file name on Windows, as DLL naming doesn't include the version
number on a suffix like on Unix systems.

This flag makes it so qmake skips adding. This will allow us to insert
Qt's major version number at a different position.

Change-Id: I25d471038841fb0c5a34ef6b3bd6266aa33cebd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-06 23:52:47 +01:00
Oswald Buddenhagen
90387bb446 do not add DEPENDPATH to VPATH
DEPENDPATH merely says where to look for impliciit dependencies, not
where to find explicit ones.

fwiw, the other way round may be considered correct, but DEPENDPATH
exists for the sole purpose of limiting which paths should cause
recompilations, so it would be counterproductive to extend with with
VPATH.

Task-number: QTBUG-11912
Change-Id: I86450b5fd5aeb1f1b015b53f0adcd167ff4ce04d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-02 18:07:35 +01:00
Oswald Buddenhagen
7d20f3dd10 rewrite default spec handling
instead of symlinking (on unix) or creating a forwarding spec (on
windows), just put the default specs into (the bootstrapped)
QLibraryInfo.

Change-Id: I595500ef7399f77cb8ec117c4303bc0a2ffe505f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-01 20:17:57 +01:00
Simon Hausmann
f45d6414ad Fix qmake's pro file cache to interact correctly with write_file
When writing a file with write_file() we have to inform the pro file parser
cache to discard the file if it's existant in the cache, to ensure that
calling include() after write_file() always works.

Change-Id: I7d09269a57de55ca30b0e11dd40770de9f919f64
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-25 16:22:00 +02:00
Debao Zhang
b340e40f91 qmake ExtraCompilerTargets: deal with file name which contains space
Task-number: QTBUG-27629
Change-Id: I6d6c3345cc1bb0a866524df3a1534ed50fc00f3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-19 13:02:17 +02:00
Stephen Kelly
102e1822ff Remove addition of dependencies for static libraries.
The content in the prl file is not compatible with what CMake
expects in the value of the IMPORTED_LINK_INTERFACE_LIBRARIES
property. That property expects a list of IMPORTED targets or
full paths to libraries.

The prl file gives us a whitespace separated string of content
suitable for passing to ld, that is, it contains -L and -l content.
As this would take a lot of error prone parsing in cmake code in
order to resolve the content to a list of full paths to libraries
(which can be processed by any cmake generator), it's better to
remove the code until qmake is able to generate a list of full
paths.

Change-Id: I72fe8e862b7f3bd25a7f9a03db94d2e9b815d08a
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-16 17:31:31 +02:00
Joerg Bornemann
ec5ce61b4a qmake: fix reversed defines in vcxproj files
Change-Id: I9fbb4b563428bb23974d59050f4c71e8d1983ff3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-13 05:51:19 +02:00
J-P Nurmi
3c05a0f3e7 qmake: fix .pc install target dir separators on windows
Task-number: QTBUG-26455
Change-Id: I578345b1676d0d2e812e0ab2e48468b4a8013ee9
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-10 08:45:22 +02:00
Stephen Kelly
95e548eeaa Generate ';' separated libraries in prl files for CMake.
The generated CMake files need to pass ';' separated libraries to
the IMPORTED_LINK_INTERFACE_LIBRARIES property, otherwise we get errors
such as this:

http://testresults.qt-project.org/ci/QtTools_master_Integration/build_00386/win32-msvc2010_Windows_7/log.txt.gz

(grep for QtCore5.lib.lib)

Rather than a naive and error prone replacement of whitespace, generate
the appropriate ';' separated content directly in the qmake prl file.

Change-Id: I8eb5e233a0318b57ec74b86d910583ff99c29415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Brad King <brad.king@kitware.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-09 06:09:32 +02:00
Pierre Rossi
f71170aa35 Tools: add QLibraryInfo to the bootstrapped library.
For future use by qdoc.

Change-Id: Id9079a6fa581ff16810df9a8f2bb94314ee11ca9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-10-08 17:14:24 +02:00
Andy Shaw
55b63a406f Make sure the path is quoted in case it has spaces in it
This fixes a problem when the preprocessing scripts were called from a
path with spaces in it.

Task-number: QTBUG-15317
Change-Id: I92ea85e12e2f9abfc262a8dcaa4f414e471e468c
Reviewed-by: João Abecasis <joao@abecasis.name>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-28 12:46:43 +02:00
Andreas Holzammer
7ba31ff5a4 Fail when Windows CE SDK not found
Add failing when crosscompile for Windows CE
and no matching SDK is found.

Change-Id: I359e792fe46bab46729788666679a16cb94f340e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-27 06:07:29 +02:00
Andy Shaw
f6bd02317d Fix XCode generator for qmake in Qt 5 after recent changes
Due to all the changes recently it broke in some places, this now
gets it working again.

Change-Id: I879ca5684435289a61d8db248f2c3f64f6866a60
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-27 06:07:26 +02:00
Andy Shaw
bad1384102 Bring subproject dependencies in line with Makefile generators
When generating the solution file it should extract the
dependencies from the pro file as this will bring it in
line with the Makefile generators.

Task-number: QTBUG-22561
Change-Id: I8d5b6607712f2c77c87ef093480e64b9633817d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-27 06:07:19 +02:00
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
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