]> git.cworth.org Git - obsolete/notmuch-old/commitdiff
lib: Fix "make install"
authorCarl Worth <cworth@cworth.org>
Tue, 21 Sep 2010 16:09:01 +0000 (09:09 -0700)
committerCarl Worth <cworth@cworth.org>
Tue, 21 Sep 2010 16:09:01 +0000 (09:09 -0700)
This has been broken since the addition of the test sub-directory to our
non-recursive make system.

lib/Makefile.local

index 9c0facce2b54ddce48fa619f8e983f2e27124da6..a60ef989f49c21ca49618c56e35baef7a30c11a8 100644 (file)
@@ -76,13 +76,17 @@ $(dir)/$(LINKER_NAME): $(dir)/$(SONAME)
 
 install: install-$(dir)
 
+# The (often-reused) $dir works fine within targets/pre-requisites,
+# but cannot be used reliably within commands, so copy its value to a
+# variable that is not reused.
+lib := $(dir)
 install-$(dir):
        mkdir -p $(DESTDIR)$(libdir)/
-       install -m0644 $(dir)/$(LIBNAME) $(DESTDIR)$(libdir)/
+       install -m0644 $(lib)/$(LIBNAME) $(DESTDIR)$(libdir)/
        ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(SONAME)
        ln -sf $(LIBNAME) $(DESTDIR)$(libdir)/$(LINKER_NAME)
        mkdir -p $(DESTDIR)$(includedir)
-       install -m0644 $(dir)/notmuch.h $(DESTDIR)$(includedir)/
+       install -m0644 $(lib)/notmuch.h $(DESTDIR)$(includedir)/
        $(LIBRARY_INSTALL_POST_COMMAND)
 
 SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)