From ebabc96cea16a4a52701818ce1c08255fb932b88 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 29 Sep 2008 22:02:45 +0000 Subject: [PATCH] Fix for the libcucul symlinks installation, courtesy of Ben Wiley Sittler. --- caca/Makefile.am | 17 ++++++++--------- cxx/Makefile.am | 17 ++++++++--------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/caca/Makefile.am b/caca/Makefile.am index b718b57..5d5ae05 100644 --- a/caca/Makefile.am +++ b/caca/Makefile.am @@ -58,21 +58,20 @@ libcaca_la_LIBADD = @CACA_LIBS@ $(ZLIB_LIBS) install-exec-local: $(mkinstalldirs) $(DESTDIR)$(libdir) - dllext=$$(grep dlname libcaca.la | cut -f2 -d.); \ - ln -sf libcaca.$$dllext $(DESTDIR)$(libdir)/libcucul.$$dllext; \ - ln -sf libcaca.$$dllext.0 $(DESTDIR)$(libdir)/libcucul.$$dllext.0 + . libcaca.la; \ + for x in $$library_names; do \ + ln -sf $$x $(DESTDIR)$(libdir)/$$(echo $$x | sed 's/caca/cucul/g'); \ + done install-data-local: $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir) ln -sf caca.pc $(DESTDIR)$(pkgconfigdir)/cucul.pc uninstall-local: - rm -f $(DESTDIR)$(libdir)/libcucul.so - rm -f $(DESTDIR)$(libdir)/libcucul.so.0 - rm -f $(DESTDIR)$(libdir)/libcucul.sl - rm -f $(DESTDIR)$(libdir)/libcucul.sl.0 - rm -f $(DESTDIR)$(libdir)/libcucul.dylib - rm -f $(DESTDIR)$(libdir)/libcucul.dylib.0 + . libcaca.la; \ + for x in $$library_names; do \ + rm -f $(DESTDIR)$(libdir)/$$(echo $$x | sed 's/caca/cucul/g'); \ + done rmdir $(DESTDIR)$(libdir) 2>/dev/null || true rm -f $(DESTDIR)$(pkgconfigdir)/cucul.pc rmdir $(DESTDIR)$(pkgconfigdir) 2>/dev/null || true diff --git a/cxx/Makefile.am b/cxx/Makefile.am index 702428d..a660754 100644 --- a/cxx/Makefile.am +++ b/cxx/Makefile.am @@ -23,21 +23,20 @@ cxxtest_LDADD = libcaca++.la ../caca/libcaca.la install-exec-local: $(mkinstalldirs) $(DESTDIR)$(libdir) - dllext=$$(grep dlname libcaca++.la | cut -f2 -d.); \ - ln -sf libcaca++.$$dllext $(DESTDIR)$(libdir)/libcucul++.$$dllext; \ - ln -sf libcaca++.$$dllext.0 $(DESTDIR)$(libdir)/libcucul++.$$dllext.0 + . libcaca++.la; \ + for x in $$library_names; do \ + ln -sf $$x $(DESTDIR)$(libdir)/$$(echo $$x | sed 's/caca/cucul/g'); \ + done install-data-local: $(mkinstalldirs) $(DESTDIR)$(pkgconfigdir) ln -sf caca++.pc $(DESTDIR)$(pkgconfigdir)/cucul++.pc uninstall-local: - rm -f $(DESTDIR)$(libdir)/libcucul++.so - rm -f $(DESTDIR)$(libdir)/libcucul++.so.0 - rm -f $(DESTDIR)$(libdir)/libcucul++.sl - rm -f $(DESTDIR)$(libdir)/libcucul++.sl.0 - rm -f $(DESTDIR)$(libdir)/libcucul++.dylib - rm -f $(DESTDIR)$(libdir)/libcucul++.dylib.0 + . libcaca++.la; \ + for x in $$library_names; do \ + rm -f $(DESTDIR)$(libdir)/$$(echo $$x | sed 's/caca/cucul/g'); \ + done rmdir $(DESTDIR)$(libdir) 2>/dev/null || true rm -f $(DESTDIR)$(pkgconfigdir)/cucul++.pc rmdir $(DESTDIR)$(pkgconfigdir) 2>/dev/null || true