Skip to content

Commit

Permalink
build: improve p11-kit-proxy symlink handling
Browse files Browse the repository at this point in the history
 - 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
  • Loading branch information
novel authored and ueno committed Jan 9, 2017
1 parent 794385d commit 287ae8c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion p11-kit/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 287ae8c

Please sign in to comment.