make extra compiler targets depend on their respective compiler

Change-Id: I6c04e0188137f6bbfeab243f00860b8ff079f69a
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Oswald Buddenhagen 2016-04-05 18:19:47 +02:00
parent bdf2d7e0af
commit b3fcaea5f2
10 changed files with 24 additions and 8 deletions

View File

@ -57,12 +57,14 @@ for(group, groups) {
}
$${group}_header.commands = $$QMAKE_QDBUSXML2CPP $$hdr_flags $$qdbusxml2cpp_option ${QMAKE_FILE_OUT}: ${QMAKE_FILE_IN}
$${group}_header.depends = $$QMAKE_QDBUSXML2CPP_EXE
$${group}_header.output = ${QMAKE_FUNC_FILE_IN_qdbusOutputBasename}_$${dbus_type}.h
$${group}_header.name = DBUSXML2CPP $${dbus_TYPE} HEADER ${QMAKE_FILE_IN}
$${group}_header.variable_out = $${GROUP}_HEADERS
$${group}_header.input = $$input_list
$${group}_source.commands = $$QMAKE_QDBUSXML2CPP -i ${QMAKE_FILE_OUT_BASE}.h $$src_flags $$qdbusxml2cpp_option :${QMAKE_FILE_OUT} ${QMAKE_FILE_IN}
$${group}_source.depends = $$QMAKE_QDBUSXML2CPP_EXE
$${group}_source.output = ${QMAKE_FUNC_FILE_IN_qdbusOutputBasename}_$${dbus_type}.cpp
$${group}_source.name = DBUSXML2CPP $${dbus_TYPE} SOURCE ${QMAKE_FILE_IN}
$${group}_source.variable_out = SOURCES
@ -70,6 +72,7 @@ for(group, groups) {
$${group}_source.depends = $$eval($${group}_header.output) # this actually belongs to the object file
$${group}_moc.commands = $$moc_header.commands
$${group}_moc.depends = $$QMAKE_MOC_EXE
$${group}_moc.output = $$moc_header.output
$${group}_moc.input = $${GROUP}_HEADERS
$${group}_moc.variable_out = GENERATED_SOURCES

View File

@ -67,9 +67,9 @@ INCREDIBUILD_XGE += moc_source
INCLUDEPATH += $$absolute_path($$MOC_DIR, $$OUT_PWD)
#auto depend on moc
unix:!no_mocdepend {
moc_source.depends += $$first(QMAKE_MOC)
moc_header.depends += $$first(QMAKE_MOC)
!no_mocdepend {
moc_source.depends += $$QMAKE_MOC_EXE
moc_header.depends += $$QMAKE_MOC_EXE
}
#generate a mocclean

View File

@ -5,6 +5,7 @@ isEmpty(QGLTF_DIR): QGLTF_DIR = .
qgltf.input = QT3D_MODELS
qgltf.output = $$QGLTF_DIR/${QMAKE_FILE_BASE}.qrc
qgltf.variable_out += RESOURCES
qgltf.depends = $$QMAKE_QGLTF_EXE
qgltf.commands = $$QMAKE_QGLTF -d $$QGLTF_DIR $$QGLTF_PARAMS ${QMAKE_FILE_NAME}
silent: qgltf.commands = @echo qgltf ${QMAKE_FILE_IN} && $$qgltf.commands -s
qgltf.CONFIG += no_link

View File

@ -23,6 +23,7 @@ for (s, QLALRSOURCES) {
$${base}.input = $$invar
$${base}.output = $$QLALR_DIR/$${parser}.cpp
$${base}.variable_out = GENERATED_SOURCES
$${base}.depends = $$QMAKE_QLALR_EXE
$${base}.commands = $$QMAKE_QLALR $$QMAKE_QLALRFLAGS ${QMAKE_FILE_IN}
silent: $${base}.commands = @echo qlalr ${QMAKE_FILE_IN} && $${base}.commands
$${base}.name = QLALR ${QMAKE_FILE_IN}

View File

@ -73,16 +73,24 @@ defineTest(qtPrepareTool) {
isEmpty(cmd) {
cmd = $$[QT_HOST_BINS]/$$2
exists($${cmd}.pl) {
$${1}_EXE = $${cmd}.pl
cmd = perl -w $$system_path($${cmd}.pl)
} else: contains(QMAKE_HOST.os, Windows) {
$${1}_EXE = $${cmd}.exe
cmd = $$system_path($${cmd}.exe)
} else:contains(QMAKE_HOST.os, Darwin) {
BUNDLENAME = $${cmd}.app/Contents/MacOS/$$2
exists($$BUNDLENAME) {
cmd = $$BUNDLENAME
}
$${1}_EXE = $$cmd
} else {
$${1}_EXE = $$cmd
}
} else {
$${1}_EXE = $$last(cmd)
}
export($${1}_EXE)
QT_TOOL_ENV += $$eval(QT_TOOL.$${2}.envvars)
QT_TOOL_NAME = $$2
!isEmpty(3)|!isEmpty(4) {

View File

@ -103,6 +103,7 @@ rcc.clean += $$RCC_CPP $$RCC_TMP
}
rcc.depends = $$QMAKE_RCC_EXE
silent:rcc.commands = @echo rcc ${QMAKE_FILE_IN} && $$rcc.commands
else:rcc.commands ~= s/&&/$$escape_expand(\\n\\t)/g
QMAKE_EXTRA_COMPILERS += rcc

View File

@ -3,6 +3,7 @@ qtPrepareTool(QMAKE_UIC, uic, _DEP)
isEmpty(UI_DIR):UI_DIR = .
isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_
uic.depends = $$QMAKE_UIC_EXE
uic.commands = $$QMAKE_UIC ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
uic.depend_command = $$QMAKE_UIC_DEP -d ${QMAKE_FILE_IN}
uic.output = $$UI_DIR/$${QMAKE_MOD_UIC}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}

View File

@ -78,7 +78,7 @@ qtPrepareTool(QMAKE_QTWAYLANDSCANNER, qtwaylandscanner)
qtwayland_client_header.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_client_header.input = WAYLANDCLIENTSOURCES
qtwayland_client_header.variable_out = HEADERS
qtwayland_client_header.depends = $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
qtwayland_client_header.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-client-protocol$${first(QMAKE_EXT_H)}
qtwayland_client_header.output = $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_client_header.commands = $$QMAKE_QTWAYLANDSCANNER client-header ${QMAKE_FILE_IN} $$WAYLAND_CLIENT_INCLUDE_DIR > ${QMAKE_FILE_OUT}
silent:qtwayland_client_header.commands = @echo QtWayland client header ${QMAKE_FILE_IN} && $$qtwayland_client_header.commands
@ -87,7 +87,7 @@ QMAKE_EXTRA_COMPILERS += qtwayland_client_header
qtwayland_client_code.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_client_code.input = WAYLANDCLIENTSOURCES
qtwayland_client_code.variable_out = SOURCES
qtwayland_client_code.depends = $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_client_code.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_CLIENT_HEADER_DEST}qwayland-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_client_code.output = qwayland-${QMAKE_FILE_BASE}.cpp
qtwayland_client_code.commands = $$QMAKE_QTWAYLANDSCANNER client-code ${QMAKE_FILE_IN} $$WAYLAND_CLIENT_INCLUDE_DIR > ${QMAKE_FILE_OUT}
silent:qtwayland_client_code.commands = @echo QtWayland client code ${QMAKE_FILE_IN} && $$qtwayland_client_code.commands
@ -96,7 +96,7 @@ QMAKE_EXTRA_COMPILERS += qtwayland_client_code
qtwayland_server_header.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_server_header.input = WAYLANDSERVERSOURCES
qtwayland_server_header.variable_out = HEADERS
qtwayland_server_header.depends = $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
qtwayland_server_header.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}wayland-${QMAKE_FILE_BASE}-server-protocol$${first(QMAKE_EXT_H)}
qtwayland_server_header.output = $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_server_header.commands = $$QMAKE_QTWAYLANDSCANNER server-header ${QMAKE_FILE_IN} $$WAYLAND_SERVER_INCLUDE_DIR > ${QMAKE_FILE_OUT}
silent:qtwayland_server_header.commands = @echo QtWayland server header ${QMAKE_FILE_IN} && $$qtwayland_server_header.commands
@ -105,7 +105,7 @@ QMAKE_EXTRA_COMPILERS += qtwayland_server_header
qtwayland_server_code.name = qtwayland ${QMAKE_FILE_BASE}
qtwayland_server_code.input = WAYLANDSERVERSOURCES
qtwayland_server_code.variable_out = SOURCES
qtwayland_server_code.depends = $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_server_code.depends = $$QMAKE_QTWAYLANDSCANNER_EXE $${WAYLAND_SERVER_HEADER_DEST}qwayland-server-${QMAKE_FILE_BASE}$${first(QMAKE_EXT_H)}
qtwayland_server_code.output = qwayland-server-${QMAKE_FILE_BASE}.cpp
qtwayland_server_code.commands = $$QMAKE_QTWAYLANDSCANNER server-code ${QMAKE_FILE_IN} $$WAYLAND_SERVER_INCLUDE_DIR > ${QMAKE_FILE_OUT}
silent:qtwayland_server_code.commands = @echo QtWayland server code ${QMAKE_FILE_IN} && $$qtwayland_server_code.commands

View File

@ -1,5 +1,6 @@
qtPrepareTool(QMAKE_DUMPCPP, dumpcpp)
dumpcpp_decl.depends = $$QMAKE_DUMPCPP_EXE
dumpcpp_decl.commands = $$QMAKE_DUMPCPP ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}
qaxcontainer_compat: dumpcpp_decl.commands += -compat
dumpcpp_decl.output = ${QMAKE_FILE_BASE}.h

View File

@ -17,7 +17,7 @@ rcc_test.input = RCCINPUT
rcc_test.variable_out = SOURCES
rcc_test.name = RCC_TEST
rcc_test.CONFIG += no_link
rcc_test.depends = $$QMAKE_RCC
rcc_test.depends = $$QMAKE_RCC_EXE
QMAKE_EXTRA_COMPILERS += rcc_test