Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.3.2
-
None
Description
Consider the following snippet from a .pro file, which qmake is run on to generate a Makefile:
HEADERS += foo.h
for(headerFile, HEADERS) {
baseName = $$basename(headerFile)
TARGET_HEADER_DIR = $$PWD
TARGET_NAME =$${TARGET_HEADER_DIR}/../$${baseName} # destination directory
eval($${baseName}.target = $${TARGET_NAME})
eval($${baseName}.commands = cp $${headerFile} $${TARGET_NAME})
eval($${baseName}.depends = $${headerFile})
HEADER_TARGETS += $${baseName}
HEADER_DEPENDS += $${TARGET_NAME}
}
includes.depends = $${HEADER_DEPENDS}
QMAKE_EXTRA_TARGETS += includes $${HEADER_TARGETS}
The expected result is a Makefile with the following target:
/home/sthomassen/tasks/190000/199626/../foo.h: foo.h cp foo.h /home/sthomassen/tasks/190000/199626/../foo.h
The actual result is the following target, in which eval($${baseName}.depends = $${headerFile}) did not expand $${headerFile} correctly:
/home/sthomassen/tasks/190000/199626/../foo.h: /home/sthomassen/tasks/190000/199626/../foo.h cp foo.h /home/sthomassen/tasks/190000/199626/../foo.h