Commit Graph

105 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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