PDA

View Full Version : pro-file's INSTALLS variable and make uninstall



roxton
3rd July 2008, 21:25
Actually, INSTALLS works fine:



TARGET = bin/tea
target.path = /usr/local/bin
INSTALLS += target


and qmake generates a makefile with this lines:



install_target: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/bin/
-$(INSTALL_PROGRAM) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
-strip "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"

uninstall_target: FORCE
-$(DEL_FILE) "$(INSTALL_ROOT)/usr/local/bin/$(QMAKE_TARGET)"
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/bin/


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?

fullmetalcoder
4th July 2008, 09:16
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.