Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25205

Subdirs template: dependencies on submodules custom targets

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • None
    • None

    Description

      I would like to be able to call a custom target on my submodules from the subdirs template .pro file.

      I have a subdirs .pro file:

      TEMPLATE = subdirs

      {{SUBDIRS = }}
      {{  submodule1 }}

        submodule2

      submodule1.subdir = sub/module1

      submodule2.subdir = sub/module2

       

       It generates a Makefile like:

      {{SUBTARGETS    =  }}

        sub-modules-submodule1{{}}

        sub-modules-submodule2{{}}

       sub-modules-submodule1-all: FORCE

         @test -d sub/module1 || mkdir -p sub/module1/

        cd sub/module1/ && ( test -e Makefile || $(QMAKE) -o Makefile path/to/sub/module1/module1.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && $(MAKE) -f Makefile all

       

      My submodules know a target I cannot invoke from the subdirs .pro file directory.

      What I would like to write in the subdirs .pro file is something like:

      submodule_target.depends = submodule1.target.submodule_target submodule2.target.submodule_target{{}}

      So it can generate a Makefile with:

       

      submodule_target: sub-modules-submodule1-submodule_target sub-modules-}}{{submodule2-submodule_target{{}}

       

      sub-modules-submodule1-submodule_target:{{}}

        @test -d sub/module1 || mkdir -p sub/module1/

        cd sub/module1/ && ( test -e Makefile || $(QMAKE) -o Makefile path/to/sub/module1/module1.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && $(MAKE) -f Makefile submodule_target

       

      sub-modules-submodule2-submodule_target:{{}}

        @test -d sub/module2 || mkdir -p sub/module2/

        cd sub/module2/ && ( test -e Makefile || $(QMAKE) -o Makefile path/to/sub/module1/module2.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug ) && $(MAKE) -f Makefile submodule_target

       

      So now I could invoke my subdirs .pro file with 'make }}{{submodule_target', like I can with the default targets (install, clean, all, ...){{}}

       

      Maybe it's already feasible, but I couldn't find a way to do it.

       

      Thanks.

       

       

       

       

       

       

       

       

       

       

       

       

       

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            jmhenaff Jean-Marie HENAFF
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes