Revision e8230860 Makefile.am
b/Makefile.am | ||
---|---|---|
1 |
# Ganeti makefile |
|
2 |
# - Indent with tabs only. |
|
3 |
# - Keep files sorted; one line per file. |
|
4 |
# - Directories in lib/ must have their own *dir variable (see hypervisor). |
|
5 |
# - All directories must be listed DIRS. |
|
6 |
# - Use autogen.sh to generate Makefile.in and configure script |
|
7 |
|
|
8 |
# Automake doesn't export these variables before version 1.10. |
|
9 |
abs_top_builddir = @abs_top_builddir@ |
|
10 |
abs_top_srcdir = @abs_top_srcdir@ |
|
11 |
|
|
1 | 12 |
ACLOCAL_AMFLAGS = -I autotools |
13 |
DOCBOOK_WRAPPER = $(top_srcdir)/autotools/docbook-wrapper |
|
14 |
REPLACE_VARS_SED = autotools/replace_vars.sed |
|
15 |
|
|
16 |
hypervisordir = $(pkgpythondir)/hypervisor |
|
17 |
toolsdir = $(pkglibdir)/tools |
|
18 |
docdir = $(datadir)/doc/$(PACKAGE) |
|
19 |
|
|
20 |
DIRS = \ |
|
21 |
autotools \ |
|
22 |
daemons \ |
|
23 |
devel \ |
|
24 |
doc \ |
|
25 |
doc/examples \ |
|
26 |
lib \ |
|
27 |
lib/hypervisor \ |
|
28 |
man \ |
|
29 |
qa \ |
|
30 |
qa/hooks \ |
|
31 |
scripts \ |
|
32 |
test \ |
|
33 |
test/data \ |
|
34 |
tools |
|
35 |
|
|
36 |
CLEANFILES = \ |
|
37 |
autotools/replace_vars.sed \ |
|
38 |
devel/upload \ |
|
39 |
doc/*.html \ |
|
40 |
doc/*.in \ |
|
41 |
doc/*.pdf \ |
|
42 |
doc/examples/ganeti.initd \ |
|
43 |
doc/examples/ganeti.cron \ |
|
44 |
lib/*.py[co] \ |
|
45 |
lib/hypervisor/*.py[co] \ |
|
46 |
man/*.[78] \ |
|
47 |
man/*.in \ |
|
48 |
qa/*.py[co] \ |
|
49 |
qa/hooks/*.py[co] \ |
|
50 |
test/*.py[co] \ |
|
51 |
stamp-directories \ |
|
52 |
$(nodist_pkgpython_PYTHON) |
|
53 |
|
|
54 |
nodist_pkgpython_PYTHON = \ |
|
55 |
lib/_autoconf.py |
|
56 |
|
|
57 |
pkgpython_PYTHON = \ |
|
58 |
lib/__init__.py \ |
|
59 |
lib/backend.py \ |
|
60 |
lib/bdev.py \ |
|
61 |
lib/bootstrap.py \ |
|
62 |
lib/cli.py \ |
|
63 |
lib/cmdlib.py \ |
|
64 |
lib/config.py \ |
|
65 |
lib/constants.py \ |
|
66 |
lib/errors.py \ |
|
67 |
lib/jqueue.py \ |
|
68 |
lib/locking.py \ |
|
69 |
lib/logger.py \ |
|
70 |
lib/luxi.py \ |
|
71 |
lib/mcpu.py \ |
|
72 |
lib/objects.py \ |
|
73 |
lib/opcodes.py \ |
|
74 |
lib/rpc.py \ |
|
75 |
lib/serializer.py \ |
|
76 |
lib/ssconf.py \ |
|
77 |
lib/ssh.py \ |
|
78 |
lib/utils.py |
|
79 |
|
|
80 |
hypervisor_PYTHON = \ |
|
81 |
lib/hypervisor/__init__.py \ |
|
82 |
lib/hypervisor/hv_base.py \ |
|
83 |
lib/hypervisor/hv_fake.py \ |
|
84 |
lib/hypervisor/hv_xen.py |
|
85 |
|
|
86 |
docsgml = \ |
|
87 |
doc/hooks.sgml \ |
|
88 |
doc/install.sgml \ |
|
89 |
doc/admin.sgml \ |
|
90 |
doc/iallocator.sgml |
|
91 |
|
|
92 |
doc_DATA = \ |
|
93 |
$(patsubst %.sgml,%.html,$(docsgml)) \ |
|
94 |
$(patsubst %.sgml,%.pdf,$(docsgml)) |
|
95 |
|
|
96 |
dist_sbin_SCRIPTS = \ |
|
97 |
daemons/ganeti-noded \ |
|
98 |
daemons/ganeti-watcher \ |
|
99 |
daemons/ganeti-master \ |
|
100 |
daemons/ganeti-masterd \ |
|
101 |
scripts/gnt-backup \ |
|
102 |
scripts/gnt-cluster \ |
|
103 |
scripts/gnt-debug \ |
|
104 |
scripts/gnt-instance \ |
|
105 |
scripts/gnt-job \ |
|
106 |
scripts/gnt-node \ |
|
107 |
scripts/gnt-os |
|
108 |
|
|
109 |
dist_tools_SCRIPTS = \ |
|
110 |
tools/burnin \ |
|
111 |
tools/cfgshell \ |
|
112 |
tools/cfgupgrade \ |
|
113 |
tools/lvmstrap |
|
114 |
|
|
115 |
EXTRA_DIST = \ |
|
116 |
NEWS \ |
|
117 |
DEVNOTES \ |
|
118 |
autotools/docbook-wrapper \ |
|
119 |
devel/upload.in \ |
|
120 |
$(docsgml) \ |
|
121 |
doc/examples/ganeti.initd.in \ |
|
122 |
doc/examples/ganeti.cron.in \ |
|
123 |
doc/examples/dumb-allocator \ |
|
124 |
qa/hooks/datehook.py \ |
|
125 |
qa/hooks/loghook.py \ |
|
126 |
test/testutils.py \ |
|
127 |
test/mocks.py \ |
|
128 |
$(dist_TESTS) \ |
|
129 |
$(TEST_FILES) \ |
|
130 |
man/footer.sgml \ |
|
131 |
$(mansgml) \ |
|
132 |
qa/ganeti-qa.py \ |
|
133 |
qa/qa-sample.yaml \ |
|
134 |
qa/qa_cluster.py \ |
|
135 |
qa/qa_config.py \ |
|
136 |
qa/qa_daemon.py \ |
|
137 |
qa/qa_env.py \ |
|
138 |
qa/qa_error.py \ |
|
139 |
qa/qa_instance.py \ |
|
140 |
qa/qa_node.py \ |
|
141 |
qa/qa_os.py \ |
|
142 |
qa/qa_other.py \ |
|
143 |
qa/qa_tags.py \ |
|
144 |
qa/qa_utils.py |
|
145 |
|
|
146 |
man_MANS = \ |
|
147 |
man/ganeti.7 \ |
|
148 |
man/ganeti-master.8 \ |
|
149 |
man/ganeti-noded.8 \ |
|
150 |
man/ganeti-os-interface.7 \ |
|
151 |
man/ganeti-watcher.8 \ |
|
152 |
man/gnt-backup.8 \ |
|
153 |
man/gnt-cluster.8 \ |
|
154 |
man/gnt-instance.8 \ |
|
155 |
man/gnt-node.8 \ |
|
156 |
man/gnt-os.8 |
|
157 |
|
|
158 |
maninput = $(patsubst %.7,%.in,$(patsubst %.8,%.in,$(man_MANS))) |
|
159 |
mansgml = $(patsubst %.in,%.sgml,$(maninput)) |
|
160 |
|
|
161 |
TEST_FILES = \ |
|
162 |
test/data/bdev-both.txt \ |
|
163 |
test/data/bdev-disk.txt \ |
|
164 |
test/data/bdev-net.txt \ |
|
165 |
test/data/proc_drbd8.txt |
|
166 |
|
|
167 |
dist_TESTS = \ |
|
168 |
test/ganeti.config_unittest.py \ |
|
169 |
test/ganeti.hooks_unittest.py \ |
|
170 |
test/ganeti.utils_unittest.py \ |
|
171 |
test/ganeti.bdev_unittest.py \ |
|
172 |
test/ganeti.ssh_unittest.py \ |
|
173 |
test/ganeti.locking_unittest.py \ |
|
174 |
test/ganeti.constants_unittest.py |
|
175 |
|
|
176 |
nodist_TESTS = |
|
177 |
|
|
178 |
TESTS = $(dist_TESTS) $(nodist_TESTS) |
|
179 |
|
|
180 |
TESTS_ENVIRONMENT = PYTHONPATH=.:$(top_builddir) |
|
181 |
|
|
2 | 182 |
|
3 |
SUBDIRS = man lib scripts daemons doc test tools qa devel |
|
4 |
EXTRA_DIST = NEWS DEVNOTES |
|
183 |
all-local: stamp-directories lib/_autoconf.py devel/upload \ |
|
184 |
doc/examples/ganeti.initd doc/examples/ganeti.cron |
|
185 |
|
|
186 |
devel/upload: devel/upload.in stamp-directories $(REPLACE_VARS_SED) |
|
187 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
|
188 |
chmod u+x $@ |
|
189 |
|
|
190 |
doc/examples/ganeti.%: doc/examples/ganeti.%.in stamp-directories \ |
|
191 |
$(REPLACE_VARS_SED) |
|
192 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
|
193 |
|
|
194 |
doc/%.in: doc/%.sgml stamp-directories $(REPLACE_VARS_SED) |
|
195 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
|
196 |
|
|
197 |
man/%.in: man/%.sgml stamp-directories $(REPLACE_VARS_SED) |
|
198 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
|
199 |
|
|
200 |
doc/%.pdf: doc/%.in $(DOCBOOK_WRAPPER) |
|
201 |
$(DOCBOOK_WRAPPER) $< $@ |
|
202 |
|
|
203 |
doc/%.html: doc/%.in $(DOCBOOK_WRAPPER) |
|
204 |
$(DOCBOOK_WRAPPER) $< $@ |
|
205 |
|
|
206 |
man/%.7: man/%.in man/footer.sgml $(DOCBOOK_WRAPPER) |
|
207 |
$(DOCBOOK_WRAPPER) $< $@ |
|
208 |
|
|
209 |
man/%.8: man/%.in man/footer.sgml $(DOCBOOK_WRAPPER) |
|
210 |
$(DOCBOOK_WRAPPER) $< $@ |
|
211 |
|
|
212 |
man/footer.sgml $(TESTS): srclinks |
|
213 |
|
|
214 |
$(TESTS): ganeti |
|
215 |
|
|
216 |
lib/_autoconf.py: Makefile stamp-directories |
|
217 |
set -e; \ |
|
218 |
{ echo '# This file is automatically generated, do not edit!'; \ |
|
219 |
echo '#'; \ |
|
220 |
echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \ |
|
221 |
echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \ |
|
222 |
echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \ |
|
223 |
echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \ |
|
224 |
echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \ |
|
225 |
echo "VERSION_FULL = '$(VERSION_FULL)'"; \ |
|
226 |
echo "LOCALSTATEDIR = '$(localstatedir)'"; \ |
|
227 |
echo "SYSCONFDIR = '$(sysconfdir)'"; \ |
|
228 |
echo "SSH_INITD_SCRIPT = '$(SSH_INITD_SCRIPT)'"; \ |
|
229 |
echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \ |
|
230 |
echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \ |
|
231 |
echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \ |
|
232 |
echo "XEN_INITRD = '$(XEN_INITRD)'"; \ |
|
233 |
echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \ |
|
234 |
echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \ |
|
235 |
} > $@ |
|
236 |
|
|
237 |
$(REPLACE_VARS_SED): Makefile stamp-directories |
|
238 |
set -e; \ |
|
239 |
{ echo 's#@PREFIX@#$(prefix)#g'; \ |
|
240 |
echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \ |
|
241 |
echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \ |
|
242 |
echo 's#@SBINDIR@#$(sbindir)#g'; \ |
|
243 |
echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \ |
|
244 |
echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \ |
|
245 |
echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \ |
|
246 |
echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \ |
|
247 |
} > $@ |
|
248 |
|
|
249 |
# We need to create symlinks because "make distcheck" will not install Python |
|
250 |
# files when building. |
|
251 |
#.PHONY: srclinks |
|
252 |
srclinks: stamp-directories |
|
253 |
set -e; \ |
|
254 |
for i in man/footer.sgml $(pkgpython_PYTHON) $(hypervisor_PYTHON); do \ |
|
255 |
if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \ |
|
256 |
$(LN_S) $(abs_top_srcdir)/$$i $$i; \ |
|
257 |
fi; \ |
|
258 |
done |
|
5 | 259 |
|
6 | 260 |
.PHONY: ganeti |
7 | 261 |
ganeti: |
8 | 262 |
cd $(top_builddir) && rm -f $@ && $(LN_S) lib $@ |
9 | 263 |
|
10 |
pre-check: ganeti |
|
11 |
$(MAKE) -C lib $@ |
|
12 |
$(MAKE) -C lib/hypervisor $@ |
|
13 |
|
|
14 | 264 |
# a dist hook rule for catching revision control directories |
15 | 265 |
distcheck-hook: |
16 | 266 |
if find $(top_distdir) | grep -F -e '.svn' -e '.git'; then \ |
... | ... | |
18 | 268 |
exit 1; \ |
19 | 269 |
fi |
20 | 270 |
|
21 |
# custom rules |
|
22 |
depgraph: depgraph.png |
|
23 |
|
|
24 |
depgraph.png: depgraph.dot |
|
25 |
dot -Tpng -o $@ $< |
|
26 |
|
|
27 |
depgraph.ps: depgraph.dot |
|
28 |
dot -Tps -o $@ $< |
|
29 |
|
|
30 |
depgraph.dot: ganeti/*.py |
|
31 |
pylint.python2.4 --indent-string ' ' --rcfile=/dev/null \ |
|
32 |
--reports y --int-import-graph $@ --persistent n ganeti >/dev/null |
|
33 |
|
|
34 | 271 |
install-exec-local: |
35 |
@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \ |
|
272 |
@mkdir_p@ -- "$(DESTDIR)${localstatedir}/lib/ganeti" \
|
|
36 | 273 |
"$(DESTDIR)${localstatedir}/log/ganeti" \ |
37 | 274 |
"$(DESTDIR)${localstatedir}/run/ganeti" |
275 |
|
|
276 |
stamp-directories: Makefile |
|
277 |
@mkdir_p@ $(DIRS) |
|
278 |
touch $@ |
|
279 |
|
|
280 |
# vim: set noet : |
Also available in: Unified diff