Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.4.0
-
None
Description
When creating an extra compiler definition and using the "explicit_dependencies" option, target dependencies are still generated in the Makefile. That is "explicit_dependencies" does not turn them off.
e.g.
rule.input =PBS_INTERFACES
rule.output =$${PBS_INTERFACES_PATH}/${QMAKE_FILE_IN_BASE}.h
rule.commands=cp -p --remove-destination ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
rule.CONFIG =no_link explicit_dependencies
QMAKE_EXTRA_COMPILERS +=PBSinterfaces
The problem seems to be in qmake/generators/makefile.cpp in method MakefileGenerator::writeExtraCompilerTargets. This only considers the "explicit_dependencies" option if "combine" is also specified.
When having the following in a .pro file
PBS_INTERFACES=bobby.h jimbo.h
The following should appear in the Makefile
../interfaces/bobby.h:bobby.h
cp -p --remove-destination bobby.h ../interfaces/bobby.h
../interfaces/jimbo.h:jimbo.h
cp -p --remove-destination jimbo.h ../interfaces/jimbo.h
Instead the above will appear but with extra dependents.
../interfaces/bobby.h:bobby.h\
james.h\
paul.h\
graham.h
cp -p --remove-destination bobby.h ../interfaces/bobby.h
../interfaces/jimbo.h:jimbo.h\
stan.h\
william.h\
graham.h
cp -p --remove-destination jimbo.h ../interfaces/jimbo.h