]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: add new target 'make uninstall' to support uninstalling haproxy from OS
authorIlyas Bakirov <i.bakirov@gmail.com>
Wed, 4 Feb 2015 11:14:26 +0000 (17:14 +0600)
committerWilly Tarreau <w@1wt.eu>
Wed, 4 Feb 2015 12:13:30 +0000 (13:13 +0100)
Makefile

index 4e3e166805f22e3003177364cecb8e1c6013a335..620a2bedc11980a0c7be4abfcc74bd1d8d2e0e43 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -733,6 +733,15 @@ install-bin: haproxy haproxy-systemd-wrapper
 
 install: install-bin install-man install-doc
 
+uninstall:
+       rm -f "$(DESTDIR)$(MANDIR)"/man1/haproxy.1
+       for x in configuration architecture haproxy-en haproxy-fr; do \
+               rm -f "$(DESTDIR)$(DOCDIR)"/$$x.txt ; \
+       done
+       -rmdir "$(DESTDIR)$(DOCDIR)"
+       rm -f "$(DESTDIR)$(SBINDIR)"/haproxy
+       rm -f "$(DESTDIR)$(SBINDIR)"/haproxy-systemd-wrapper
+
 clean:
        rm -f *.[oas] src/*.[oas] ebtree/*.[oas] haproxy test
        for dir in . src include/* doc ebtree; do rm -f $$dir/*~ $$dir/*.rej $$dir/core; done