-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.am
98 lines (81 loc) · 2.72 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
aclocaldir = $(datadir)/aclocal
SUBDIRS = \
. \
src \
doc
dist_pkginclude_HEADERS = \
dovecot-version.h
EXTRA_DIST = \
COPYING.LGPL \
COPYING.MIT \
ChangeLog \
is-tagged.py \
run-test.sh \
cc-wrapper.sh.in \
update-version.sh \
$(conf_DATA)
noinst_DATA = dovecot-config
nodist_pkginclude_HEADERS = config.h
if MAINTAINER_MODE
ChangeLog: .hg/dirstate
hg log -r tip:fef8259e7277 --style=changelog > ChangeLog
endif
aclocal_DATA = dovecot.m4
dovecot-version.h: noop
$(SHELL) $(top_srcdir)/update-version.sh $(top_srcdir) $(top_builddir)
noop:
dovecot-config: dovecot-config.in Makefile
old=`pwd` && cd $(top_builddir) && abs_builddir=`pwd` && cd $$old && \
cd $(top_srcdir) && abs_srcdir=`pwd` && cd $$old && \
cat dovecot-config.in | sed \
-e "s|\$$(top_builddir)|$$abs_builddir|g" \
-e "s|\$$(incdir)|$$abs_srcdir|g" \
-e "s|\$$(LIBICONV)|$(LIBICONV)|g" \
-e "s|\$$(MODULE_LIBS)|$(MODULE_LIBS)|g" \
-e "s|^\(dovecot_pkgincludedir\)=|\1=$(pkgincludedir)|" \
-e "s|^\(dovecot_pkglibdir\)=|\1=$(pkglibdir)|" \
-e "s|^\(dovecot_pkglibexecdir\)=|\1=$(libexecdir)/dovecot|" \
-e "s|^\(dovecot_docdir\)=|\1=$(docdir)|" \
-e "s|^\(dovecot_moduledir\)=|\1=$(moduledir)|" \
> dovecot-config
if HAVE_SYSTEMD
%.service: %.service.in
$(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
systemdsystemunit_DATA = \
dovecot.socket \
dovecot.service
else
EXTRA_DIST += dovecot.socket dovecot.service.in
endif
install-exec-hook:
$(mkdir_p) $(DESTDIR)$(pkglibdir); \
grep -v '^LIBDOVECOT_.*_INCLUDE' dovecot-config | \
grep -v '^LIBDOVECOT.*_DEPS' | sed \
-e "s|^\(LIBDOVECOT\)=.*$$|\1='-L$(pkglibdir) -ldovecot'|" \
-e "s|^\(LIBDOVECOT_LOGIN\)=.*$$|\1='-ldovecot-login $(SSL_LIBS)'|" \
-e "s|^\(LIBDOVECOT_SQL\)=.*$$|\1=-ldovecot-sql|" \
-e "s|^\(LIBDOVECOT_COMPRESS\)=.*$$|\1=-ldovecot-compression|" \
-e "s|^\(LIBDOVECOT_LDA\)=.*$$|\1=-ldovecot-lda|" \
-e "s|^\(LIBDOVECOT_STORAGE\)=.*$$|\1='-ldovecot-storage $(LINKED_STORAGE_LDADD)'|" \
-e "s|^\(LIBDOVECOT_INCLUDE\)=.*$$|\1=-I$(pkgincludedir)|" \
> $(DESTDIR)$(pkglibdir)/dovecot-config
uninstall-hook:
rm $(DESTDIR)$(pkglibdir)/dovecot-config
CLEANFILES = $(datafiles)
if HAVE_SYSTEMD
CLEANFILES += $systedmsystemunit_DATA
endif
DISTCLEANFILES = \
$(top_builddir)/dovecot-version.h \
$(top_builddir)/dovecot-config
distcheck-hook:
if which scan-build > /dev/null; then \
cd $(distdir)/_build; \
scan-build -o scan-reports ../configure --with-ldap=auto --with-pgsql=auto --with-mysql=auto --with-sqlite=auto --with-solr=auto --with-gssapi=auto --with-libwrap=auto; \
rm -rf scan-reports; \
scan-build -o scan-reports make 2>&1 || exit 1; \
if ! rmdir scan-reports 2>/dev/null; then \
exit 1; \
fi; \
cd ../..; rm -rf $(distdir)/_build/*; \
fi