]> git.notmuchmail.org Git - notmuch/blob - Makefile.global
lib/database: delete stemmer on destroy
[notmuch] / Makefile.global
1 # -*- makefile-gmake -*-
2 # Here's the (hopefully simple) versioning scheme.
3 #
4 # Releases of notmuch have a two-digit version (0.1, 0.2, etc.). We
5 # increment the second digit for each release and increment the first
6 # digit when we reach particularly major milestones of usability.
7 #
8 # Between releases, (such as when compiling notmuch from the git
9 # repository), we let git append identification of the actual commit.
10 PACKAGE=notmuch
11
12 IS_GIT:=$(if $(wildcard ${srcdir}/.git),yes,no)
13
14 ifeq ($(IS_GIT),yes)
15 DATE:=$(shell git --git-dir=${srcdir}/.git log --date=short -1 --pretty=format:%cd)
16 else
17 DATE:=$(shell date +%F)
18 endif
19
20 VERSION:=$(shell cat ${srcdir}/version.txt)
21 ELPA_VERSION:=$(subst ~,_,$(VERSION))
22 ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
23 ifeq ($(IS_GIT),yes)
24 VERSION:=$(shell git --git-dir=${srcdir}/.git describe --abbrev=7 --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
25 # drop the ~g$sha1 part
26 ELPA_VERSION:=$(word 1,$(subst ~, ,$(VERSION)))
27 # convert git version to package.el friendly form
28 ELPA_VERSION:=$(subst +,snapshot,$(ELPA_VERSION))
29
30 # Write the file 'version.stamp' in case its contents differ from $(VERSION)
31 FILE_VERSION:=$(shell test -f version.stamp && read vs < version.stamp || vs=; echo $$vs)
32 ifneq ($(FILE_VERSION),$(VERSION))
33        $(shell echo "$(VERSION)" > version.stamp)
34 endif
35 endif
36 endif
37
38 UPSTREAM_TAG=$(subst ~,_,$(VERSION))
39
40 RELEASE_HOST=notmuchmail.org
41 RELEASE_DIR=/srv/notmuchmail.org/www/releases
42 DOC_DIR=/srv/notmuchmail.org/www/doc/latest
43 RELEASE_URL=https://notmuchmail.org/releases
44 TAR_FILE=$(PACKAGE)-$(VERSION).tar.xz
45 ELPA_FILE:=$(PACKAGE)-emacs-$(ELPA_VERSION).tar
46 DEB_TAR_FILE=$(PACKAGE)_$(VERSION).orig.tar.xz
47 SHA256_FILE=$(TAR_FILE).sha256.asc
48 DETACHED_SIG_FILE=$(TAR_FILE).asc
49
50 PV_FILE=bindings/python/notmuch/version.py
51
52 # Smash together user's values with our extra values
53 FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(WARN_CFLAGS) $(extra_cflags) $(CPPFLAGS) $(CONFIGURE_CFLAGS) $(CFLAGS)
54 FINAL_CXXFLAGS = $(WARN_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) $(CPPFLAGS) $(CONFIGURE_CXXFLAGS) $(CXXFLAGS)
55 FINAL_NOTMUCH_LDFLAGS = -Lutil -lnotmuch_util -Llib -lnotmuch $(LDFLAGS)
56 ifeq ($(LIBDIR_IN_LDCONFIG),0)
57 FINAL_NOTMUCH_LDFLAGS += $(RPATH_LDFLAGS)
58 endif
59 FINAL_NOTMUCH_LDFLAGS += $(AS_NEEDED_LDFLAGS) $(GMIME_LDFLAGS) $(TALLOC_LDFLAGS) $(ZLIB_LDFLAGS)
60 FINAL_NOTMUCH_LINKER = CC
61 ifneq ($(LINKER_RESOLVES_LIBRARY_DEPENDENCIES),1)
62 FINAL_NOTMUCH_LDFLAGS += $(CONFIGURE_LDFLAGS)
63 FINAL_NOTMUCH_LINKER = CXX
64 endif
65 FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS)