diff options
author | Christian Pointner <equinox@helsinki.at> | 2009-11-25 17:09:55 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2009-11-25 17:09:55 (GMT) |
commit | 7d2f7bbeeb420ddd8adf3be465d7aaf7f49deb83 (patch) | |
tree | 159a4aa5b0f86312b16994e5f48fd9d96b1d33e9 /Makefile | |
parent | 57494f21455e8f374de39524e6d77b8d8356cbc3 (diff) |
added install target to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -74,3 +74,42 @@ cleanall: clean manpage: $(MAKE) --directory="doc/" manpage + + +INSTALL_TARGETS := install-bin install-etc +REMOVE_TARGETS := remove-bin remove-etc + +ifdef MANDIR +INSTALL_TARGETS += install-man +REMOVE_TARGETS += remove-man +endif + +install: all $(INSTALL_TARGETS) + +install-bin: $(EXECUTABLE) + $(INSTALL) -d $(DESTDIR)$(BINDIR) + $(INSTALL) -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR) + +install-etc: + $(INSTALL) -d $(DESTDIR)$(ETCDIR)/$(EXECUTABLE) + $(INSTALL) -m 755 newfile.sh $(DESTDIR)$(ETCDIR)/$(EXECUTABLE)/ + +install-man: manpage + $(INSTALL) -d $(DESTDIR)$(MANDIR)/man8/ + $(INSTALL) -m 644 doc/rhdropbox.8 $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE).8 + +uninstall: remove + +remove: $(REMOVE_TARGETS) + +remove-bin: + rm -f $(DESTDIR)$(BINDIR)/$(EXECUTABLE) + +remove-etc: + rm -f $(DESTDIR)$(ETCDIR)/init.d/$(EXECUTABLE) + +remove-man: + rm -f $(DESTDIR)$(MANDIR)/man8/$(EXECUTABLE).8 + +purge: remove + rm -rf $(DESTDIR)$(ETCDIR)/$(EXECUTABLE)/ |