Commit Graph

478 Commits

Author SHA1 Message Date
Andy Shaw
dd567c6882 Write two missing linker options to the vcxproj file
Both the /NXCOMPAT and /DYNAMICBASE options were handled by qmake but
never written to the vcxproj file even if they were set in the pro file.

Change-Id: I4ca26fb312648944c25d3a24cdc8c640c9de619d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-11 10:41:23 +02:00
Ray Donnelly
4d7f0ce8d0 Android: Backslash workarounds for Unix Makefile generator
If mingw32-make.exe encounters a backslash as the last character
on a line it interprets this as signifying line continuation.

When building Android Qt on Windows via cmd.exe, this happens
as backslashes are used on Windows as directory separators.

The workarounds are to make sure that a comment appears directly
after the definition of DESTDIR and that a space ends such
$(MOVE) command lines.

Change-Id: I7f93b655e004edaadac41d0d96bca23e1ba3a85c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-10 17:51:36 +02:00
Joerg Bornemann
f90607870a qmake/nmake: do not remove NDEBUG from DEFINES
In ebc4fb45 all NDEBUG defines were removed from DEFINES to adjust the
nmake generator's behavior to the vcproj generator.
Turns out that the vcproj generator did it wrong.
The user must be able to specify NDEBUG in DEFINES.

Change-Id: Iaaf3915ac79acbbd1e7a3172ad3951d0d686041b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-09 17:49:32 +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
Ray Donnelly
da05f3dafd Android: Split Unix Makefile generator's $(MOVE) commands up
Split $(MOVE) commands up into one per file so that cmd.exe's
builtin move command can be used.

Change-Id: Ife8d7449a2d7718a67082e2d78954964033ce07d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-08 17:23:15 +02:00
Joerg Bornemann
925fd32a2d qmake/Win: disable "find highest lib version" feature by default
The undocumented feature of linking the library with the highest
version number is more confusing than helpful.
We're changing the default from on to off now.
Users who still need this feature can turn it on with:
    CONFIG += link_highest_lib_version

Task-number: QTBUG-15596

Change-Id: Ic998c1685003caa6f57e27dccf83c8b4a2a09553
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01: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
Montel Laurent
0450d81190 Fix leak when fd != -1
Change-Id: I07bcf4b678460c86642436d1a69071f765ef63ca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-23 14:42:45 +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
Sergio Ahumada
e5a11fbb32 Merge "Merge branch 'dev' into stable" into refs/staging/stable 2013-03-20 23:30:31 +01:00
Montel Laurent
9ff6237a83 Initialize usePCH variable
Change-Id: I3618887416603a02812263b7b3fbf698fa1cefd3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-20 18:42:50 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
Laszlo Papp
d46345a49e Add an initial TI linker support for the unix qmake generator
Task-number: QTBUG-30215
Change-Id: Ica283e6b7f67563504ed81f4db1c2218fe5e8b8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-19 18:22:48 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Oswald Buddenhagen
ae94bf2b7a don't send output of $$join() and $$sprintf() through split_value_list()
in the case of sprintf it's surprising, in the case of join it's
anti-thetical.

Change-Id: I4eb7e56d31ac6ed68adf852f1a19b33554d38eb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 00:12:47 +01:00
Oswald Buddenhagen
be1116fe90 make depend_prl more thorough; introduce fast_depend_prl
depend_prl would so far only ensure that the dependency existed, not
that it would be up to date. this is of only limited value, so make sure
that the dependencies are always updated.

as this is somewhat expensive (every dependency's makefile will be
entered as many times as it is used, plus one), provide an opt-out by
adding fast_depend_prl.

Task-number: QTBUG-29486
Change-Id: Ifa2e100bc4c269a403ab620927bfe5c7efe9a435
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 00:12:47 +01:00
Oswald Buddenhagen
ec145129c3 fix setup of output directory for subprojects in IDE generator backends
unlike before, the output dir is now important already during the project
evaluation phase, as finding .qmake.conf depends on it if .qmake.cache is
also present.

ChangeLog: fixed qmake -tp vc (and configure without -no-vcproj)
Change-Id: Ifdb95f3b38a70c0d08e71238059292e761dcfa53
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-03-15 18:06:31 +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
Oswald Buddenhagen
bd7ca33889 qfilesystemengine_mac.cpp is empty => purge
Change-Id: I61c615343f45fe52adee36b6822322bda2b2ca4f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-14 19:49:38 +01:00
Stephen Kelly
2a388e503f Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-03-13 23:35:18 +01:00
Oswald Buddenhagen
a5c2ab4786 make split_value_list() a bit less sane again
let the backslash escape only quotes (and itself), after all - $$list()
(one of the main users of this function) is commonly used with (windows)
path lists, so letting it escape anything would make a royal mess.

