summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix compound defined() preprocessor expressionHEADmasterJoerg Bornemann2024-02-022-234/+243
| | | | | | | | | | | | | | | | Expressions like !if defined(foo) && defined(bar) checked for the existence of the macro "foo) && defined(bar" due to an overly greedy regular expression in the lexer of the preprocessor. NMake macro names cannot contain parentheses, so we can change the regex to not eat the closing parenthesis. The lexer was regenerated with flex 2.6.4. Fixes: QTCREATORBUG-24134 Change-Id: I0e5f4f5b5603cf1d2a53ad6ff9224e18e5649a7d Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Speed up cycle checkingRobin Watts2023-08-104-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When run on a codebase with a large dependency tree the cycle checking can take an enormous amount of time. In my tests, attempting to make JOM work with ghostscript's makefiles, it can basically take forever (I gave up after 10 minutes). There is a simple fix for this, implemented here. Once we have cycle checked downwards from a given node, we know that whenever we reach that node again, we need not bother to recheck it as the results will be no different. Hence whenever we successfully return from the recursive call, set a flag meaning "NoCyclesRootedAtThisNode". Whenever we step into a node, if that flag is set, there is no need to recurse at all. This is sufficient to make the cycle checking instant for the Ghostscript makefiles. This does mean that we are left with a 'dirty' tree, in that the NoCyclesRootedAtThisNode flags are left set. I don't think this is an issue, (does Parser:apply ever get called more than once? And if it does, might the tree have changed between calls?) but just in case, I have introduced another pass where we run through the tree clearing the nodes. Task-number: QTCREATORBUG-29412 Change-Id: I957cfb15df04b62e1a01476e3fd76b1e5b544a26 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Speed up preselectInferenceRulesRobin Watts2023-08-101-4/+10
| | | | | | | | | | | | | | | There is no point in repeatedly traversing downwards from a node once we've constructed the rules for it. If a node has rules, just exit. This vastly reduces the time spent on complicated Makefiles like Ghostscript. Task-number: QTCREATORBUG-29412 Change-Id: I1607745e46609800fc8ffff1ccafce1979af42eb Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix wildcards in absolute path dependenciesJoerg Bornemann2022-07-071-1/+4
| | | | | | | | | The expandWildcards function assumed that every passed path is relative and unconditionally prepended dirPath. Fixes: QTCREATORBUG-27645 Change-Id: I9759e3885cc3d4890a06093b6f80974fdcefc086 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix directory separators of the MAKEDIR variableJoerg Bornemann2020-02-121-1/+2
| | | | | | | | This variable should use native separators. Fixes: QTCREATORBUG-23559 Change-Id: If17a38b381e95a86fb86a6bda1fde8612bec83ef Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Add a VERSION_INFO resourceJoerg Bornemann2019-12-135-6/+73
| | | | | | | | | | | | | The jom executable was missing version, copyright and product information. Add a Windows resource that contains this information. The version number is now centrally placed in the text file src/app/version.txt and is read by the QMake and CMake project files to generate a Windows rc file. Fixes: QTCREATORBUG-23290 Change-Id: I7479dc6c489162b7fc932088c242b3fd69f43396 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Support paths longer than MAX_PATHJoerg Bornemann2019-09-181-1/+7
| | | | | | | | | Prepend \\?\ to paths passed to FastFileInfo to enable paths that have more than MAX_PATH characters. Fixes: QTCREATORBUG-22848 Change-Id: I6c7caae226cc1a05e99a97564cf4d4187a074b45 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Use static_assert instead of pre-C++11 CompileTimeAssertJoerg Bornemann2019-09-182-8/+4
| | | | | | | This yields much nicer error messages and is easier to read. Change-Id: If30baf6a24b52de414d338e7a8368982c3840d8d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix CMakeLists.txt for linking against a static QtJoerg Bornemann2019-04-291-0/+21
| | | | | Change-Id: Ibc906e993046f57447caab8f006f8eb7e669a25d Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove Windows XP compatibility codeJoerg Bornemann2019-04-241-9/+2
| | | | | | | The binary packages don't support XP since ages. Change-Id: I07df1263cac9672795f925374dba2d974a055419 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace the deprecated qStableSort with std::stable_sortJoerg Bornemann2019-04-241-1/+2
| | | | | Change-Id: Ic77437a6905de59077f8733d47e8a046803e7865 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix handling of macro definitions on command lineJoerg Bornemann2019-03-254-34/+97
| | | | | | | | | | | | Setting a variable FooBar=2 on the command line explicitly defines the macro FooBar, but also implicitly defines the macro FOOBAR. Explicitly set macros are not overridden. The first definition wins. Implicitly set macros are overridden. The last definition wins. Fixes: QTCREATORBUG-22176 Change-Id: I5324ba20295a1fade5e98302d698a826400fa80c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Do not yield an error if there are no targets in the MakefileJoerg Bornemann2019-03-251-3/+4
| | | | | | | NMake allows Makefiles without targets and exits with code 0. Change-Id: If6ab21f7bd4ee640b7d1b7499fe9a3e34abef4b0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix handling of the short command line option /jJoerg Bornemann2019-03-061-1/+1
| | | | | | | | Everything after the number was ignored. For example, the command line option /lj1us would be treated as /lj1. Change-Id: Id55578a47ed715ad124d9941bf0e3413d1ff23af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* ++nVersionPatchJoerg Bornemann2019-03-061-1/+1
| | | | | Change-Id: Ifa8f599f00cd6535eaf4fd4e21f5977b68519ae5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix handling of a double backslash at the end of lineJoerg Bornemann2018-12-061-0/+4
| | | | | | | | The double backslash at EOL shall not be altered. Task-number: QTCREATORBUG-20550 Change-Id: Ib4cc73da7a6634233d222945f01dd7974d112971 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix line continuations for preprocessor directivesJoerg Bornemann2018-12-064-129/+178
| | | | | | | | | | | | | | | | | | | | | | | Line continuations in preprocessor directives are now handled correctly such that assignments like the following are possible: VAR=foo\ !IF 1 bar\ !EL\ SE baz\ !ENDIF zap which evaluates to VAR=foo bar zap Task-number: QTCREATORBUG-8621 Task-number: QTCREATORBUG-18001 Change-Id: I3f86c6e3b13cbc04451fcfb267c5c43946b8e85c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Split CMakeLists.txtJoerg Bornemann2018-11-202-0/+70
| | | | | | | | Do not use one monolithic file for the whole of jom. Also, modernize the project files. Change-Id: Iea764aa40bfa6f0064d864521a0726ca107df486 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Provide an internal qt.confJoerg Bornemann2017-07-133-0/+6
| | | | | | | This prevents Qt from loading qt.conf from Qt's prefix path. Change-Id: Id8357e4e892bddba581eec8e6ea301ecc2ff6702 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the /KEEPTEMPFILES optionJoerg Bornemann2017-02-144-7/+1
| | | | | | | | | | | | This option only worked for top-level makefiles and is therefore not very useful for real-world builds. It would be quite some effort to make it work for recursive builds. Drop support for this option. A proper replacement is the /U option to display the content of inline files. Change-Id: Ibf24bd1e89ad10adb82d660ece25b1baae322b55 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Remove superfluous const qualifierJoerg Bornemann2017-02-141-1/+1
| | | | | | Change-Id: I1db422e0d4915573d9d841adb7af8556c4a1dda6 Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Fix initialization order warningsJoerg Bornemann2017-02-141-6/+6
| | | | | | Change-Id: Iee2d7fcde2ef0f6ec773c470b41aa666040cfaee Reviewed-by: Konstantin Podsvirov <konstantin@podsvirov.pro> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix MinGW based buildKonstantin Podsvirov2017-02-137-11/+19
| | | | | | | | | | | Changes: - fix src/jomlib/jobserver.cpp for 64bit build; - rename files src/jomlib/processXXX -> src/jomlib/jomprocessXXX; - fix CMake and QMake projects to build with MinGW. Task-number: QTCREATORBUG-17709 Change-Id: Ib88659f991cec3b50d29e0035aba6fe383c5e21a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* ++nVersionPatchJoerg Bornemann2017-02-131-1/+1
| | | | | Change-Id: I94183a0024beba2a3b1f4b6d1fc1a22d3a06e10a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix sub-jom detection for chocolatey shimsJoerg Bornemann2016-11-141-42/+3
| | | | | | | | | | | | Do not walk the process tree up to find if some parent is called "jom.exe" to find out whether we're a sub-jom, because this fails if a non-jom which is called "jom.exe" calls the real "jom.exe". This is the case for chocolatey shims. Instead, simply check for the existence of the _JOMSRVKEY_ variable which is set by the top-level jom. Task-number: QTCREATORBUG-15494 Change-Id: I90db7cf4b34cb6c3a03764cb5137f1f6e4af223d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix "build unrelated targets on error" modeJoerg Bornemann2016-11-143-10/+46
| | | | | | | | | | With the /k option given, jom tried to build all targets, even targets that depended on failed targets. Thus it behaved the same as /i (ignore exit codes), which is wrong. Task-number: QTCREATORBUG-17131 Change-Id: I1dcbabbf423042de44222a600f7a1b8be1203f45 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Gracefully release job client in error caseJoerg Bornemann2016-11-112-0/+12
| | | | | | | | | | | | When aborting the make process, because a target failed or such, it could happen that the job client was still acquiring a token from the job server. The user saw the disturbing message "JobClient destroyed while still acquiring". Wait in this case until the acquisition is done and release the job client afterwards. Task-number: QTCREATORBUG-17182 Change-Id: I4a0c256d365a23887560d511b0f157a9f36a0df2 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove usages of qFindJoerg Bornemann2016-11-112-8/+2
| | | | | | | | Both occurrences were used to remove one element from a container. Replace with removeOne to simplify the code. Change-Id: I8010acd3b461a04a7d5c72ed2ba9b1aee45c883d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix error message for failed targetsJoerg Bornemann2016-11-111-2/+3
| | | | | | | | | When specifying a Makefile with an absolute path with /F error messages would contain a bogus path to the Makefile (current dir + makefile path). Fix this by using QDir::absoluteFilePath. Change-Id: Ib843ec2334069bce0350bfd23766b7a7a027a2be Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ++nVersionPatchJoerg Bornemann2016-11-111-1/+1
| | | | | Change-Id: I5e9fed4e0a35ccc2b1b0a56ae27c309711b38ae5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Update CMake to use Qt5Dāvis Mosāns2016-11-111-0/+1
| | | | | Change-Id: I123657499b097473eef84cd493d16b7e8814d16c Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove superfluous set of leavesJoerg Bornemann2016-07-052-16/+10
| | | | | Change-Id: Ic50996b4299ddae49a853466a679689943bc10ca Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Avoid traversing the same nodes multiple timesJoerg Bornemann2016-07-052-4/+10
| | | | | | | This is a small performance improvement. Change-Id: I3283f1ec40227b11952557fd2d0cfd32de6824cc Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix printf format string warningJoerg Bornemann2016-07-051-1/+1
| | | | | | | | | | Fix warning C4477: 'fprintf': format string '%u' requires an argument of type 'unsigned int', but variadic argument 1 has type 'qint64' QCoreApplication::applicationPid() returns qint64. Change-Id: I46c21ae16e3b53b2e9e58ba1cc2646245f9bc78f Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Avoid double hash lookupJoerg Bornemann2016-07-051-4/+3
| | | | | Change-Id: I1d9816d0092c0f6875120fe34e23a453e8b96aa9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Implement the "build all targets" optionJoerg Bornemann2016-07-053-15/+17
| | | | | | Task-number: QTCREATORBUG-16500 Change-Id: If0dbadf34318698900e7fb59d71ef3ed6e65aedb Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix wildcard handling for subdirsJoerg Bornemann2016-06-271-4/+11
| | | | | | Task-number: QTCREATORBUG-16499 Change-Id: I262a9f6a6b0e900f8d53dda417ae26b964bd7609 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Introduce JOMFLAGS environment variableJoerg Bornemann2016-02-191-1/+3
| | | | | | | | Add a MAKEFLAGS pendant, solely for jom. JOMFLAGS is useful to set up separate flags for nmake and jom. Change-Id: I0e71c01dfdcf0f59460da8eba922c1adf93c3c33 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* update license headersJoerg Bornemann2016-02-1149-840/+1126
| | | | | Change-Id: I27221473bc0f0fa93bbd738d96de44e47489b677 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Fix glitches in !include directiveJoerg Bornemann2016-01-182-31/+43
| | | | | | | | | Includes like <"foo.mk"> were not possible. Includes like "foo.mk" did not recursively search through parent makefiles directories. Change-Id: I20daccae52c5af83a98ec2b95522a4ac03a99ddd Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Remove MinGW work-aroundJoerg Bornemann2016-01-061-5/+2
| | | | | | | We do not need __in in ConsoleCtrlHandlerRoutine's signature. Change-Id: Iab9d0ec09d8bbff7ca82c73d91ca9aa7a39a8e03 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Fix warnings when building for x86_64Joerg Bornemann2016-01-063-9/+10
| | | | | | | This fixes size_t <-> int conversion warnings. Change-Id: I659be1497c1ef12b7b228edf86b266963bbf5612 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Remove Qt4 vestiges from project filesJoerg Bornemann2016-01-062-3/+1
| | | | | Change-Id: I69ab23fc88273a6e32592403c2e71d911e45e728 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Do not warn when building with non-static QtJoerg Bornemann2016-01-061-6/+0
| | | | | | | There's no reason. Also, the additional LIBS entry isn't needed anymore. Change-Id: I78a13fcedd8234d1d972ade85e33e2cd2be886eb Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* implement special .NOTPARALLEL targetJoerg Bornemann2015-12-094-1/+15
| | | | | | | | | All targets in a Makefile that has a .NOTPARALLEL target will be executed sequentially. Recursively invoked make commands will still build in parallel. Change-Id: Ib4b3502e18d2c142925e0045c0b98839036ff6d6 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* ++nVersionPatchJoerg Bornemann2015-11-121-1/+1
| | | | | Change-Id: I151bff22544821c359be4fd898e99cdabdb5770f Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Merge remote-tracking branch 'origin/1.0'Joerg Bornemann2015-07-205-9/+36
|\ | | | | | | | | | | | | Conflicts: src/app/main.cpp Change-Id: Ia5a756ccc9578aeedd0b7cf9b6dd227d1a085bd2
| * fix occasional hang on exitJoerg Bornemann2015-06-195-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | We occasionally encountered a hang on exit in ~IoCompletionPort on QThread::wait(). We must not use Q_GLOBAL_STATIC for IoCompletionPort, because it's a QThread. We will enter undefined terrain after QCoreApplication is gone. We now properly destroy IoCompletionPort in ~Application. Task-number: QTCREATORBUG-14600 Change-Id: I067d50ec6759f5438cf47b2ba01f17a402ab8910 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * ++nVersionPatchJoerg Bornemann2015-06-181-1/+1
| | | | | | | | | | Change-Id: I40219a32fe704ba05d287677b6d9c6312de7c53e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Update flex generated filesOrgad Shaneh2015-07-203-93/+84
| | | | | | | | | | Change-Id: I1faa7a5b1ac16de7b7176e52de228494887b4994 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>