Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
3.x
-
None
-
mingw32-g++, Win XP
Description
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)
D:/work/x/foo: D:/work/x/foo.in
copy D:/work/x/foo.in D:/work/x/foo
Here is the part of qmake/option.cpp source that does lowering:
QString
Option::fixString(QString string, uchar flags)
...
if(string.length() > 2 && string[0].isLetter() && string[1] == QLatin1Char(':'))
string[0] = string[0].toLower();
If there is no particular reason for drive letter lowering, would it be better to remove those two lines?
Attachments
Issue Links
- relates to
-
QTBUG-700 qmake mixes usage of relative and absolute paths when it comes to build rules and dependencies
-
- Closed
-