diff options
author | Carl Worth <cworth@cworth.org> | 2010-03-31 22:47:12 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-03-31 22:54:15 -0700 |
commit | 7b52b2c318e449c73146bd48c7f32145f158f3f5 (patch) | |
tree | 9d146d123148b170c67b67c5370f14e25d5755b4 | |
parent | 649b1609a166c4b176b5afb6e4053eb5a88a07d9 (diff) |
Move installation of library from top-level to lib/Makefile.local
We had a fairly ugly violation of modularity with the top-level
Makefile.local isntalling everything, (even when the build commands
for the library were down in lib/Makefile.local).
-rw-r--r-- | Makefile.local | 5 | ||||
-rw-r--r-- | lib/Makefile.local | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/Makefile.local b/Makefile.local index aa822f6..135d26e 100644 --- a/Makefile.local +++ b/Makefile.local @@ -104,8 +104,6 @@ notmuch: $(notmuch_client_modules) lib/libnotmuch.so notmuch.1.gz: notmuch.1 $(call quiet,gzip) --stdout $^ > $@ -SONAME = libnotmuch.so.1 - install: all notmuch.1.gz for d in $(DESTDIR)$(prefix)/bin/ $(DESTDIR)$(libdir)/ \ $(DESTDIR)$(prefix)/include/ $(DESTDIR)$(prefix)/share/man/man1 ; \ @@ -113,9 +111,6 @@ install: all notmuch.1.gz install -d $$d ; \ done ; install notmuch $(DESTDIR)$(prefix)/bin/ - install lib/$(SONAME) $(DESTDIR)$(libdir)/ - install lib/notmuch.h $(DESTDIR)$(prefix)/include/ - ln -sf $(SONAME) $(DESTDIR)$(libdir)/libnotmuch.so install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/ ifeq ($(MAKECMDGOALS), install) @echo "" diff --git a/lib/Makefile.local b/lib/Makefile.local index 7105070..b24a357 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -1,3 +1,5 @@ +SONAME = libnotmuch.so.1 + dir := lib extra_cflags += -I$(dir) -fPIC @@ -25,5 +27,13 @@ $(dir)/$(SONAME) : $(libnotmuch_modules) $(dir)/libnotmuch.so: $(dir)/$(SONAME) ln -fs $(SONAME) $@ +install: install-$(dir) + +install-$(dir): + install -d $(DESTDIR)$(libdir)/ + install $(dir)/$(SONAME) $(DESTDIR)$(libdir)/ + install $(dir)/notmuch.h $(DESTDIR)$(prefix)/include/ + ln -sf $(SONAME) $(DESTDIR)$(libdir)/libnotmuch.so + SRCS := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs) CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/libnotmuch.so *.so |