QMake: Exit with an error if include() fails


When include() could not read its file, qmake printed an error
message but exited with 0, so that a broken project looked
successful to scripts and to make, which regenerates Makefiles by
running qmake.

Remember such a failure and exit with 3 after processing the
project, as for other project errors. The Makefile is still written.
There are two exceptions:
- The silent argument, include(file, , true), suppresses the message
  and the error.
- A failure whose result is used as a condition, as in
  !include(file) { ... }, is handled by the project. This is the
  usage that the documentation shows.

Fixes: QTBUG-44800
Change-Id: I9319c36d9975b26feb183f694e4a1a8e75ba87eb
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
commit0b047117b43e2928f096a2415b01bc562dae72bd
parentd6fafbcad765daa5cd83d03d0e7375d882f0ea7d
authorJoerg Bornemann <joerg.bornemann@qt.io>
committerJoerg Bornemann <joerg.bornemann@qt.io>
commit timeWed, 21 Oct 2026 21:24:34 +0000