Properly check exit code of excludelist.sh in qmake

qmake is really making this overly complicated.

We should rather try to use this syntax, which is only available in
Qt 5.6 and higher, apparently:
https://doc.qt.io/qt-5/qmake-function-reference.html#system-replace
This commit is contained in:
TheAssassin
2018-04-12 02:55:14 +02:00
parent ba3495b855
commit 65ceffeffd
+9 -1
View File
@@ -39,9 +39,17 @@ contains(DEFINES, EXCLUDELIST.*) {
message("EXCLUDELIST specified, to use the most recent exclude list, please run qmake without EXCLUDELIST definition and with internet.")
} else {
message("Creating exclude list.")
# check whether command _would_ run successfully
EXCLUDELIST_GENERATION_WORKS = FALSE
system($$_PRO_FILE_PWD_/../excludelist.sh): EXCLUDELIST_GENERATION_WORKS = TRUE
isEqual(EXCLUDELIST_GENERATION_WORKS, FALSE) {
error("Generating excludelist failed")
}
EXCLUDELIST = $$system($$_PRO_FILE_PWD_/../excludelist.sh)
isEmpty(EXCLUDELIST) {
error("You must have internet to update EXCLUDELIST or define it in qmake.")
error("Generated excludelist is empty")
}
DEFINES += EXCLUDELIST=\""$$EXCLUDELIST"\"
}