commit 28064303528f2604c5bf932b1478eb9f7c7ffc04
Author:     Laslo Hunhold <[email protected]>
AuthorDate: Sat Oct 8 11:11:49 2022 +0200
Commit:     Laslo Hunhold <[email protected]>
CommitDate: Sat Oct 8 11:11:49 2022 +0200

    Check if LDCONFIG is set before calling it
    
    Otherwise this prints a warning in some make-implementations.
    
    Signed-off-by: Laslo Hunhold <[email protected]>

diff --git a/Makefile b/Makefile
index a4ded5b..feaefbd 100644
--- a/Makefile
+++ b/Makefile
@@ -288,7 +288,7 @@ install: all
        if [ "$(SOSYMLINK)" = "true" ]; then ln -sf "$(SONAME)" 
"$(DESTDIR)$(LIBPREFIX)/libgrapheme.so.$(VERSION_MAJOR)"; fi
        if [ "$(SOSYMLINK)" = "true" ]; then ln -sf "$(SONAME)" 
"$(DESTDIR)$(LIBPREFIX)/libgrapheme.so"; fi
        cp -f grapheme.h "$(DESTDIR)$(INCPREFIX)"
-       $(LDCONFIG)
+       if ! [ -z "$(LDCONFIG)" ]; then $(LDCONFIG); fi
 
 uninstall:
        for m in $(MAN3:=.3); do rm -f "$(DESTDIR)$(MANPREFIX)/man3/`basename 
$$m`"; done
@@ -299,7 +299,7 @@ uninstall:
        if [ "$(SOSYMLINK)" = "true" ]; then rm -f 
"$(DESTDIR)$(LIBPREFIX)/libgrapheme.so.$(VERSION_MAJOR)"; fi
        if [ "$(SOSYMLINK)" = "true" ]; then rm -f 
"$(DESTDIR)$(LIBPREFIX)/libgrapheme.so"; fi
        rm -f "$(DESTDIR)$(INCPREFIX)/grapheme.h"
-       $(LDCONFIG)
+       if ! [ -z "$(LDCONFIG)" ]; then $(LDCONFIG); fi
 
 clean:
        rm -f $(BENCHMARK:=.o) benchmark/util.o $(BENCHMARK) $(GEN:=.h) 
$(GEN:=.o) gen/util.o $(GEN) $(SRC:=.o) src/util.o $(TEST:=.o) test/util.o 
$(TEST) libgrapheme.a $(SONAME) $(MAN3:=.3) $(MAN7:=.7)

Reply via email to