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

qmake creates empty install rule unless target already compiled.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 4.7.0
    • 4.5.3
    • Build tools: qmake
    • None
    • 3d6f1ebf1dbdefc443aa4f8e7d18755383794156

    Description

      In order to generate a proper make-rule for install, one have to rerun qmake after building the application.

      I have the following rule in my .pro-file:

      unix {
              isEmpty(PREFIX) {
                      PREFIX = /usr/local
              }
      
              binaries.path  = $$PREFIX/bin
              binaries.files = $$TARGET
      
              INSTALLS += binaries
      }
      

      If I start with a clean project a qmake generate an empty install-rule in the make-file:

      ####### Install
      
      install:   FORCE
      
      uninstall:   FORCE
      
      FORCE:
      

      If I first run qmake, buld the project so that TARGET exists, and re-run qmake a proper install-rule is create in the makefile:

      ####### Install
      
      install_binaries: first FORCE
              @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
              -$(INSTALL_PROGRAM) /home/lager/projekt/dev/Basqet/src/releases/release_0.1/Basqet $(INSTALL_ROOT)/usr/local/bin/
              -strip $(INSTALL_ROOT)/usr/local/bin/Basqet
      
      
      uninstall_binaries:  FORCE
              -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/bin/Basqet
              -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
      
      
      install:  install_binaries  FORCE
      
      uninstall: uninstall_binaries   FORCE
      
      FORCE:
      

      Regards,
      Erik

      Attachments

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

        Activity

          People

            albisser Zeno Albisser
            paddlaren Erik Ridderby
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes