2010-03-21 09:54:08 +00:00
|
|
|
# -*- makefile -*-
|
|
|
|
|
2010-04-02 11:55:09 -07:00
|
|
|
# Here's the (hopefully simple) versioning scheme.
|
|
|
|
#
|
|
|
|
# Releases of notmuch have a two-digit version (0.1, 0.2, etc.). We
|
|
|
|
# increment the second digit for each release and increment the first
|
|
|
|
# digit when we reach particularly major milestones of usability.
|
|
|
|
#
|
|
|
|
# Between releases, (such as when compiling notmuch from the git
|
2010-04-15 16:17:32 -07:00
|
|
|
# repository), we let git append identification of the actual commit.
|
2010-04-05 15:43:51 -07:00
|
|
|
PACKAGE=notmuch
|
2010-04-16 10:37:32 -07:00
|
|
|
|
2010-04-16 11:24:43 -07:00
|
|
|
IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi)
|
|
|
|
|
2011-11-17 22:26:25 -04:00
|
|
|
ifeq ($(IS_GIT),yes)
|
|
|
|
DATE:=$(shell git log --date=short -1 --pretty=format:%cd)
|
|
|
|
else
|
|
|
|
DATE:=$(shell date +%F)
|
|
|
|
endif
|
|
|
|
|
2011-03-09 15:02:42 -08:00
|
|
|
VERSION:=$(shell cat ${srcdir}/version)
|
2011-11-17 22:26:25 -04:00
|
|
|
ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
|
2010-04-16 11:24:43 -07:00
|
|
|
ifeq ($(IS_GIT),yes)
|
2011-11-17 12:40:50 -04:00
|
|
|
VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
|
2010-04-16 11:24:43 -07:00
|
|
|
endif
|
2010-04-16 10:37:32 -07:00
|
|
|
endif
|
2011-07-29 17:45:12 +02:00
|
|
|
|
|
|
|
UPSTREAM_TAG=$(subst ~,_,$(VERSION))
|
|
|
|
DEB_TAG=debian/$(UPSTREAM_TAG)-1
|
2010-04-02 11:55:09 -07:00
|
|
|
|
2010-04-05 15:26:08 -07:00
|
|
|
RELEASE_HOST=notmuchmail.org
|
|
|
|
RELEASE_DIR=/srv/notmuchmail.org/www/releases
|
2010-04-05 16:37:44 -07:00
|
|
|
RELEASE_URL=http://notmuchmail.org/releases
|
2010-04-05 15:43:51 -07:00
|
|
|
TAR_FILE=$(PACKAGE)-$(VERSION).tar.gz
|
2011-07-17 09:55:50 -03:00
|
|
|
DEB_TAR_FILE=$(PACKAGE)_$(VERSION).orig.tar.gz
|
2010-04-05 15:43:51 -07:00
|
|
|
SHA1_FILE=$(TAR_FILE).sha1
|
|
|
|
GPG_FILE=$(SHA1_FILE).asc
|
2010-04-02 11:55:09 -07:00
|
|
|
|
2011-09-05 08:45:28 -03:00
|
|
|
PV_FILE=bindings/python/notmuch/version.py
|
|
|
|
|
2010-03-31 22:12:01 -07:00
|
|
|
# Smash together user's values with our extra values
|
2013-10-15 09:30:45 +02:00
|
|
|
FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CPPFLAGS) $(CFLAGS) $(WARN_CFLAGS) $(extra_cflags) $(CONFIGURE_CFLAGS)
|
|
|
|
FINAL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS) $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CONFIGURE_CXXFLAGS)
|
2011-10-23 12:05:13 -03:00
|
|
|
FINAL_NOTMUCH_LDFLAGS = $(LDFLAGS) -Lutil -lutil -Llib -lnotmuch $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS)
|
2010-04-16 11:51:56 -07:00
|
|
|
FINAL_NOTMUCH_LINKER = CC
|
2010-10-30 13:20:33 -07:00
|
|
|
ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
|
2010-04-14 16:29:50 -07:00
|
|
|
FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
|
2010-04-16 11:51:56 -07:00
|
|
|
FINAL_NOTMUCH_LINKER = CXX
|
2010-04-14 16:29:50 -07:00
|
|
|
endif
|
2010-06-04 16:52:56 -07:00
|
|
|
ifeq ($(LIBDIR_IN_LDCONFIG),0)
|
2010-10-30 12:55:09 -07:00
|
|
|
FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
|
2010-06-04 16:52:56 -07:00
|
|
|
endif
|
2010-11-01 23:17:48 -07:00
|
|
|
FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)
|
2010-03-31 22:12:01 -07:00
|
|
|
|
2010-04-05 12:59:06 -07:00
|
|
|
.PHONY: all
|
2011-12-20 16:35:13 -04:00
|
|
|
all: notmuch notmuch-shared
|
2010-03-31 22:12:01 -07:00
|
|
|
ifeq ($(MAKECMDGOALS),)
|
2010-04-16 12:10:23 -07:00
|
|
|
ifeq ($(shell cat .first-build-message 2>/dev/null),)
|
2010-04-02 14:06:32 -07:00
|
|
|
@NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all
|
2010-03-31 22:12:01 -07:00
|
|
|
@echo ""
|
|
|
|
@echo "Compilation of notmuch is now complete. You can install notmuch with:"
|
|
|
|
@echo ""
|
|
|
|
@echo " make install"
|
|
|
|
@echo ""
|
|
|
|
@echo "Note that depending on the prefix to which you are installing"
|
|
|
|
@echo "you may need root permission (such as \"sudo make install\")."
|
|
|
|
@echo "See \"./configure --help\" for help on setting an alternate prefix."
|
2010-04-02 14:06:32 -07:00
|
|
|
@echo Printed > .first-build-message
|
|
|
|
endif
|
2010-03-31 22:12:01 -07:00
|
|
|
endif
|
|
|
|
|
2010-04-05 15:43:51 -07:00
|
|
|
$(TAR_FILE):
|
2011-07-03 17:28:47 -03:00
|
|
|
if git tag -v $(VERSION) >/dev/null 2>&1; then \
|
|
|
|
ref=$(VERSION); \
|
|
|
|
else \
|
|
|
|
ref="HEAD" ; \
|
|
|
|
echo "Warning: No signed tag for $(VERSION)"; \
|
|
|
|
fi ; \
|
|
|
|
git archive --format=tar --prefix=$(PACKAGE)-$(VERSION)/ $$ref > $(TAR_FILE).tmp
|
2010-04-16 10:37:32 -07:00
|
|
|
echo $(VERSION) > version.tmp
|
|
|
|
tar --append -f $(TAR_FILE).tmp --transform s_^_$(PACKAGE)-$(VERSION)/_ --transform 's_.tmp$$__' version.tmp
|
|
|
|
rm version.tmp
|
2010-04-08 13:49:22 +02:00
|
|
|
gzip < $(TAR_FILE).tmp > $(TAR_FILE)
|
2010-04-16 11:24:43 -07:00
|
|
|
@echo "Source is ready for release in $(TAR_FILE)"
|
2010-04-05 15:26:08 -07:00
|
|
|
|
2010-04-05 15:43:51 -07:00
|
|
|
$(SHA1_FILE): $(TAR_FILE)
|
|
|
|
sha1sum $^ > $@
|
|
|
|
|
|
|
|
$(GPG_FILE): $(SHA1_FILE)
|
|
|
|
@echo "Please enter your GPG password to sign the checksum."
|
|
|
|
gpg --armor --sign $^
|
|
|
|
|
2010-04-05 14:22:00 -07:00
|
|
|
.PHONY: dist
|
2010-04-05 15:43:51 -07:00
|
|
|
dist: $(TAR_FILE)
|
|
|
|
|
2011-11-17 22:26:25 -04:00
|
|
|
.PHONY: update-versions
|
|
|
|
|
2014-03-05 09:34:10 -04:00
|
|
|
update-versions:
|
2011-11-17 22:26:25 -04:00
|
|
|
sed -i "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" $(PV_FILE)
|
|
|
|
|
2010-04-05 16:37:44 -07:00
|
|
|
# We invoke make recursively only to force ordering of our phony
|
|
|
|
# targets in the case of parallel invocation of make (-j).
|
2010-04-16 10:37:32 -07:00
|
|
|
#
|
|
|
|
# We carefully ensure that our VERSION variable is passed down to any
|
2011-03-09 15:02:42 -08:00
|
|
|
# sub-ordinate make invocations (which won't otherwise know that they
|
2010-04-16 10:37:32 -07:00
|
|
|
# are part of the release and need to take the version from the
|
|
|
|
# version file).
|
2010-04-05 15:26:08 -07:00
|
|
|
.PHONY: release
|
2010-04-16 13:00:35 -07:00
|
|
|
release: verify-source-tree-and-version
|
2010-04-16 11:03:25 -07:00
|
|
|
$(MAKE) VERSION=$(VERSION) verify-newer
|
2011-07-17 09:52:05 -03:00
|
|
|
$(MAKE) VERSION=$(VERSION) clean
|
2010-04-16 10:37:32 -07:00
|
|
|
$(MAKE) VERSION=$(VERSION) test
|
2011-07-29 17:45:12 +02:00
|
|
|
git tag -s -m "$(PACKAGE) $(VERSION) release" $(UPSTREAM_TAG)
|
2010-04-16 10:37:32 -07:00
|
|
|
$(MAKE) VERSION=$(VERSION) $(GPG_FILE)
|
2011-07-17 09:55:50 -03:00
|
|
|
ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
|
2011-07-29 17:45:12 +02:00
|
|
|
pristine-tar commit $(DEB_TAR_FILE) $(UPSTREAM_TAG)
|
|
|
|
git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" $(DEB_TAG)
|
2010-04-15 16:28:13 -07:00
|
|
|
mkdir -p releases
|
|
|
|
mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases
|
2010-04-16 10:37:32 -07:00
|
|
|
$(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce
|
2011-07-04 08:39:04 -03:00
|
|
|
ifeq ($(REALLY_UPLOAD),yes)
|
|
|
|
git push origin $(VERSION)
|
|
|
|
cd releases && scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
|
2011-12-05 13:39:32 +02:00
|
|
|
ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-* ; ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(TAR_FILE)"
|
2011-07-04 08:39:04 -03:00
|
|
|
endif
|
2010-04-16 08:33:31 -07:00
|
|
|
@echo "Please send a release announcement using $(PACKAGE)-$(VERSION).announce as a template."
|
2010-04-05 15:26:08 -07:00
|
|
|
|
2011-07-29 17:45:12 +02:00
|
|
|
.PHONY: pre-release
|
|
|
|
pre-release:
|
|
|
|
$(MAKE) VERSION=$(VERSION) clean
|
|
|
|
$(MAKE) VERSION=$(VERSION) test
|
|
|
|
git tag -s -m "$(PACKAGE) $(VERSION) release" $(UPSTREAM_TAG)
|
|
|
|
git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" $(DEB_TAG)
|
|
|
|
$(MAKE) VERSION=$(VERSION) $(TAR_FILE)
|
|
|
|
ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
|
|
|
|
pristine-tar commit $(DEB_TAR_FILE) $(UPSTREAM_TAG)
|
|
|
|
mkdir -p releases
|
|
|
|
mv $(TAR_FILE) $(DEB_TAR_FILE) releases
|
|
|
|
|
2011-10-12 22:23:33 -03:00
|
|
|
.PHONY: debian-snapshot
|
|
|
|
debian-snapshot:
|
|
|
|
make VERSION=$(VERSION) clean
|
2011-12-17 23:16:51 -04:00
|
|
|
TMPFILE=$$(mktemp /tmp/notmuch.XXXXXX); \
|
|
|
|
cp debian/changelog $${TMPFILE}; \
|
|
|
|
EDITOR=/bin/true dch -b -v $(VERSION)+1 \
|
|
|
|
-D UNRELEASED 'test build, not for upload'; \
|
|
|
|
echo '3.0 (native)' > debian/source/format; \
|
|
|
|
debuild -us -uc; \
|
|
|
|
mv -f $${TMPFILE} debian/changelog; \
|
|
|
|
echo '3.0 (quilt)' > debian/source/format
|
2011-10-12 22:23:33 -03:00
|
|
|
|
2010-04-05 16:37:44 -07:00
|
|
|
.PHONY: release-message
|
|
|
|
release-message:
|
|
|
|
@echo "To: notmuch@notmuchmail.org"
|
|
|
|
@echo "Subject: $(PACKAGE) release $(VERSION) now available"
|
|
|
|
@echo ""
|
2010-04-05 17:24:20 -07:00
|
|
|
@echo "Where to obtain notmuch $(VERSION)"
|
2010-04-05 16:37:44 -07:00
|
|
|
@echo "==========================="
|
|
|
|
@echo " $(RELEASE_URL)/$(TAR_FILE)"
|
|
|
|
@echo ""
|
|
|
|
@echo "Which can be verified with:"
|
|
|
|
@echo ""
|
|
|
|
@echo " $(RELEASE_URL)/$(SHA1_FILE)"
|
|
|
|
@echo -n " "
|
|
|
|
@cat releases/$(SHA1_FILE)
|
|
|
|
@echo ""
|
|
|
|
@echo " $(RELEASE_URL)/$(GPG_FILE)"
|
|
|
|
@echo " (signed by `getent passwd "$$USER" | cut -d: -f 5 | cut -d, -f 1`)"
|
2010-04-05 17:24:20 -07:00
|
|
|
@echo ""
|
|
|
|
@echo "What's new in notmuch $(VERSION)"
|
|
|
|
@echo "========================="
|
2010-04-16 08:31:46 -07:00
|
|
|
@sed -ne '/^[Nn]otmuch $(VERSION)/{n;n;b NEWS}; d; :NEWS /^===/q; {p;n;b NEWS}' < NEWS | head -n -2
|
2010-04-05 17:24:20 -07:00
|
|
|
@echo ""
|
|
|
|
@echo "What is notmuch"
|
|
|
|
@echo "==============="
|
|
|
|
@echo "Notmuch is a system for indexing, searching, reading, and tagging"
|
|
|
|
@echo "large collections of email messages in maildir or mh format. It uses"
|
|
|
|
@echo "the Xapian library to provide fast, full-text search with a convenient"
|
|
|
|
@echo "search syntax."
|
|
|
|
@echo ""
|
|
|
|
@echo "For more about notmuch, see http://notmuchmail.org"
|
|
|
|
|
2010-04-16 13:00:35 -07:00
|
|
|
# This is a chain of dependencies rather than a simple list simply to
|
|
|
|
# avoid the messages getting interleaved in the case of a parallel
|
|
|
|
# make invocation.
|
|
|
|
.PHONY: verify-source-tree-and-version
|
|
|
|
verify-source-tree-and-version: verify-no-dirty-code
|
|
|
|
|
2010-04-15 20:03:30 -07:00
|
|
|
.PHONY: verify-no-dirty-code
|
2012-09-04 17:49:13 +03:00
|
|
|
verify-no-dirty-code: release-checks
|
2010-04-16 11:24:43 -07:00
|
|
|
ifeq ($(IS_GIT),yes)
|
2010-04-15 20:03:30 -07:00
|
|
|
@printf "Checking that source tree is clean..."
|
|
|
|
ifneq ($(shell git ls-files -m),)
|
|
|
|
@echo "No"
|
|
|
|
@echo "The following files have been modified since the most recent git commit:"
|
|
|
|
@echo ""
|
|
|
|
@git ls-files -m
|
|
|
|
@echo ""
|
|
|
|
@echo "The release will be made from the committed state, but perhaps you meant"
|
|
|
|
@echo "to commit this code first? Please clean this up to make it more clear."
|
|
|
|
@false
|
|
|
|
else
|
|
|
|
@echo "Good"
|
|
|
|
endif
|
2010-04-16 11:24:43 -07:00
|
|
|
endif
|
2010-04-05 16:37:44 -07:00
|
|
|
|
2012-09-04 17:49:13 +03:00
|
|
|
.PHONY: release-checks
|
|
|
|
release-checks:
|
|
|
|
devel/release-checks.sh
|
2010-04-05 15:26:08 -07:00
|
|
|
|
2010-04-15 16:23:57 -07:00
|
|
|
.PHONY: verify-newer
|
2010-04-15 16:28:13 -07:00
|
|
|
verify-newer:
|
2010-04-05 15:43:51 -07:00
|
|
|
@echo -n "Checking that no $(VERSION) release already exists..."
|
2011-07-03 15:18:30 -03:00
|
|
|
@wget -q -O /dev/null $(RELEASE_URL)/$(TAR_FILE) ; \
|
|
|
|
case $$? in \
|
|
|
|
8) echo "Good." ;; \
|
|
|
|
0) echo "Ouch."; \
|
|
|
|
echo "Found: $(RELEASE_URL)/$(TAR_FILE)"; \
|
|
|
|
echo "Refusing to replace an existing release."; \
|
|
|
|
echo "Don't forget to update \"version\" as described in RELEASING before release." ; \
|
|
|
|
false ;; \
|
|
|
|
*) echo "An unexpected error occured"; \
|
|
|
|
false;; esac
|
2010-04-05 14:22:00 -07:00
|
|
|
|
2010-03-31 22:12:01 -07:00
|
|
|
# The user has not set any verbosity, default to quiet mode and inform the
|
|
|
|
# user how to enable verbose compiles.
|
|
|
|
ifeq ($(V),)
|
|
|
|
quiet_DOC := "Use \"$(MAKE) V=1\" to see the verbose compile lines.\n"
|
2010-04-06 10:00:30 -07:00
|
|
|
quiet = @printf $(quiet_DOC)$(eval quiet_DOC:=)"$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//'))
|
2010-03-31 22:12:01 -07:00
|
|
|
endif
|
|
|
|
# The user has explicitly enabled quiet compilation.
|
|
|
|
ifeq ($(V),0)
|
2010-04-06 10:00:30 -07:00
|
|
|
quiet = @printf "$1 $@\n"; $($(shell echo $1 | sed -e s'/ .*//'))
|
2010-03-31 22:12:01 -07:00
|
|
|
endif
|
|
|
|
# Otherwise, print the full command line.
|
2010-04-06 10:00:30 -07:00
|
|
|
quiet ?= $($(shell echo $1 | sed -e s'/ .*//'))
|
2010-03-31 22:12:01 -07:00
|
|
|
|
|
|
|
%.o: %.cc $(global_deps)
|
2013-11-03 16:05:35 +02:00
|
|
|
@mkdir -p $(patsubst %/.,%,.deps/$(@D))
|
2013-05-25 22:28:13 -03:00
|
|
|
$(call quiet,CXX $(CPPFLAGS) $(CXXFLAGS)) -c $(FINAL_CXXFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d
|
2010-03-31 22:12:01 -07:00
|
|
|
|
|
|
|
%.o: %.c $(global_deps)
|
2013-11-03 16:05:35 +02:00
|
|
|
@mkdir -p $(patsubst %/.,%,.deps/$(@D))
|
2013-05-25 22:28:13 -03:00
|
|
|
$(call quiet,CC $(CPPFLAGS) $(CFLAGS)) -c $(FINAL_CFLAGS) $< -o $@ -MD -MP -MF .deps/$*.d
|
2010-03-31 22:12:01 -07:00
|
|
|
|
|
|
|
.PHONY : clean
|
|
|
|
clean:
|
2012-08-02 09:27:26 -03:00
|
|
|
rm -rf $(CLEAN); rm -rf .deps
|
2010-03-31 22:12:01 -07:00
|
|
|
|
2010-04-06 14:18:05 -07:00
|
|
|
.PHONY: distclean
|
|
|
|
distclean: clean
|
2012-08-02 09:30:31 -03:00
|
|
|
rm -rf $(DISTCLEAN)
|
2010-04-06 14:18:05 -07:00
|
|
|
|
2009-11-10 12:03:05 -08:00
|
|
|
notmuch_client_srcs = \
|
2011-11-30 16:27:26 -08:00
|
|
|
command-line-arguments.c\
|
2009-11-22 00:44:31 +00:00
|
|
|
debugger.c \
|
|
|
|
gmime-filter-reply.c \
|
2011-12-09 00:48:29 +02:00
|
|
|
hooks.c \
|
2009-11-10 12:03:05 -08:00
|
|
|
notmuch.c \
|
2013-10-02 16:30:47 -04:00
|
|
|
notmuch-compact.c \
|
2009-11-11 17:01:55 -08:00
|
|
|
notmuch-config.c \
|
2009-11-20 23:15:07 -08:00
|
|
|
notmuch-count.c \
|
2009-11-10 12:03:05 -08:00
|
|
|
notmuch-dump.c \
|
2013-06-23 22:20:45 +10:00
|
|
|
notmuch-insert.c \
|
2009-11-10 12:03:05 -08:00
|
|
|
notmuch-new.c \
|
2009-11-06 10:00:38 -08:00
|
|
|
notmuch-reply.c \
|
2009-11-10 12:03:05 -08:00
|
|
|
notmuch-restore.c \
|
|
|
|
notmuch-search.c \
|
|
|
|
notmuch-setup.c \
|
|
|
|
notmuch-show.c \
|
|
|
|
notmuch-tag.c \
|
|
|
|
notmuch-time.c \
|
2012-07-23 12:39:45 +02:00
|
|
|
sprinter-json.c \
|
2012-12-06 22:12:11 +01:00
|
|
|
sprinter-sexp.c \
|
2012-07-23 12:39:45 +02:00
|
|
|
sprinter-text.c \
|
2009-11-06 10:00:38 -08:00
|
|
|
query-string.c \
|
2011-12-24 13:52:44 -05:00
|
|
|
mime-node.c \
|
2012-05-26 11:45:41 -07:00
|
|
|
crypto.c \
|
2012-11-12 21:54:16 -04:00
|
|
|
tag-util.c
|
2009-11-10 12:03:05 -08:00
|
|
|
|
|
|
|
notmuch_client_modules = $(notmuch_client_srcs:.c=.o)
|
2010-04-01 15:03:40 -07:00
|
|
|
|
2012-10-30 22:32:36 +02:00
|
|
|
notmuch: $(notmuch_client_modules) lib/libnotmuch.a util/libutil.a parse-time-string/libparse-time-string.a
|
2010-04-11 19:44:51 -04:00
|
|
|
$(call quiet,CXX $(CFLAGS)) $^ $(FINAL_LIBNOTMUCH_LDFLAGS) -o $@
|
2010-04-01 15:03:40 -07:00
|
|
|
|
2010-04-11 19:44:53 -04:00
|
|
|
notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
|
2010-04-16 11:51:56 -07:00
|
|
|
$(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
|
2009-11-10 07:14:49 -08:00
|
|
|
|
2010-04-05 12:59:06 -07:00
|
|
|
.PHONY: install
|
2011-12-20 16:35:13 -04:00
|
|
|
install: all install-man
|
2011-01-26 23:29:15 +10:00
|
|
|
mkdir -p "$(DESTDIR)$(prefix)/bin/"
|
|
|
|
install notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"
|
2010-03-10 10:48:47 -08:00
|
|
|
ifeq ($(MAKECMDGOALS), install)
|
2010-03-10 10:07:34 -08:00
|
|
|
@echo ""
|
2010-04-06 10:35:20 -07:00
|
|
|
@echo "Notmuch is now installed to $(DESTDIR)$(prefix)"
|
2010-03-10 10:07:34 -08:00
|
|
|
@echo ""
|
2010-06-01 10:46:52 -07:00
|
|
|
@echo "New users should simply run \"notmuch\" to be guided"
|
|
|
|
@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."
|
2011-01-23 14:33:43 +01:00
|
|
|
ifeq ($(WITH_EMACS), 1)
|
2010-06-01 10:46:52 -07:00
|
|
|
@echo ""
|
|
|
|
@echo "Beyond the command-line interface, notmuch also offers"
|
|
|
|
@echo "a full-featured interface for reading and writing mail"
|
|
|
|
@echo "within emacs. To use this, each user should add the"
|
|
|
|
@echo "following line to the ~/.emacs file:"
|
2010-03-10 10:07:34 -08:00
|
|
|
@echo ""
|
2010-04-06 10:35:20 -07:00
|
|
|
@echo " (require 'notmuch)"
|
2010-03-10 10:48:47 -08:00
|
|
|
@echo ""
|
2010-06-01 10:46:52 -07:00
|
|
|
@echo "And then run emacs as \"emacs -f notmuch\" or invoke"
|
|
|
|
@echo "the command \"M-x notmuch\" from within emacs."
|
2010-03-10 10:48:47 -08:00
|
|
|
endif
|
2011-01-23 14:33:43 +01:00
|
|
|
endif
|
2009-11-10 07:14:49 -08:00
|
|
|
|
2010-04-05 12:59:06 -07:00
|
|
|
.PHONY: install-desktop
|
2009-11-22 15:17:11 -06:00
|
|
|
install-desktop:
|
2011-01-26 23:29:15 +10:00
|
|
|
mkdir -p "$(DESTDIR)$(desktop_dir)"
|
|
|
|
desktop-file-install --mode 0644 --dir "$(DESTDIR)$(desktop_dir)" notmuch.desktop
|
2009-11-22 15:17:11 -06:00
|
|
|
|
2009-11-10 12:03:05 -08:00
|
|
|
SRCS := $(SRCS) $(notmuch_client_srcs)
|
2011-12-20 16:35:13 -04:00
|
|
|
CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc
|
2012-01-15 15:20:23 -05:00
|
|
|
|
2012-08-02 09:30:31 -03:00
|
|
|
DISTCLEAN := $(DISTCLEAN) .first-build-message Makefile.config
|
|
|
|
|
2012-01-15 15:20:23 -05:00
|
|
|
DEPS := $(SRCS:%.c=.deps/%.d)
|
|
|
|
DEPS := $(DEPS:%.cc=.deps/%.d)
|
|
|
|
-include $(DEPS)
|
2014-01-25 14:33:55 +02:00
|
|
|
|
|
|
|
.SUFFIXES: # Delete the default suffixes. Old-Fashioned Suffix Rules not used.
|