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

explicit_dependencies not honoured when using QMAKE_EXTRA _COMPILERS

    XMLWordPrintable

Details

    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

      Attachments

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

        Activity

          People

            stormols Marius Storm-Olsen
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes