Commit Graph

113 Commits

Author SHA1 Message Date
Tor Arne Vestbø
8aefa4dc46 qmake: Don't create OBJECTS_DIR and friends for TEMPLATE = subdirs
A bunch of empty and never-to-be-used directories makes the build tree
noisy and harder to navigate.

Change-Id: Iebef91c82d58a8d6a0047fb5439d50eb6806f557
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-21 01:25:19 +02:00
Tor Arne Vestbø
e582d742cc Sanitize QMAKE_EXTRA_COMPILERS paths in makefiles
There was a mismatch of how we sanitized paths for dependencies of the
target and how those dependencies were sanitized (or not sanitized),
resulting in the target depending on 'some/path/foo.o' while the
extra compiler target was named 'some/path//foo.o', with an extra
slash. This confused 'make' enough to decide that it didn't know
how to build the dependencies for the target.

Change-Id: I181b86c291286cbbbb1f7b4c3b929a5f1dc163a3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-21 01:25:19 +02:00
Tor Arne Vestbø
15e9c3301c Strengthen check for combined QMAKE_EXTRA_COMPILER with variable output
The pattern ${QMAKE_ needs to be at the beginning of the line, or not
start with a $ (which would make it a regular qmake variable).

Also, it's fine that the variable is of the QMAKE_VAR_foo type, as
these variables are resolved at generator time, but are constant
and do not depend on the inputs. This means we have to replace
extra variables in the output.

Change-Id: I21ad24ae770f2137e2d5d92a20ee54e2f3f4ca06
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-21 01:25:19 +02:00
Sergio Ahumada
2346ae1675 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
2013-09-07 16:18:32 +02:00
Oswald Buddenhagen
b7f7edfae4 de-duplicate code for writing dummy makefiles
as a side effect, this fixes the generators that were more bitrotted
(nmake and even more mingw).

Task-number: QTBUG-30644 #close
Change-Id: Iefa3f07125884412d091aa12b44935e5b1fb858a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-27 19:12:06 +02:00
Frederik Gladhorn
084c5b3db7 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp

Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
2013-07-23 11:18:11 +02:00
Oswald Buddenhagen
944e1d7b6a make unescapeFilePath() less inefficient
replace() doesn't detach if there is nothing to do.

Change-Id: I845b585c766f44a670ca3af1fc11ba03e7317622
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
f57e2f5667 resolve output of .depend_command relative to $$OUT_PWD
... as that is the CWD of the command (since b139e7e96e5c).
leave the resolution relative to $$PWD as a fallback with a warning.

Investigated-by: Harald Hvaal <hhvaal@cisco.com>
Task-number: QTBUG-19352
Change-Id: I75de9444a647cd9e6f509e3d8eb3382dc985e5ca
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
94e42cb772 un-clash iterator names
Change-Id: I96b995c7f6dec06f75a61e109c419c9204744d90
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-15 19:45:49 +02:00
Sergio Ahumada
3ef6cf060e Merge branch 'stable' into dev
Conflicts:
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/json/qjsonwriter.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm

Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
2013-07-11 16:42:01 +02:00
Oswald Buddenhagen
51980595e1 merge string literals
makes for less visual noise and a tiny bit more efficient code.

Change-Id: I587707fa4e2dc9bead9435bf5caf3a98ab680725
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-04 18:13:18 +02:00
Oswald Buddenhagen
d149ceef4a VPATH resolution: don't crash when $(FOO) expands to nothing
Task-number: QTBUG-29988
Change-Id: Ice3dc28002fc70e70fecc5d61bd0b32260ac0d50
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-04 18:13:05 +02:00
Dmitry Shachnev
92d8e7c315 qmake: do not write timestamps to generated Makefiles
These timestamps were useless and broken on non-ascii locales.

Change-Id: Iad08eb0f5dfd5e86f6451d6572365d0c080e6115
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-16 17:43:44 +02:00
Thiago Macieira
89c4b7b45c Add spaces around the components of a pkg-config Cflags: field
Change-Id: I91c301adaaf62cf24be0203785282c375c9d01e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-09 07:13:54 +02:00
Laszlo Papp
fff8b698ab Introduce QMAKE_CC_O_FLAG
This makes it possible to properly parametrize alternative compilers.

Change-Id: Iaf0961c47875ee16d815356f36acf5652577cdca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-25 23:11:22 +01:00
Samuel Rødal
2ab9b747fc Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
	configure
	mkspecs/features/qt_module_headers.prf
	mkspecs/features/qt_tool.prf
	src/angle/angle.pro
	src/tools/bootstrap/bootstrap.pro
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
2013-03-21 08:49:01 +01:00
Oswald Buddenhagen
457afb3749 fix parallelized "jom install"
unlike unix' mkdir -p, windows' md complains if the directory already
exists. the workaround is a quite complex command, so the so far used
concept for assembling the command line from pieces was replaced with a
single template. for symmetry, adapt the makefile existence check to the
new concept as well.

QMAKE_CHK_EXISTS and QMAKE_MKDIR_CMD were added, with hard-coded
fallbacks (ugly).
QMAKE_CHK_FILE_EXISTS and QMAKE_CHK_EXISTS_GLUE (introduced in 5.0.0)
are simply deleted again.
QMAKE_CHK_DIR_EXISTS and QMAKE_MKDIR remain for legacy reasons, as qmake
emits them into the Makefiles, and custom commands may rely on their
presence.

Task-number: QTBUG-28132
Change-Id: I3d049cb5d26947e5c3d102d0c2da33afb2a95140
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-03-15 18:01:57 +01:00
Morten Johan Sørvig
c6a689f64f Make .prl file generation work for iOS again.
d28073d9 creates a distinction between "mac" and
"macx". The latter is not set on iOS, which caused
MakefileGenerator::target_mode to be set to TARG_UNIX_MODE.

Check for the "mac" active config instead of "macx".
Rename TARG_MACX_MODE -> TARG_MAC_MODE.

Change-Id: I7192788c33f5723034ba76da2492379dd454f0ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-03-06 19:03:21 +01:00
Frederik Gladhorn
5e8ae03578 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/kernel/qtimerinfo_unix.cpp
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
2013-03-05 13:42:11 +01:00
Oswald Buddenhagen
1c061b4bcc introduce QMAKE_LINK_O_FLAG
this makes it possible to properly parametrize alternative linkers.

Change-Id: Ia9cf574544a0259975470366d278b6c5dc747906
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-02 10:45:54 +01:00
Matt Fischer
fcef9b4252 Fix generated pkg-config files when cross-compiling
The Libs: line of the pkg-config files is constructed
by taking the name of the .pc file itself, and stripping
off the path and extension.  However, the code which does
this does not handle path separators correctly when the
target OS and local OS are different.  To get around this,
the custom string manipulation was replaced with a call
to QFileInfo::completeBaseName(), which can handle the
different path separators correctly.

Task-number: QTBUG-29700
Change-Id: Ia817b415d303b249f56fcc3d1f073cae99c43046
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 12:59:55 +01:00
Oswald Buddenhagen
5a0ec1b0f3 add ability to override the generated pkg-config file name
introduce the QMAKE_PKGCONFIG_FILE variable for that purpose.

this is another feature that is needed for a bugfix ...

Change-Id: I08f470e1b2b7dd318af9195330c15d813fcd55ef
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
Mark Brand
d089ecb711 consolidate generation of metafile install targets
Metafiles such as .prl and .pc files contain paths that have to be
adjusted during installation. The same code is used for unix and
windows so move it into the base class.

Change-Id: I82db89ec83820a4fa0214ba15e7cd63438f6dc91
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-25 23:30:50 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Oswald Buddenhagen
2e35d63fae do not fixify + create QMAKE_{PKGCONFIG,LIBTOOL}_DESTDIR
these variables are somewhat magic: they are relative to DESTDIR, and
they also specify the installation location relative to target.path.
the actual output directories are created by other code.

Change-Id: Iead3006057516f5a49b6fd4bd8996a062c984fce
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-08 11:09:52 +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
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
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
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
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
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
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
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
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
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
Oswald Buddenhagen
df175f190d introduce qmake variable abstractions
this is preparation for adapting to a new evaluator.

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

Change-Id: I50a60b0e30341f0b523e4a5731c770c9c1013f8b
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-09-05 03:03:12 +02:00
Oswald Buddenhagen
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
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
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
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
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