Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.0
-
None
-
Debian Linux (intel x86, 32bit)
-
96a3bf7a8bbc1e5361e16cbeeceb4be674b88c30
Description
Suppose you have a project with subdirectories. The main project file contains:
TEMPLATE = subdirs
CONFIG += ordered
CONFIG += debug_and_release
MAKEFILE = "Makefile.custom"
When you then create the makefiles with qmake, the custom makefile name is not used in the build rules for the ordered sub-targets.
The result is that when you then start a build with "make -f Makefile.custom debug", the build process changes into the first subdirectory, where it then attempts to execute "make debug" and not "make -f Makefile.custom debug".
This also happens when the makefile name is provided on the qmake command line with the "-o" option.
The bug seems to be in generator/makefile.cpp#2611:
//don't need the makefile arg if it isn't changed QString makefilein; if(subtarget->makefile != "$(MAKEFILE)") makefilein = " -f " + subtarget->makefile;
If this is changed to just:
// always need the makefile arg QString makefilein = " -f " + subtarget->makefile;
then it works as intended.