Change-Id: I2dae2e4508903e62c190c1497da68d53978118e7
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-13 18:40:26 +01:00
David Schulz
92f59be2b4 qmake: fix library path on windows.
Convert '/' to '\' in library pathes.

Change-Id: I0cf8a522a901199fddd59c863c932f214e1ab968
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-13 17:24:49 +01:00
Oswald Buddenhagen
97be79012c clean paths of found files in prepareProject()
any of the directories may be the root, which would lead to double slashes
in the constructed filenames.

Change-Id: I053e167a19b795b40e780fc29db356c7f24d286a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 18:55:53 +01:00
Oswald Buddenhagen
dd06f991af actually use the temp variable we just assigned ...
Change-Id: I535a4bfc268a07d6b1813e47cdae862e5e459efc
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 18:54:59 +01:00
Oswald Buddenhagen
6c22b9b3e8 make split_value_list() sane
don't count parentheses, don't nest quotes, don't create empty elements,
let backslash uniformly escape. in short, behave like a sane parser.

Change-Id: I29252fbe14fd6d28217450ec41cf8acfb2e30681
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-12 18:13:37 +01:00
Oswald Buddenhagen
525eb33767 permit returning from files
this allows skipping an entire feature file if a condition is not
fulfilled, without putting the whole body inside a conditional.

Change-Id: I84fe9c94dda58c794fb52c3f163b40563b0db30a
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-12 18:13:37 +01:00
Oswald Buddenhagen
0dedf8c340 remove pointless initialization of qmakespec
we have proper fallback paths further down the line.

Change-Id: I3648cc985d21bbec4c2c24e179830db4467af210
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 18:13:37 +01:00
Oswald Buddenhagen
64d03e1c34 do not append a trailing slash to output directory
it's entirely counterproductive and confuses the subsequent code.

Change-Id: Iadcfd2af80acd2d7ed50807b3e001e26d83075a5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-12 14:08:27 +01:00
Frederik Gladhorn
72e5124b85 Merge remote-tracking branch 'origin/release' into stable
Conflicts:
	tests/auto/opengl/qgl/tst_qgl.cpp

Change-Id: I3c601351c984c1f4b00478d3c47ac9eeb021e892
2013-03-08 16:11:33 +01:00
Oswald Buddenhagen
3f5633bc25 remove some cryptic code relating to output directories
the purpose of it is truly elusive - the output directory is maintained
by the surrounding code anyway.

Change-Id: Id1a481d85a7b83ab0676ef650c900414d0ba83b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-07 00:42:56 +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
49a2ec05b4 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/qnx/qqnxscreen.cpp
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
2013-03-06 14:38:07 +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
Joerg Bornemann
ebc4fb452a define NDEBUG in MSVC/nmake release builds
Some headers, like assert.h, check for the presence of NDEBUG.
We already define NDEBUG for MSVC/vcproj release builds.

Task-number: QTBUG-3389

Change-Id: I3b1510d47ff80611aa8072e66492ff2d648393eb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-01 13:05:11 +01:00
Frederik Gladhorn
21255d65ef Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-03-01 11:07:19 +01:00
Joerg Bornemann
dbe74582a6 remove unused member Option::application_argv0
Use QMakeGlobals::qmake_abslocation instead.

Change-Id: I1d0f39549b477ede674730937d879c492407fb28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-01 11:07:19 +01:00
Tor Arne Vestbø
a6286039ba iOS: Write default code signing identify for iOS in Xcode generator
Change-Id: Ic04da6063863585665c9133caba0279ba478fbb4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Ian Dean <ian@mediator-software.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-27 13:07:23 +01:00
Andy Shaw
4a6a066df2 Fix generation of XCode projects for XCode 4.6
When a framework is referenced in the XCode project then it is known as
a framework by the lastKnownFileType and not the reference type. This
ensures it works in both XCode 3 and XCode 4.

Task-number: QTBUG-29371
Change-Id: I434246a46d6c5bfd50ba7de1a7c710c0caf0bc0a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 12:01:28 +01:00
Tor Arne Vestbø
de5553aad5 qmake: Resolve QMAKE_INFO_PLIST against current working dir
We're not in the output directory yet, so resolving using vanilla
fileFixify will end up failing when we check if the file exists, since
QFileInfo resolves relative paths against the current directory.

Change-Id: I414c6a2e83b49e3fb30e6153a49f7a90a8e528a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-26 13:13:24 +01:00
Tor Arne Vestbø
dd5b437d6a qmake: Fix file paths in Xcode projects when shadow-building
The Xcode generator seems to have been written with the assumption that
writeMakeParts() would be called with the output directory as the current
directory, but that's not the case when shadow-building. Perhaps this
was changed in qmake at some point, and the Xcode generator was not
updated to reflect that.

