summaryrefslogtreecommitdiffstats
path: root/qmake/generators/makefile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix QMAKE_EXTRA_COMPILERS' depend_command being ignoredGiuseppe D'Angelo2014-05-301-1/+1
| | | | | | | | | | A typo caused qmake to stop output dependency information added by the depend_command clause. Task-number: QTBUG-13334 Change-Id: I00fabc87438ce94e80341e6f88aa2e0eaab57e19 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* qmake: share the default variablesJ-P Nurmi2014-05-271-14/+20
| | | | | | | | | Eliminate duplicate code => collect the default variables to MakefileGenerator::writeDefaultVariables(). Task-number: QTBUG-21910 Change-Id: Ia03ce0240dd9a101ad9d35db636cd88f38a49320 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* remove unused macro definitionJoerg Bornemann2014-05-131-5/+0
| | | | | Change-Id: Ic2451dd7ae352b9e515c52c20a43495066fb72c8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* remove automagic command path fixing misfeatureJoerg Bornemann2014-05-121-52/+4
| | | | | | | | | | | | | | | | | | | Qmake tried to extract the actual executable part of an extra compiler's commands and depend_command value and then "fix" it by replacing the directory separators in it with their local versions and calling QDir::cleanPath on it. This misfeature was implemented incompletely and led to unexpected results (see the numerous attempts to fix QTBUG-16372). The user is responsible for passing a correct command by calling the shell_quote or shell_escape functions if necessary. Change-Id: Ic4bfe9eeb697775cd99c865e7a9d335e63605dea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* make use of QDir::NoDotAndDotDotJoerg Bornemann2014-04-291-6/+4
| | | | | Change-Id: Ib4bdc0d4051fed25dec7dc030658b4d0822a37bd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* fix default QMAKE_PKGCONFIG_LIBDIROswald Buddenhagen2014-04-151-1/+1
| | | | | | | | | it needs neither native separators, nor a trailing separator. the QMAKE_PKGCONFIG_INCDIR default was already ok. Change-Id: I1048b3870fd3ca09aa76b41aecda7d90402aa64a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* don't emit -L/-F/-I with system dirs to .pc filesOswald Buddenhagen2014-04-151-5/+11
| | | | | | Change-Id: Idecb6f8ba61872c23856a8c7e22305c01c67f0b9 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Davide Pesavento <davidepesa@gmail.com>
* qmake: change a linker option in .pc file from -llibhoge to -lhogeTasuku Suzuki2014-03-261-1/+1
| | | | | Change-Id: Ib4d01bf190eec753f1b5e37e8e5871514e43ac71 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* qmake: Add DISTCLEAN_DEPS variableAndrew Knight2014-01-301-0/+2
| | | | | | | | This variable works like CLEAN_DEPS, but applies to the distclean target. Change-Id: Ia30e8932b9acd6529298728dd5d0e038b0208d66 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add support for using -isystem in qmakeThiago Macieira2014-01-201-0/+2
| | | | | | | | | This commit will make qmake use -isystem automatically for any compilers that declare support for it for any paths that are listed in QMAKE_DEFAULT_INCDIRS. Change-Id: I36fefc6d5bba61671f65669f0ea42704b3c3cf31 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-1/+12
|\ | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qplatformtheme.h tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
| * Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-051-1/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-ios-clang/features/default_post.prf tests/auto/widgets/widgets/qmenu/tst_qmenu.cpp Change-Id: Iaba97eed2272bccf54289640b8197d40e22f7bf5
| | * properly replace windows paths in installed meta filesOswald Buddenhagen2013-12-041-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it's bogus in the first place that the meta files contain windows paths, but straightening that out is a prohibitive effort. so instead generate additional s/// commands which take care of these paths. fwiw, the generated s///i command is a gnu extension. but as we are doing this on windows only where we are using our built-in sed command anyway, this should be fine. Task-number: QTBUG-33794 Change-Id: I46fcc598db12816ee56b5371ab184f6277eb3a22 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | | qmake: remove bogus commentJ-P Nurmi2013-12-101-2/+0
| | | | | | | | | | | | | | | | | | | | | the respective code was removed in 375edf7 Change-Id: Ie31ef4bc8970b5396f50f1c4963f378df816242a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | qmake: fix const correctnessJ-P Nurmi2013-12-101-10/+10
|/ / | | | | | | | | | | | | | | | | Partial cherry-pick of https://qt.gitorious.org/qt/jpnurmi-qt/commit/8c4ef19 Task-number: QTBUG-21910 Change-Id: Ieb833a977fc00d2637f8419278698c82b6086e2f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* / complete implementation of force_debug_infoOswald Buddenhagen2013-12-031-2/+2
|/ | | | | | | | | that means further detaching the generation and installation of debug info from the thing calling itself A Debug Build. Task-number: QTBUG-32412 Change-Id: I4d79d1ae4806c8e4a2d6a7ccd030fb88385dd7d4 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* adequately shell-escape generated sed commandsOswald Buddenhagen2013-11-231-1/+11
| | | | | Change-Id: I39c8c4ab3da69bd21beace56f5cf3070301ac015 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Fix mkdir command in Windows shell for paths with forward-slashesEskil Abrahamsen Blomfeldt2013-11-211-1/+1
| | | | | | | | | | | | In particular this triggers in some cases of package building where we are using a Qt version which for some reason has forward slashes in its install prefix. Any mkdir command run with this Qt build will fail because only backslashes are recognized as path separators. Task-number: QTBUG-34886 Change-Id: I2f957c6d348852ec555a67a35ae39921523b7b3e Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Add QMAKE_PKGCONFIG_VERSION variable to allow version overridingKonstantin Ritt2013-10-281-1/+5
| | | | | Change-Id: Ibba50c74f308d81e0058e4dacec7ed84e738473e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* qmake: Expose qmake arguments as QMAKE_ARGSTor Arne Vestbø2013-10-241-1/+1
| | | | | | | | Allows project files or mkspecs to call qmake recursively using system() with the right arguments, which we use to fix the ios default_post.prf. Change-Id: I90d69e2b156bb0f0af1279188b11f81c84c24fb8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Skip extra PKGCONFIG variables with empty valueKonstantin Ritt2013-10-221-1/+2
| | | | | | | The fallback value is an empty string anyways. Change-Id: I77a2d3ad275321cb8b2e059fb6359f921cbc697c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* make sure that installed meta files are always postprocessedOswald Buddenhagen2013-10-111-2/+1
| | | | | | | | | | the problem is that there is no sed command on windows ... so build it into qmake and invoke that from the generated makefiles. cmake does the same, after all. ^^ Task-number: QTBUG-33794 Change-Id: Ib7077e18acbc5edd79f714c5779a5ed31ea6c093 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qmake: Don't create OBJECTS_DIR and friends for TEMPLATE = subdirsTor Arne Vestbø2013-09-211-1/+1
| | | | | | | | 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>
* Sanitize QMAKE_EXTRA_COMPILERS paths in makefilesTor Arne Vestbø2013-09-211-7/+7
| | | | | | | | | | | | 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>
* Strengthen check for combined QMAKE_EXTRA_COMPILER with variable outputTor Arne Vestbø2013-09-211-3/+4
| | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-071-0/+18
|\ | | | | | | Change-Id: I9ee4176f0a0078908d49896508826154c9f71530
| * de-duplicate code for writing dummy makefilesOswald Buddenhagen2013-08-271-0/+18
| | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-07-231-18/+38
|\| | | | | | | | | | | | | Conflicts: tests/auto/dbus/qdbusabstractinterface/tst_qdbusabstractinterface.cpp Change-Id: I18a9d83fc14f4a9afdb1e40523ec51e3fa1d7754
| * make unescapeFilePath() less inefficientOswald Buddenhagen2013-07-221-6/+2
| | | | | | | | | | | | | | replace() doesn't detach if there is nothing to do. Change-Id: I845b585c766f44a670ca3af1fc11ba03e7317622 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
| * resolve output of .depend_command relative to $$OUT_PWDOswald Buddenhagen2013-07-221-4/+28
| | | | | | | | | | | | | | | | | | | | ... 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>
| * un-clash iterator namesOswald Buddenhagen2013-07-151-8/+8
| | | | | | | | | | Change-Id: I96b995c7f6dec06f75a61e109c419c9204744d90 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | Merge branch 'stable' into devSergio Ahumada2013-07-111-26/+30
|\| | | | | | | | | | | | | | | | | | | 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
| * merge string literalsOswald Buddenhagen2013-07-041-25/+25
| | | | | | | | | | | | | | | | 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>
| * VPATH resolution: don't crash when $(FOO) expands to nothingOswald Buddenhagen2013-07-041-0/+4
| | | | | | | | | | | | Task-number: QTBUG-29988 Change-Id: Ice3dc28002fc70e70fecc5d61bd0b32260ac0d50 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* | qmake: do not write timestamps to generated MakefilesDmitry Shachnev2013-04-161-2/+1
|/ | | | | | | These timestamps were useless and broken on non-ascii locales. Change-Id: Iad08eb0f5dfd5e86f6451d6572365d0c080e6115 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add spaces around the components of a pkg-config Cflags: fieldThiago Macieira2013-04-091-3/+3
| | | | | Change-Id: I91c301adaaf62cf24be0203785282c375c9d01e1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Introduce QMAKE_CC_O_FLAGLaszlo Papp2013-03-251-0/+3
| | | | | | | This makes it possible to properly parametrize alternative compilers. Change-Id: Iaf0961c47875ee16d815356f36acf5652577cdca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Merge remote-tracking branch 'gerrit/release' into stableSamuel Rødal2013-03-211-21/+15
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * fix parallelized "jom install"Oswald Buddenhagen2013-03-151-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Make .prl file generation work for iOS again.Morten Johan Sørvig2013-03-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-051-5/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix generated pkg-config files when cross-compilingMatt Fischer2013-02-201-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | introduce QMAKE_LINK_O_FLAGOswald Buddenhagen2013-03-021-0/+3
|/ | | | | | | this makes it possible to properly parametrize alternative linkers. Change-Id: Ia9cf574544a0259975470366d278b6c5dc747906 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* add ability to override the generated pkg-config file nameOswald Buddenhagen2013-02-061-9/+12
| | | | | | | | | 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>
* consolidate generation of metafile install targetsMark Brand2013-01-251-0/+21
| | | | | | | | | 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>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* do not fixify + create QMAKE_{PKGCONFIG,LIBTOOL}_DESTDIROswald Buddenhagen2013-01-081-2/+2
| | | | | | | | | 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>
* centralize MAKEFILE writeout betterOswald Buddenhagen2012-12-051-9/+4
| | | | | | | | | 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>
* assign MAKEFILE even in non-subdirs MakefilesOswald Buddenhagen2012-11-271-0/+5
| | | | | | | | | | | | 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>
* complain about empty $$TARGETOswald Buddenhagen2012-11-131-0/+3
| | | | | | | this should be fatal, but so should be a lot of other conditions. Change-Id: I0c2c0bb9590ea1e4d0eae76e29eda34915914217 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>