mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-03 13:38:25 +00:00
always generate warnings about libraries in /usr/lib since we can't
assume that ld.so puts /usr/lib last. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1676 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
b48792f753
commit
367f92899a
1 file changed
+11
-7
+11
-7
@@ -87,9 +87,8 @@ all :: all-lib
|
||||
|
||||
# Generate warnings if the install directory isn't in /etc/ld.so.conf
|
||||
# or if the library wasn't there before (which means ldconfig must be run).
|
||||
# Don't generate warning about old versions in /usr/lib unless the new version
|
||||
# won't be picked up, since ld.so looks at the directories in ld.so.conf
|
||||
# before it looks at /usr/lib.
|
||||
# Note that some ld.so's put /usr/lib and /lib first, others put them last,
|
||||
# so we can't make any assumptions.
|
||||
install-lib: all-lib
|
||||
$(MKDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBINCLUDEDIR) $(DESTDIR)$(LIBMAN3DIR) $(DESTDIR)$(LIBMAN5DIR)
|
||||
@if [ ! -e "$(DESTDIR)$(LIBDIR)/$(LIBSHSONAME)" ] ; then \
|
||||
@@ -104,6 +103,15 @@ install-lib: all-lib
|
||||
$(LN) $(LIBSHLIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBSHSONAME)
|
||||
$(LN) $(LIBSHSONAME) $(DESTDIR)$(LIBDIR)/$(LIBSHBASENAME)
|
||||
@if [ "$(DESTDIR)$(LIBDIR)" != "/usr/lib" -a "$(DESTDIR)$(LIBDIR)" != "/lib" ] ; then \
|
||||
if [ -e "/usr/lib/$(LIBSHSONAME)" ] ; then \
|
||||
echo '******************************************************************************' ; \
|
||||
echo 'Warning: You have old $(LIBSHBASENAME)* library files in /usr/lib' ; \
|
||||
echo ' and the new library files are in $(DESTDIR)$(LIBDIR) !!!' ; \
|
||||
echo ' These old files must be removed or the userspace tools' ; \
|
||||
echo ' will have unpredictable results !!!' ; \
|
||||
echo ' Run the following command: rm /usr/lib/$(LIBSHBASENAME)*' ; \
|
||||
echo '******************************************************************************' ; \
|
||||
fi ; \
|
||||
grep -q '^$(DESTDIR)$(LIBDIR)$$' /etc/ld.so.conf || \
|
||||
grep -q '^$(DESTDIR)$(LIBDIR)[[:space:]:,=]' /etc/ld.so.conf || \
|
||||
grep -q '[[:space:]:,]$(DESTDIR)$(LIBDIR)$$' /etc/ld.so.conf || \
|
||||
@@ -111,10 +119,6 @@ install-lib: all-lib
|
||||
( echo '******************************************************************************' ; \
|
||||
echo 'Warning: Library directory $(DESTDIR)$(LIBDIR) not in /etc/ld.so.conf !!!' ; \
|
||||
echo ' Add it and run /sbin/ldconfig for the userspace tools to work !!!' ; \
|
||||
if [ -e "/usr/lib/$(LIBSHSONAME)" ] ; then \
|
||||
echo ' Even worse, you have old $(LIBSHBASENAME)* library files in /usr/lib !!!' ; \
|
||||
echo ' These will be used instead which will cause unpredictable results !!!' ; \
|
||||
fi ; \
|
||||
echo '******************************************************************************' ) ; \
|
||||
fi
|
||||
$(INSTALL) -o root -g root -m 644 $(LIBHEADERFILES) $(DESTDIR)$(LIBINCLUDEDIR)
|
||||
|
||||
Reference in new issue
Block a user