summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Bogorodskiy <bogorodskiy@gmail.com>2017-01-07 00:06:34 +0400
committerDaiki Ueno <ueno@gnu.org>2017-01-09 10:40:14 +0100
commit287ae8c14145d9cef55079e4de36b1607176cf89 (patch)
treef59071428bf8bd441b2e38ab2a8978665aec16f5
parent794385d24fe794455798946ce9de1e2280e78a8c (diff)
build: improve p11-kit-proxy symlink handling
- Current command for creation of the p11-kit-proxy symlink uses shell brace expansion that isn't supported by all the shells (e.g. FreeBSD's /bin/sh does not support that). Replace it with the old-fashioned 'for' loop - Match extension of the source and the target, i.e. so links to so, dylib links to dylib (previously dylib linked to so) - Add an uninstall-local target to clean up the symlink
-rw-r--r--p11-kit/Makefile.am10
1 files changed, 9 insertions, 1 deletions
diff --git a/p11-kit/Makefile.am b/p11-kit/Makefile.am
index 5ee1b71..f1c0583 100644
--- a/p11-kit/Makefile.am
+++ b/p11-kit/Makefile.am
@@ -87,9 +87,17 @@ libp11_kit_testable_la_CFLAGS = \
# Proxy module is actually same as library, so install a link
install-exec-hook:
- $(LN_S) -f `readlink $(DESTDIR)$(libdir)/libp11-kit.{so,dylib}` $(DESTDIR)$(libdir)/p11-kit-proxy.so
+ for i in so dylib; do \
+ test -f $(DESTDIR)$(libdir)/libp11-kit.$$i && \
+ $(LN_S) -f `readlink $(DESTDIR)$(libdir)/libp11-kit.$$i` $(DESTDIR)$(libdir)/p11-kit-proxy.$$i || true; \
+ done
$(MKDIR_P) $(DESTDIR)$(p11_package_config_modules)
+uninstall-local:
+ for i in so dylib; do \
+ rm -f $(DESTDIR)$(libdir)/p11-kit-proxy.$$i; \
+ done
+
endif
pkgconfigdir = $(libdir)/pkgconfig