Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved MakeFile, remove "if not exist" check when subdirs is used

    General and Desktop
    2
    4
    1643
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Milutin Mrkonjic last edited by Milutin Mrkonjic

      Hi,

      Does anyone know how to remove check for MakeFile if not exist when TEMPLATE = subdirs is used?

      I want to always create MakeFile files, with QMake. Because when i change configuration (for example to x64), tool see older MakeFiles (x86) and don't make new, for x64.
      So I need to delete all previous MakeFile.

      I want to tell somehow to force creating MakeFile always, not to check if exist.

      Code:
      sub-Static-pro-make_first-ordered: FORCE
      @set MAKEFLAGS=$(MAKEFLAGS)
      ( if not exist Makefile.Static $(QMAKE) D:\*************\AcfPublic\Acf\Build\QMake\Static.pro -spec D:/********/QtLibraries/qtbase/mkspecs/win32-msvc2013 -o Makefile.Static ) && $(MAKE) -f Makefile.Static

      1 Reply Last reply Reply Quote 0
      • M
        Milutin Mrkonjic last edited by Milutin Mrkonjic

        I make something with change makefile name, to Makefile.x86.Debug ....

        But now I get error:
        "The specified makefile could not be found ...."

        :|

        https://www.ics.com/designpatterns/book/qmake.html
        "The immediate benefit of using make is that it recompiles only the files that have changed or are affected by any changes, rather than blindly recompiling every source file every time. Figure 1.1 shows the steps involved in building a Qt application."
        Obviously gmake does not see change x64<->x86

        1 Reply Last reply Reply Quote 0
        • SGaist
          SGaist Lifetime Qt Champion last edited by

          Hi,

          How are you currently handling that change of architecture ? Also, what are you using to build your project ? Qt Creator ? The command line ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 0
          • M
            Milutin Mrkonjic last edited by Milutin Mrkonjic

            Hi,

            Before I was make changes, handling changes of architecture is done buy deleting old Makefile files and *.obj.

            Now I was fixed that. Make two Output folders for x86 and x64 build. Inside both of them are Debug and Release, and also I was move obj files inside of new folders.

            Initial solution is not good, because output folders are mixed with source folders. Now you only need to delete these Output folders and start a new fresh build, if you want. No need to search through 39 projects (in my case) and delete Makefile, debug/release, .....

            Also you can start all four configuration (my case), x86/x64 and Debug/Release, without mixing Makefile and *.obj files.

            All was done with qmake variables, but documentation is not realy good :)
            There was many attempts and failurs, until I get out key answer :)

            PS: build is done by cmd scripts, no Creator used in this case.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post