[PATCH] Makefile: Do not call ldconfig when DESTDIR is defined

Subject: [PATCH] Makefile: Do not call ldconfig when DESTDIR is defined

Date: Fri, 22 Oct 2010 08:01:28 +0200

To: notmuch@notmuchmail.org

Cc:

From: Michal Sojka


If make install is called with non-empty DESTDIR, calling ldconfig has
usually no sense. Without this patch dpkg-buildpackage fails with

  make[1]: ldconfig: Command not found

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
---
This patch first appeared in id:87ljaf6p51.fsf@steelpick.2x.cz

 lib/Makefile.local |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/Makefile.local b/lib/Makefile.local
index a60ef98..2d36db1 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -36,9 +36,11 @@ SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR)
 LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE)
 LIBRARY_LINK_FLAG = -shared -Wl,-soname=$(SONAME)
 ifeq ($(LIBDIR_IN_LDCONFIG),1)
+ifeq ($(DESTDIR),)
 LIBRARY_INSTALL_POST_COMMAND=ldconfig
 endif
 endif
+endif
 
 dir := lib
 extra_cflags += -I$(dir) -fPIC
-- 
tg: (f117d80..) t/fix-ldconfig-for-deb (depends on: master)

Thread: