aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/Makefile.local
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-09-21 09:09:01 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-09-21 09:09:01 -0700
commit8071c5cd643f7436fb65d0c74676179ea472b155 (patch)
treee0237a7850b9d3c526d92487cae53b0ffb751a06 /lib/Makefile.local
parent9c7fd320c902bc79cbb3eaa9757cf5b13112ce27 (diff)
lib: Fix "make install"
This has been broken since the addition of the test sub-directory to our non-recursive make system.
Diffstat (limited to 'lib/Makefile.local')
-rw-r--r--lib/Makefile.local8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Makefile.local b/lib/Makefile.local
index 9c0facce..a60ef989 100644
--- a/lib/Makefile.local
+++ b/lib/Makefile.local
@@ -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)