-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
133 lines (96 loc) · 2.81 KB
/
Makefile
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
PREFIX ?= /usr/local/cyruslibs-fastmail-v1
ICU_RELEASE := release-55-1
ICU_SVN_URL := http://source.icu-project.org/repos/icu/icu/tags/$(ICU_RELEASE)/
ICU_SRCDIR := icu/$(ICU_RELEASE)/source
ICU_BUILDDIR := icu-build
LIBICAL_SRCDIR := libical
LIBICAL_BUILDDIR := libical-build
OPENDKIM_SRCDIR := opendkim
OPENDKIM_BUILDDIR := opendkim-build
# top level rules
.PHONY: all update build install clean
all: build
update: update-icu update-libical update-opendkim
build: icu libical opendkim
install: install-icu install-libical install-opendkim
clean: clean-icu clean-libical clean-opendkim
#
# we get icu from subversion
#
.PHONY: icu update-icu force-update-icu install-icu clean-icu
force-update-icu:
rm -f .icu.updated
update-icu: force-update-icu .icu.updated
icu: .icu.built
install-icu: .icu.installed
clean-icu:
rm -fr $(ICU_BUILDDIR) .icu.built
$(ICU_SRCDIR):
mkdir -p icu
(cd icu && svn co $(ICU_SVN_URL))
.icu.updated: | $(ICU_SRCDIR)
(cd icu/$(ICU_RELEASE) && svn update)
touch $@
.icu.built: .icu.updated
( mkdir -p $(ICU_BUILDDIR) && \
cd $(ICU_BUILDDIR) && \
../$(ICU_SRCDIR)/configure --prefix=$(PREFIX) && \
make )
touch $@
.icu.installed: .icu.built
( cd $(ICU_BUILDDIR) && sudo make install )
touch $@
#
# we get libical from a git submodule
#
.PHONY: libical update-libical force-update-libical install-libical clean-libical
force-update-libical:
rm -f .libical.updated
update-libical: force-update-libical .libical.updated
libical: .libical.built
install-libical: .libical.installed
clean-libical:
( cd $(LIBICAL_SRCDIR) && \
git clean -xfd )
rm -fr $(LIBICAL_BUILDDIR) .libical.built
.libical.updated:
git submodule update --remote $(LIBICAL_SRCDIR)
touch $@
.libical.built: .libical.updated
( mkdir -p $(LIBICAL_BUILDDIR) && \
cd $(LIBICAL_BUILDDIR) && \
cmake -DCMAKE_INSTALL_PREFIX=$(PREFIX) ../$(LIBICAL_SRCDIR) && \
make )
touch $@
.libical.installed: .libical.built
( cd $(LIBICAL_BUILDDIR) && \
sudo make install )
touch $@
#
# we get opendkim from a git submodule
#
.PHONY: opendkim update-opendkim force-update-opendkim install-opendkim clean-opendkim
force-update-opendkim:
rm -f .opendkim.updated
update-opendkim: force-update-opendkim .opendkim.updated
opendkim: .opendkim.built
install-opendkim: .opendkim.installed
clean-opendkim:
( cd $(OPENDKIM_SRCDIR) && \
git clean -xfd )
rm -fr $(OPENDKIM_BUILDDIR) .opendkim.built
.opendkim.updated:
git submodule update --remote $(OPENDKIM_SRCDIR)
( cd $(OPENDKIM_SRCDIR) && \
autoreconf -is )
touch $@
.opendkim.built: .opendkim.updated
( mkdir -p $(OPENDKIM_BUILDDIR) && \
cd $(OPENDKIM_BUILDDIR) && \
../$(OPENDKIM_SRCDIR)/configure --enable-silent-rules --prefix=$(PREFIX) && \
make )
touch $@
.opendkim.installed: .opendkim.built
( cd $(OPENDKIM_BUILDDIR) && \
sudo make install )
touch $@