Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "RCC: Error in [...]" output that appears when running qmake.
This change removes the "RCC Error:" output that appears when running "qmake -recursive main.pro". The qmake tool's resources feature (resources.prf) invokes "rcc -list <input>.qrc" to determine which files to add as dependencies for the rcc target (for the given <input>.qrc) in the generated Makefile. When invoking "rcc -list [...]" on some of our .qrc files, we get errors, such as: RCC: Error in 'mumble.qrc': Cannot find file 'mumble_cs.qm' RCC: Error in 'mumble.qrc': Cannot find file 'mumble_da.qm' RCC: Error in 'mumble.qrc': Cannot find file 'mumble_de.qm' [...] This is because our .qrc files include references to files that are generated when we invoke the Makefile. Unfortunately, the invocation of "rcc -list [...]" happens during the qmake invocation, and not when running "make". So the files simply do not exist yet. This change replaces the qmake "rcc" extra compiler's "depend_command" to be a script we wrote ourselves, namely rcc-depends.py, that lives in the scripts directory. This script does practically the same thing as invoking "rcc -list", but it does not care if the files exist yet or not. It expects that they do. The result is that all files listed in a .qrc file are now properly added as dependencies for the Makefile rule that invokes rcc to process the .qrc file. This did not happen before. So, a positive side-effect of this change is that our Makefile is now able to order things correctly itself, even for auto-generated files in .qrc files. Before, we had to give it hints. These hints are still in place, such as: lrel.variable_out = rcc.depends and copytrans.variable_out = rcc.depends both from mumble.pro. These hints are used to order the lrel and copytrans targets before rcc is invoked in the generated Makefile. However, now that all files are output as dependency information in the Makefile, this should not strictly be necessary. This change has been tested with both Qt 4 and Qt 5, on Windows and Linux.
- Loading branch information