]> git.notmuchmail.org Git - notmuch/commitdiff
Move installation of library from top-level to lib/Makefile.local
authorCarl Worth <cworth@cworth.org>
Thu, 1 Apr 2010 05:47:12 +0000 (22:47 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 1 Apr 2010 05:54:15 +0000 (22:54 -0700)
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).

Makefile.local
lib/Makefile.local

index aa822f6aae26d8d8fbadc3e7465644f11d03a9e6..135d26e8daa816d766c3fdf015cbd87e45a493bd 100644 (file)
@@ -104,8 +104,6 @@ notmuch: $(notmuch_client_modules) lib/libnotmuch.so
 notmuch.1.gz: notmuch.1
        $(call quiet,gzip) --stdout $^ > $@
 
 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 ; \
 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 -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 ""
        install -m0644 notmuch.1.gz $(DESTDIR)$(prefix)/share/man/man1/
 ifeq ($(MAKECMDGOALS), install)
        @echo ""
index 7105070b2a7b1ed9d6efd337898505a3b675076a..b24a35710490e08a7db6d2ab325023a39c74a825 100644 (file)
@@ -1,3 +1,5 @@
+SONAME = libnotmuch.so.1
+
 dir := lib
 extra_cflags += -I$(dir) -fPIC
 
 dir := lib
 extra_cflags += -I$(dir) -fPIC
 
@@ -25,5 +27,13 @@ $(dir)/$(SONAME) : $(libnotmuch_modules)
 $(dir)/libnotmuch.so: $(dir)/$(SONAME)
        ln -fs $(SONAME) $@
 
 $(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
 SRCS  := $(SRCS) $(libnotmuch_c_srcs) $(libnotmuch_cxx_srcs)
 CLEAN := $(CLEAN) $(libnotmuch_modules) $(dir)/$(SONAME) $(dir)/libnotmuch.so *.so