changeset 30831:2d394460429f

build: Parse .la files in build tree when installing .oct files (bug #61905). * Makefile.am (install-oct): Parse .la files in build tree when installing .oct files. That should improve compatibility with tools like `slibtool` that don't install .la files.
author Markus Mützel <markus.muetzel@gmx.de>
date Wed, 16 Mar 2022 18:20:26 +0100
parents d3123b682f63
children d87406970676
files Makefile.am
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Tue Mar 15 16:49:13 2022 +0100
+++ b/Makefile.am	Wed Mar 16 18:20:26 2022 +0100
@@ -460,17 +460,18 @@
 	if [ -n "`cat $(OCT_FILE_PKG_ADD_FILES)`" ]; then \
 	  $(INSTALL_DATA) oct-file-pkg-add $(DESTDIR)$(octfiledir)/PKG_ADD; \
 	fi
+	top_build_dir=`pwd` && \
 	cd $(DESTDIR)$(octlibdir) && \
 	for ltlib in $(OCT_FILE_LIBS); do \
 	  f=`echo $$ltlib | $(SED) 's,.*/,,'`; \
-	  dl=`$(SED) -n -e "s/dlname='\([^']*\)'/\1/p" < $$f`; \
+	  dl=`$(SED) -n -e "s/dlname='\([^']*\)'/\1/p" < $$top_build_dir/$$ltlib`; \
 	  if [ -n "$$dl" ]; then \
 	    $(INSTALL_PROGRAM) $$dl $(DESTDIR)$(octfiledir)/`echo $$f | $(SED) 's,^lib,,; s,\.la$$,.oct,'`; \
 	  else \
 	    echo "error: dlname is empty in $$ltlib!"; \
 	    exit 1; \
 	  fi; \
-	  lnames=`$(SED) -n -e "s/library_names='\([^']*\)'/\1/p" < $$f`; \
+	  lnames=`$(SED) -n -e "s/library_names='\([^']*\)'/\1/p" < $$top_build_dir/$$ltlib`; \
 	  if [ -n "$$lnames" ]; then \
 	    rm -f $$f $$lnames $$dl; \
 	  fi \