Priority: P2: Important
Resolution: Cannot Reproduce
Affects Version/s: 3.x
Fix Version/s: None
Component/s: Build tools: qmake
mingw32-g++, Win XP
In particular cases Win32 qmake lowers drive letter of absolute file path. That results in lower-case letter in dependence part of the make rule and upper-case drive letter target part of the rule. This is generally ok for Windows, but certain make tools (msys make) treat such names as different targets.
For example, with following pro file:
QMAKE_EXTRA_TARGETS += foo
PRE_TARGETDEPS += $$PWD/foo
foo.target = $$PWD/foo
foo.files = $$PWD/foo.in
foo.depends = $$PWD/foo.in
foo.commands = copy $$PWD/foo.in $$PWD/foo
qmake generates two different names d:/work/x/foo and D:/work/x/foo in the Makefile. Therefore msys make fails.
$(DESTDIR_TARGET): d:/work/x/foo $(OBJECTS)
$(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) $(OBJECTS) $(LIBS)
copy D:/work/x/foo.in D:/work/x/foo
Here is the part of qmake/option.cpp source that does lowering:
Option::fixString(QString string, uchar flags)
if(string.length() > 2 && string.isLetter() && string == QLatin1Char(':'))
string = string.toLower();
If there is no particular reason for drive letter lowering, would it be better to remove those two lines?