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:
@@ -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.")
|
message("EXCLUDELIST specified, to use the most recent exclude list, please run qmake without EXCLUDELIST definition and with internet.")
|
||||||
} else {
|
} else {
|
||||||
message("Creating exclude list.")
|
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)
|
EXCLUDELIST = $$system($$_PRO_FILE_PWD_/../excludelist.sh)
|
||||||
isEmpty(EXCLUDELIST) {
|
isEmpty(EXCLUDELIST) {
|
||||||
error("You must have internet to update EXCLUDELIST or define it in qmake.")
|
error("Generated excludelist is empty")
|
||||||
}
|
}
|
||||||
DEFINES += EXCLUDELIST=\""$$EXCLUDELIST"\"
|
DEFINES += EXCLUDELIST=\""$$EXCLUDELIST"\"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user