Results 1 to 2 of 2

Thread: pro-file's INSTALLS variable and make uninstall

  1. #1
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    8
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default pro-file's INSTALLS variable and make uninstall

    Actually, INSTALLS works fine:

    Qt Code:
    1. TARGET = bin/tea
    2. target.path = /usr/local/bin
    3. INSTALLS += target
    To copy to clipboard, switch view to plain text mode 

    and qmake generates a makefile with this lines:

    Qt Code:
    1. install_target: first FORCE
    2. @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
    3. -$(INSTALL_PROGRAM) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
    4. -strip "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
    5.  
    6. uninstall_target: FORCE
    7. -$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
    8. -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/
    To copy to clipboard, switch view to plain text mode 

    The problem is - I don't need the last line. How to disable the attempt to remove the installation directory? Let's assume that my binary is installed to /usr/local/bin. Make uninstall trying to remove this dir as well as the binary file. What I can do to prevent such action?

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: pro-file's INSTALLS variable and make uninstall

    AFAIK, the DEL_DIR command is a simple rmdir (you may check in your qmake.conf) which will NOT remove a dir unless it is empty so that shouldn't be a problem.
    Current Qt projects : QCodeEdit, RotiDeCode

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.