Hi all.
i have a qmake project file that is generating a strange Makefile.
the interesting part of the .pro is:
headers.path = /usr/local/include/gdata
headers.files = common/*.h contacts/*.h
binaries.path = /usr/local/lib
binaries.files = libgdata.so*
INSTALLS += headers binaries
headers.path = /usr/local/include/gdata
headers.files = common/*.h contacts/*.h
binaries.path = /usr/local/lib
binaries.files = libgdata.so*
INSTALLS += headers binaries
To copy to clipboard, switch view to plain text mode
and here is the generated Makefile (only interesting part):
####### Install
install_headers: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/include/gdata/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/include/gdata/
# MORE FILES HERE
-$(INSTALL_FILE) /home/whites/qtcreator/workspace/libgdata-cpp/contacts/webrequestmanager.h $(INSTALL_ROOT)/usr/local/include/gdata/
uninstall_headers: FORCE
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/include/gdata/httprequestmanager.h
#MORE FILES HERE
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/include/gdata/webrequestmanager.h
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/include/gdata/
install_binaries: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/lib/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so.0 $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so.0.0 $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so.0.0.1 $(INSTALL_ROOT)/usr/local/lib/
uninstall_binaries: FORCE
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so.0
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so.0.0
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so.0.0.1
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/lib/
install: install_headers install_binaries FORCE
uninstall: uninstall_headers uninstall_binaries FORCE
FORCE:
####### Install
install_headers: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/include/gdata/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/include/gdata/
# MORE FILES HERE
-$(INSTALL_FILE) /home/whites/qtcreator/workspace/libgdata-cpp/contacts/webrequestmanager.h $(INSTALL_ROOT)/usr/local/include/gdata/
uninstall_headers: FORCE
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/include/gdata/httprequestmanager.h
#MORE FILES HERE
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/include/gdata/webrequestmanager.h
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/include/gdata/
install_binaries: first FORCE
@$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/local/lib/ || $(MKDIR) $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so.0 $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so.0.0 $(INSTALL_ROOT)/usr/local/lib/
-$(INSTALL_PROGRAM) /home/whites/qtcreator/workspace/libgdata-cpp/libgdata.so.0.0.1 $(INSTALL_ROOT)/usr/local/lib/
uninstall_binaries: FORCE
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so.0
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so.0.0
-$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/lib/libgdata.so.0.0.1
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/lib/
install: install_headers install_binaries FORCE
uninstall: uninstall_headers uninstall_binaries FORCE
FORCE:
To copy to clipboard, switch view to plain text mode
the installation part is ok, but the uninstall is not, because of this line:
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/lib/
-$(DEL_DIR) $(INSTALL_ROOT)/usr/local/lib/
To copy to clipboard, switch view to plain text mode
of course this line is not a good idea.
where's the problem?
Bookmarks