From ffda7f7aac9aeaed06f083cfa877c540e415c8c0 Mon Sep 17 00:00:00 2001 From: Felix Salfelder Date: Sun, 19 Feb 2017 21:12:44 +0000 Subject: [PATCH 1/2] ask the user to run ldconfig under some circumstances. --- admsXml/Makefile.am | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/admsXml/Makefile.am b/admsXml/Makefile.am index d7b3f97..439cddf 100644 --- a/admsXml/Makefile.am +++ b/admsXml/Makefile.am @@ -56,6 +56,22 @@ libadmsAdmstpath_la_LIBADD=libadmsElement.la #depends on adms.implicit.xml bin_PROGRAMS=admsXml admsCheck +# probably all of +# linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu* +instex=$(shell echo admsXml | \ + sed -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/') +install-exec-hook: + @if [ -n "$(DESTDIR)" ]; then \ + echo DESTDIR, nothing to do; \ + elif ( chrpath $(bindir)/$(instex) | grep -q PATH= ); then \ + echo theres an rpath set, no need to act.; \ + else \ + echo =======================================================; \ + echo consider running \'ldconfig\' with appropriate privileges; \ + echo "(now)";\ + echo =======================================================; \ + fi + admsXml_SOURCES=admsXml.c admsXml_LDADD=-lm libadmsElement.la libadmsVeriloga.la libadmsPreprocessor.la libadmsAdmstpath.la From ff4ebbd0d10147fc92bf3ca6dcd48639afe772a7 Mon Sep 17 00:00:00 2001 From: Felix Salfelder Date: Sun, 19 Feb 2017 21:18:39 +0000 Subject: [PATCH 2/2] figure out ways (when) to invoke ldconfig --- admsXml/Makefile.am | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/admsXml/Makefile.am b/admsXml/Makefile.am index 439cddf..d244a5d 100644 --- a/admsXml/Makefile.am +++ b/admsXml/Makefile.am @@ -63,11 +63,20 @@ instex=$(shell echo admsXml | \ install-exec-hook: @if [ -n "$(DESTDIR)" ]; then \ echo DESTDIR, nothing to do; \ + elif [ $(libdir) = /lib ]; then \ + echo guessing that this is not necessary.; \ + elif [ $(libdir) = /usr/lib ]; then \ + echo guessing that this is not necessary.; \ elif ( chrpath $(bindir)/$(instex) | grep -q PATH= ); then \ echo theres an rpath set, no need to act.; \ + elif [ `id -u` = 0 ]; then \ + echo =======================================================; \ + echo we are root, could in principle run ldconfig for you; \ + echo "(goodbye)"; \ + echo =======================================================; \ else \ echo =======================================================; \ - echo consider running \'ldconfig\' with appropriate privileges; \ + echo maybe run \'ldconfig\' with appropriate privileges; \ echo "(now)";\ echo =======================================================; \ fi