Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-6060

qmake lowers drive letter in the file path on Win32

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P2: Important
    • None
    • 3.x
    • Build tools: qmake
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              buddenha Oswald Buddenhagen
              giga Grigory Zagorodnev
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes