diff options
author | Phil Sutter <phil@nwl.cc> | 2020-06-09 12:40:24 +0200 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2020-06-09 19:36:37 +0200 |
commit | 848b4889274edb2ec6ef6218f3d8b55288dc4151 (patch) | |
tree | 66693c314df04685f9afb953e08ba64f64d6fb4f /include | |
parent | b40b7d976fe144d14421bb441f55ffdc11a4b442 (diff) |
build: Fix for failing 'make uninstall'
Support for uninstalling is severely broken:
- extensions/GNUmakefile.in defines an 'install' target but lacks a
respective 'uninstall' one, causing 'make uninstall' abort with an
error message.
- iptables/Makefile.am defines an 'install-exec-hook' to create the
binary symlinks which are left in place after 'make uninstall'.
Fix these problems by defining respective targets containing code copied
from automake-generated uninstall targets.
While being at it, add a few more uninstall-hooks removing custom
directories created by 'make install' if they are empty afterwards.
Reported-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Tested-by: Richard Guy Briggs <rgb@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile.am | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am index e6951209..ea34c2fe 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -10,3 +10,8 @@ endif nobase_include_HEADERS += \ libiptc/ipt_kernel_headers.h libiptc/libiptc.h \ libiptc/libip6tc.h libiptc/libxtc.h libiptc/xtcshared.h + +uninstall-hook: + dir=${includedir}/libiptc; { \ + test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; \ + } || rmdir -p --ignore-fail-on-non-empty "$$dir" |