Instead of replacing every occurance of fileFixify and other logic to
deal with paths, we just chdir into the output_dir for the duration
of the function (except when writing the 'make qmake' makefile, as
the regular makefile generator works as expected with the current
directory set to the input directory).

Change-Id: I6ba492036d73f29f4adbd7cd554db9504050629e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:24 +01:00
Tor Arne Vestbø
f6d13a45c8 qmake: Prevent Obj-C sources from building both as extra compiler and in Xcode
We already assume that if a source is buildable and should end up in OBJECTS we
can let Xcode build it, so we skip this input for the extra compiler.

Change-Id: I17b2408925b8e6513f0fa0d2459ec539bf7381d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-26 13:13:23 +01:00
Tor Arne Vestbø
0e548b5856 qmake: Use PBXResourcesBuildPhase for QMAKE_BUNDLE_DATA without a path
The PBXResourcesBuildPhase will optimize resources, such as turning XIB
files into NIB files, running pngcrush on images, turning string files
into binary plists, etc, so we prefer that if possible.

Unfortunatly this phase does not support custom paths, so whenever we
encounter bundle data with a custom path we fall back to the regular
PBXCopyFilesBuildPhase.

Change-Id: I539db03dd7982fd37293123b6428cdb695f64d2b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:23 +01:00
Tor Arne Vestbø
3cc738dfc7 qmake: Don't treat .xcodeproj directories as OUT_PWD when passed with -o
The Xcode generator creates a makefile for running 'make qmake', and the
makefile passes -o to ensure it writes to the same Xcode project. This
fails when qmake then treats -o foo.xcodeproj/project.xcproj as not only
setting the output filename, but also the output directory to foo.xcodeproj,
which results in the Xcode project trying to reference files relative
to this directory, such as '../main.cpp'.

Unfortunatly the output filename parsing happens too early for us to know
whether or not the generator is Xcode, so we just have to assume that
a certain combination of output filename and directories means we are
generating an Xcode project.

Change-Id: I0901d4db995f287c35cbbbd015683d5abda6d0f5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:17 +01:00
Tor Arne Vestbø
883efa10cd qmake: Prevent duplicate libaries from being added to the link phase
Change-Id: I5ec7acb8f060e9d9bbd8cdb95d40ace03cffe9c7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:12:25 +01:00
Tor Arne Vestbø
c6eae1acf8 qmake: Don't generate Xcode project bundle identifiers with spaces
Replace them with dashes, like Xcode itself does.

Change-Id: I302425363a2eef13394025cd4a9e414048ce55ce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:11:19 +01:00
Tor Arne Vestbø
66f6e5b162 qmake: Update Xcode generator to produce project files similar to Xcode
There was quite a bit of cruft left over from older Xcode version. We
now produce Xcode 3.2 compatible files, similar to what Xcode would do
when asked to upgrade one of our generated files. In particular:

 - Removed refType
 - Set more lastKnownFileTypes
 - Renamed defaultConfigurationIsName to defaultConfigurationName
 - Add runOnlyForDeploymentPostprocessing = 0 to build phases
 - Don't put buildSettings directly into PBXNativeTarget
 - Don't write productSettingsXML
 - Don't write startupPath
 - Don't write name when path is the exact same
 - Write empty buildSetting lists as empty string
 - Don't write empty PBXBuildFile settings
 - Don't write generated/neede filenames for PBXShellScriptBuildPhase
 - Use PBXFileReference instad of PBXFrameworkReference
 - Prune deprecated buildSetting variables
 - Remove deprecated PBXBuildStyle sections
 - Resolve correct CC/CPLUSPLUS/LDPLUSPLUS
 - Write IPHONEOS_DEPLOYMENT_TARGET

Change-Id: Ia2365c2623fe898878bd10636c3b85145c1cff04
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:11:11 +01:00
Tor Arne Vestbø
e70e81d554 Xcode: Change groups/build phase wording to match Apple's templates
Change-Id: I286965a05750bc77b94ca4d3b76364b0130e32ed
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-22 23:56:37 +01:00
Tor Arne Vestbø
a36eaae893 Xcode: Merge various sources and extra-compilers into more managable groups
Instead of letting each qmake variable have its own auto-generated name
we try to group common variables into similar groups as used by the Xcode
templates provided by Apple.

We also prevent the same files from ending up multiple times in a group.

Change-Id: I73b13d6071bb7b3cd1501c422a99c60743221485
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-22 23:56:37 +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