]> git.notmuchmail.org Git - notmuch/blobdiff - Makefile.local
create notmuch_show_params_t structure for holding parameters passed to show functions.
[notmuch] / Makefile.local
index cbc0e077039019e2c8afcde60b829d73942d66b4..50bba640aa66bbfdce01099ee75ff20d58f6bb6e 100644 (file)
@@ -12,7 +12,7 @@ PACKAGE=notmuch
 
 IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi)
 
-VERSION:=$(shell cat version)
+VERSION:=$(shell cat ${srcdir}/version)
 ifneq ($(MAKECMDGOALS),release)
 ifneq ($(MAKECMDGOALS),release-message)
 ifeq ($(IS_GIT),yes)
@@ -31,7 +31,7 @@ GPG_FILE=$(SHA1_FILE).asc
 # Smash together user's values with our extra values
 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags)
 FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags)
-FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS)
+FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Llib -lnotmuch $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS)
 FINAL_NOTMUCH_LINKER = CC
 ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
 FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
@@ -40,7 +40,7 @@ endif
 ifeq ($(LIBDIR_IN_LDCONFIG),0)
 FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
 endif
-FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(CONFIGURE_LDFLAGS)
+FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
 
 .PHONY: all
 all: notmuch notmuch-shared notmuch.1.gz
@@ -81,7 +81,7 @@ dist: $(TAR_FILE)
 # targets in the case of parallel invocation of make (-j).
 #
 # We carefully ensure that our VERSION variable is passed down to any
-# sub-ordinate make invocations (which won't otherwhise know that they
+# sub-ordinate make invocations (which won't otherwise know that they
 # are part of the release and need to take the version from the
 # version file).
 .PHONY: release
@@ -249,7 +249,8 @@ notmuch_client_srcs =               \
        notmuch-time.c          \
        query-string.c          \
        show-message.c          \
-       json.c
+       json.c                  \
+       xutil.c
 
 notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
 
@@ -264,10 +265,10 @@ notmuch.1.gz: notmuch.1
 
 .PHONY: install
 install: all notmuch.1.gz
-       mkdir -p $(DESTDIR)$(mandir)/man1
-       install -m0644 notmuch.1.gz $(DESTDIR)$(mandir)/man1/
-       mkdir -p $(DESTDIR)$(prefix)/bin/
-       install notmuch-shared $(DESTDIR)$(prefix)/bin/notmuch
+       mkdir -p "$(DESTDIR)$(mandir)/man1"
+       install -m0644 notmuch.1.gz "$(DESTDIR)$(mandir)/man1/"
+       mkdir -p "$(DESTDIR)$(prefix)/bin/"
+       install notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"
 ifeq ($(MAKECMDGOALS), install)
        @echo ""
        @echo "Notmuch is now installed to $(DESTDIR)$(prefix)"
@@ -276,6 +277,7 @@ ifeq ($(MAKECMDGOALS), install)
        @echo "through the process of configuring notmuch and creating"
        @echo "a database of existing email messages. The \"notmuch\""
        @echo "command will also offer some sample search commands."
+ifeq ($(WITH_EMACS), 1)
        @echo ""
        @echo "Beyond the command-line interface, notmuch also offers"
        @echo "a full-featured interface for reading and writing mail"
@@ -287,11 +289,12 @@ ifeq ($(MAKECMDGOALS), install)
        @echo "And then run emacs as \"emacs -f notmuch\" or invoke"
        @echo "the command \"M-x notmuch\" from within emacs."
 endif
+endif
 
 .PHONY: install-desktop
 install-desktop:
-       mkdir -p $(DESTDIR)$(desktop_dir)
-       desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop
+       mkdir -p "$(DESTDIR)$(desktop_dir)"
+       desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop
 
 SRCS  := $(SRCS) $(notmuch_client_srcs)
 CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc notmuch.1.gz