1From 8b3a5916fff4004b5b2f1e8a1d3a051346ba3901 Mon Sep 17 00:00:00 2001 2From: Changqing Li <changqing.li@windriver.com> 3Date: Fri, 10 Mar 2023 08:59:39 +0800 4Subject: [PATCH] Makefile.in: fix install failure on host without ldconfig 5 6fix syntax error when ldconfig is not installed on host 7 8when ldconfig is not installed on the build host, install will failed with 9error: 10ln -sf nfslock.so.0.1 /mnt/tmp-glibc/work/core2-64-wrs-linux/liblockfile/1.14-r0/image/usr/lib64/nfslock.so.0 11install -m 644 lockfile.h maillock.h /mnt/tmp-glibc/work/core2-64-wrs-linux/liblockfile/1.14-r0/image/usr/include 12if test "/mnt/tmp-glibc/work/core2-64-wrs-linux/liblockfile/1.14-r0/image" = ""; then ; fi 13if [ "mail" != "" ]; then\ 14 install -g mail -m 2755 dotlockfile /mnt/tmp-glibc/work/core2-64-wrs-linux/liblockfile/1.14-r0/image/usr/bin;\ 15 else \ 16 install -g root -m 755 dotlockfile /mnt/tmp-glibc/work/core2-64-wrs-linux/liblockfile/1.14-r0/image/usr/bin; \ 17 fi 18/bin/sh: -c: line 1: syntax error near unexpected token `;' 19/bin/sh: -c: line 1: `if test "/mnt/tmp-glibc/work/core2-64-wrs-linux/liblockfile/1.14-r0/image" = ""; then ; fi' 20 21Upstream-Status: Submitted [https://github.com/miquels/liblockfile/pull/20] 22 23Signed-off-by: Changqing Li <changqing.li@windriver.com> 24--- 25 Makefile.in | 8 ++++++-- 26 1 file changed, 6 insertions(+), 2 deletions(-) 27 28diff --git a/Makefile.in b/Makefile.in 29index e02d75e..5fc5b5a 100644 30--- a/Makefile.in 31+++ b/Makefile.in 32@@ -9,6 +9,10 @@ NFSVER = 0.1 33 CFLAGS = @CFLAGS@ -I. 34 LDFLAGS = @LDFLAGS@ 35 CC = @CC@ 36+LDCONFIG = @LDCONFIG@ 37+ifeq ($(LDCONFIG),) 38+ LDCONFIG = ":" 39+endif 40 41 prefix = $(DESTDIR)@prefix@ 42 exec_prefix = @exec_prefix@ 43@@ -69,7 +73,7 @@ install_shared: shared install_static install_common 44 $(libdir)/liblockfile.so.$(SOVER) 45 ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so.$(MAJOR) 46 ln -s liblockfile.so.$(SOVER) $(libdir)/liblockfile.so 47- if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi 48+ if test "$(DESTDIR)" = ""; then $(LDCONFIG); fi 49 50 install_common: 51 install -d -m 755 -g root -p $(includedir) 52@@ -90,7 +94,7 @@ install_nfslib: nfslib 53 install -m 755 nfslock.so.$(NFSVER) $(nfslockdir) 54 ln -sf nfslock.so.$(NFSVER) $(libdir)/nfslock.so 55 ln -sf nfslock.so.$(NFSVER) $(libdir)/nfslock.so.0 56- if test "$(DESTDIR)" = ""; then @LDCONFIG@; fi 57+ if test "$(DESTDIR)" = ""; then $(LDCONFIG); fi 58 59 test: test-stamp 60 @: 61-- 622.25.1 63 64