root / Makefile.am @ 989a8bee
History | View | Annotate | Download (17.3 kB)
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 |
|
12 |
ACLOCAL_AMFLAGS = -I autotools |
13 |
DOCBOOK_WRAPPER = $(top_srcdir)/autotools/docbook-wrapper |
14 |
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion |
15 |
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir |
16 |
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code |
17 |
CHECK_MAN = $(top_srcdir)/autotools/check-man |
18 |
REPLACE_VARS_SED = autotools/replace_vars.sed |
19 |
|
20 |
hypervisordir = $(pkgpythondir)/hypervisor |
21 |
httpdir = $(pkgpythondir)/http |
22 |
masterddir = $(pkgpythondir)/masterd |
23 |
confddir = $(pkgpythondir)/confd |
24 |
rapidir = $(pkgpythondir)/rapi |
25 |
impexpddir = $(pkgpythondir)/impexpd |
26 |
toolsdir = $(pkglibdir)/tools |
27 |
docdir = $(datadir)/doc/$(PACKAGE) |
28 |
|
29 |
# Delete output file if an error occurred while building it |
30 |
.DELETE_ON_ERROR: |
31 |
|
32 |
DIRS = \ |
33 |
autotools \ |
34 |
daemons \ |
35 |
devel \ |
36 |
doc \ |
37 |
doc/examples \ |
38 |
doc/examples/hooks \ |
39 |
doc/examples/gnt-debug \ |
40 |
lib \ |
41 |
lib/build \ |
42 |
lib/confd \ |
43 |
lib/http \ |
44 |
lib/hypervisor \ |
45 |
lib/impexpd \ |
46 |
lib/masterd \ |
47 |
lib/rapi \ |
48 |
man \ |
49 |
qa \ |
50 |
scripts \ |
51 |
test \ |
52 |
test/data \ |
53 |
tools |
54 |
|
55 |
BUILDTIME_DIRS = \ |
56 |
doc/api \ |
57 |
doc/coverage \ |
58 |
doc/html |
59 |
|
60 |
DIRCHECK_EXCLUDE = \ |
61 |
$(BUILDTIME_DIRS) \ |
62 |
ganeti-[0-9]*.[0-9]*.[0-9]* \ |
63 |
doc/html/_* |
64 |
|
65 |
MAINTAINERCLEANFILES = \ |
66 |
$(docpng) \ |
67 |
$(maninput) \ |
68 |
doc/install-quick.rst \ |
69 |
doc/news.rst |
70 |
|
71 |
maintainer-clean-local: |
72 |
rm -rf $(BUILDTIME_DIRS) |
73 |
|
74 |
CLEANFILES = \ |
75 |
$(addsuffix /*.py[co],$(DIRS)) \ |
76 |
autotools/replace_vars.sed \ |
77 |
daemons/daemon-util \ |
78 |
daemons/ensure-dirs \ |
79 |
daemons/ganeti-cleaner \ |
80 |
devel/upload \ |
81 |
doc/examples/bash_completion \ |
82 |
doc/examples/ganeti.initd \ |
83 |
doc/examples/ganeti.cron \ |
84 |
doc/examples/gnt-config-backup \ |
85 |
doc/examples/hooks/ipsec \ |
86 |
$(man_MANS) \ |
87 |
$(manhtml) \ |
88 |
stamp-directories \ |
89 |
stamp-srclinks \ |
90 |
$(nodist_pkgpython_PYTHON) |
91 |
|
92 |
BUILT_SOURCES = \ |
93 |
ganeti \ |
94 |
stamp-srclinks \ |
95 |
stamp-directories \ |
96 |
lib/_autoconf.py |
97 |
|
98 |
nodist_pkgpython_PYTHON = \ |
99 |
lib/_autoconf.py |
100 |
|
101 |
noinst_PYTHON = \ |
102 |
lib/build/__init__.py |
103 |
|
104 |
pkgpython_PYTHON = \ |
105 |
lib/__init__.py \ |
106 |
lib/asyncnotifier.py \ |
107 |
lib/backend.py \ |
108 |
lib/bdev.py \ |
109 |
lib/bootstrap.py \ |
110 |
lib/cli.py \ |
111 |
lib/cmdlib.py \ |
112 |
lib/compat.py \ |
113 |
lib/config.py \ |
114 |
lib/constants.py \ |
115 |
lib/daemon.py \ |
116 |
lib/errors.py \ |
117 |
lib/jqueue.py \ |
118 |
lib/jstore.py \ |
119 |
lib/locking.py \ |
120 |
lib/luxi.py \ |
121 |
lib/mcpu.py \ |
122 |
lib/netutils.py \ |
123 |
lib/objects.py \ |
124 |
lib/opcodes.py \ |
125 |
lib/rpc.py \ |
126 |
lib/serializer.py \ |
127 |
lib/ssconf.py \ |
128 |
lib/ssh.py \ |
129 |
lib/storage.py \ |
130 |
lib/utils.py \ |
131 |
lib/uidpool.py \ |
132 |
lib/workerpool.py |
133 |
|
134 |
hypervisor_PYTHON = \ |
135 |
lib/hypervisor/__init__.py \ |
136 |
lib/hypervisor/hv_base.py \ |
137 |
lib/hypervisor/hv_chroot.py \ |
138 |
lib/hypervisor/hv_fake.py \ |
139 |
lib/hypervisor/hv_kvm.py \ |
140 |
lib/hypervisor/hv_lxc.py \ |
141 |
lib/hypervisor/hv_xen.py |
142 |
|
143 |
rapi_PYTHON = \ |
144 |
lib/rapi/__init__.py \ |
145 |
lib/rapi/baserlib.py \ |
146 |
lib/rapi/client.py \ |
147 |
lib/rapi/client_utils.py \ |
148 |
lib/rapi/connector.py \ |
149 |
lib/rapi/rlib2.py |
150 |
|
151 |
http_PYTHON = \ |
152 |
lib/http/__init__.py \ |
153 |
lib/http/auth.py \ |
154 |
lib/http/client.py \ |
155 |
lib/http/server.py |
156 |
|
157 |
confd_PYTHON = \ |
158 |
lib/confd/__init__.py \ |
159 |
lib/confd/client.py \ |
160 |
lib/confd/querylib.py \ |
161 |
lib/confd/server.py |
162 |
|
163 |
masterd_PYTHON = \ |
164 |
lib/masterd/__init__.py \ |
165 |
lib/masterd/instance.py |
166 |
|
167 |
impexpd_PYTHON = \ |
168 |
lib/impexpd/__init__.py |
169 |
|
170 |
docrst = \ |
171 |
doc/admin.rst \ |
172 |
doc/design-2.0.rst \ |
173 |
doc/design-2.1.rst \ |
174 |
doc/design-2.2.rst \ |
175 |
doc/cluster-merge.rst \ |
176 |
doc/devnotes.rst \ |
177 |
doc/glossary.rst \ |
178 |
doc/hooks.rst \ |
179 |
doc/iallocator.rst \ |
180 |
doc/index.rst \ |
181 |
doc/install-quick.rst \ |
182 |
doc/install.rst \ |
183 |
doc/locking.rst \ |
184 |
doc/move-instance.rst \ |
185 |
doc/news.rst \ |
186 |
doc/rapi.rst \ |
187 |
doc/security.rst \ |
188 |
doc/walkthrough.rst |
189 |
|
190 |
doc/html/.stamp: $(docrst) $(docpng) doc/conf.py configure.ac |
191 |
@test -n "$(SPHINX)" || \ |
192 |
{ echo 'sphinx-build' not found during configure; exit 1; } |
193 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \ |
194 |
-d . \ |
195 |
-D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \ |
196 |
-D release="$(PACKAGE_VERSION)" \ |
197 |
$(abs_top_srcdir)/doc $(CURDIR)/doc/html |
198 |
rm -f doc/html/.buildinfo doc/html/objects.inv |
199 |
touch $@ |
200 |
|
201 |
doc/html: doc/html/.stamp |
202 |
|
203 |
doc/news.rst: NEWS |
204 |
set -e; \ |
205 |
{ echo '.. This file is automatically updated at build time from $<.'; \ |
206 |
echo '.. Do not edit.'; \ |
207 |
echo; \ |
208 |
cat $<; \ |
209 |
} > $@ |
210 |
|
211 |
doc/install-quick.rst: INSTALL |
212 |
set -e; \ |
213 |
{ echo '.. This file is automatically updated at build time from $<.'; \ |
214 |
echo '.. Do not edit.'; \ |
215 |
echo; \ |
216 |
cat $<; \ |
217 |
} > $@ |
218 |
|
219 |
docdot = \ |
220 |
doc/arch-2.0.dot \ |
221 |
doc/design-2.1-lock-acquire.dot \ |
222 |
doc/design-2.1-lock-release.dot |
223 |
|
224 |
docpng = $(patsubst %.dot,%.png,$(docdot)) |
225 |
|
226 |
# Things to build but not to install (add it to EXTRA_DIST if it should be |
227 |
# distributed) |
228 |
noinst_DATA = \ |
229 |
devel/upload \ |
230 |
doc/html \ |
231 |
doc/examples/bash_completion \ |
232 |
doc/examples/ganeti.cron \ |
233 |
doc/examples/ganeti.initd \ |
234 |
doc/examples/gnt-config-backup \ |
235 |
doc/examples/hooks/ipsec \ |
236 |
$(manhtml) |
237 |
|
238 |
gnt_scripts = \ |
239 |
scripts/gnt-backup \ |
240 |
scripts/gnt-cluster \ |
241 |
scripts/gnt-debug \ |
242 |
scripts/gnt-instance \ |
243 |
scripts/gnt-job \ |
244 |
scripts/gnt-node \ |
245 |
scripts/gnt-os |
246 |
|
247 |
dist_sbin_SCRIPTS = \ |
248 |
daemons/ganeti-noded \ |
249 |
daemons/ganeti-watcher \ |
250 |
daemons/ganeti-masterd \ |
251 |
daemons/ganeti-confd \ |
252 |
daemons/ganeti-rapi \ |
253 |
$(gnt_scripts) |
254 |
|
255 |
nodist_sbin_SCRIPTS = \ |
256 |
daemons/ganeti-cleaner |
257 |
|
258 |
dist_tools_SCRIPTS = \ |
259 |
tools/burnin \ |
260 |
tools/cfgshell \ |
261 |
tools/cfgupgrade \ |
262 |
tools/cfgupgrade12 \ |
263 |
tools/cluster-merge \ |
264 |
tools/lvmstrap \ |
265 |
tools/move-instance \ |
266 |
tools/sanitize-config |
267 |
|
268 |
pkglib_python_scripts = \ |
269 |
daemons/import-export \ |
270 |
tools/check-cert-expired |
271 |
|
272 |
pkglib_SCRIPTS = \ |
273 |
daemons/daemon-util \ |
274 |
daemons/ensure-dirs \ |
275 |
$(pkglib_python_scripts) |
276 |
|
277 |
EXTRA_DIST = \ |
278 |
NEWS \ |
279 |
pylintrc \ |
280 |
autotools/build-bash-completion \ |
281 |
autotools/check-python-code \ |
282 |
autotools/check-man \ |
283 |
autotools/docbook-wrapper \ |
284 |
autotools/gen-coverage \ |
285 |
autotools/testrunner \ |
286 |
$(RUN_IN_TEMPDIR) \ |
287 |
daemons/daemon-util.in \ |
288 |
daemons/ensure-dirs.in \ |
289 |
daemons/ganeti-cleaner.in \ |
290 |
$(pkglib_python_scripts) \ |
291 |
devel/upload.in \ |
292 |
$(docdot) \ |
293 |
$(docpng) \ |
294 |
$(docrst) \ |
295 |
doc/conf.py \ |
296 |
doc/html \ |
297 |
doc/examples/ganeti.initd.in \ |
298 |
doc/examples/ganeti.cron.in \ |
299 |
doc/examples/gnt-config-backup.in \ |
300 |
doc/examples/dumb-allocator \ |
301 |
doc/examples/ganeti.default \ |
302 |
doc/examples/ganeti.default-debug \ |
303 |
doc/examples/hooks/ethers \ |
304 |
doc/examples/hooks/ipsec.in \ |
305 |
doc/examples/gnt-debug/README \ |
306 |
doc/examples/gnt-debug/delay0.json \ |
307 |
doc/examples/gnt-debug/delay50.json \ |
308 |
test/testutils.py \ |
309 |
test/mocks.py \ |
310 |
$(dist_TESTS) \ |
311 |
$(TEST_FILES) \ |
312 |
man/footer.sgml \ |
313 |
$(mansgml) \ |
314 |
$(maninput) \ |
315 |
qa/ganeti-qa.py \ |
316 |
qa/qa-sample.json \ |
317 |
qa/qa_cluster.py \ |
318 |
qa/qa_config.py \ |
319 |
qa/qa_daemon.py \ |
320 |
qa/qa_env.py \ |
321 |
qa/qa_error.py \ |
322 |
qa/qa_instance.py \ |
323 |
qa/qa_node.py \ |
324 |
qa/qa_os.py \ |
325 |
qa/qa_rapi.py \ |
326 |
qa/qa_tags.py \ |
327 |
qa/qa_utils.py |
328 |
|
329 |
man_MANS = \ |
330 |
man/ganeti.7 \ |
331 |
man/ganeti-cleaner.8 \ |
332 |
man/ganeti-confd.8 \ |
333 |
man/ganeti-masterd.8 \ |
334 |
man/ganeti-noded.8 \ |
335 |
man/ganeti-os-interface.7 \ |
336 |
man/ganeti-rapi.8 \ |
337 |
man/ganeti-watcher.8 \ |
338 |
man/gnt-backup.8 \ |
339 |
man/gnt-cluster.8 \ |
340 |
man/gnt-debug.8 \ |
341 |
man/gnt-instance.8 \ |
342 |
man/gnt-job.8 \ |
343 |
man/gnt-node.8 \ |
344 |
man/gnt-os.8 |
345 |
|
346 |
mansgml = $(patsubst %.7,%.sgml,$(patsubst %.8,%.sgml,$(man_MANS))) |
347 |
manhtml = $(patsubst %.sgml,%.html,$(mansgml)) |
348 |
maninput = \ |
349 |
$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) \ |
350 |
$(patsubst %.html,%.html.in,$(manhtml)) |
351 |
|
352 |
TEST_FILES = \ |
353 |
test/data/bdev-drbd-8.0.txt \ |
354 |
test/data/bdev-drbd-8.3.txt \ |
355 |
test/data/bdev-drbd-disk.txt \ |
356 |
test/data/bdev-drbd-net-ip4.txt \ |
357 |
test/data/bdev-drbd-net-ip6.txt \ |
358 |
test/data/cert1.pem \ |
359 |
test/data/proc_drbd8.txt \ |
360 |
test/data/proc_drbd80-emptyline.txt \ |
361 |
test/data/proc_drbd83.txt \ |
362 |
test/data/sys_drbd_usermode_helper.txt \ |
363 |
test/import-export_unittest-helper |
364 |
|
365 |
python_tests = \ |
366 |
test/ganeti.asyncnotifier_unittest.py \ |
367 |
test/ganeti.backend_unittest.py \ |
368 |
test/ganeti.bdev_unittest.py \ |
369 |
test/ganeti.cli_unittest.py \ |
370 |
test/ganeti.daemon_unittest.py \ |
371 |
test/ganeti.cmdlib_unittest.py \ |
372 |
test/ganeti.compat_unittest.py \ |
373 |
test/ganeti.confd.client_unittest.py \ |
374 |
test/ganeti.config_unittest.py \ |
375 |
test/ganeti.constants_unittest.py \ |
376 |
test/ganeti.errors_unittest.py \ |
377 |
test/ganeti.hooks_unittest.py \ |
378 |
test/ganeti.http_unittest.py \ |
379 |
test/ganeti.impexpd_unittest.py \ |
380 |
test/ganeti.jqueue_unittest.py \ |
381 |
test/ganeti.locking_unittest.py \ |
382 |
test/ganeti.luxi_unittest.py \ |
383 |
test/ganeti.masterd.instance_unittest.py \ |
384 |
test/ganeti.mcpu_unittest.py \ |
385 |
test/ganeti.netutils_unittest.py \ |
386 |
test/ganeti.objects_unittest.py \ |
387 |
test/ganeti.opcodes_unittest.py \ |
388 |
test/ganeti.rapi.client_unittest.py \ |
389 |
test/ganeti.rapi.resources_unittest.py \ |
390 |
test/ganeti.rapi.rlib2_unittest.py \ |
391 |
test/ganeti.serializer_unittest.py \ |
392 |
test/ganeti.ssh_unittest.py \ |
393 |
test/ganeti.uidpool_unittest.py \ |
394 |
test/ganeti.utils_unittest.py \ |
395 |
test/ganeti.utils_mlockall_unittest.py \ |
396 |
test/ganeti.workerpool_unittest.py \ |
397 |
test/cfgupgrade_unittest.py \ |
398 |
test/docs_unittest.py \ |
399 |
test/tempfile_fork_unittest.py |
400 |
|
401 |
dist_TESTS = \ |
402 |
test/check-cert-expired_unittest.bash \ |
403 |
test/daemon-util_unittest.bash \ |
404 |
test/ganeti-cleaner_unittest.bash \ |
405 |
test/import-export_unittest.bash \ |
406 |
$(python_tests) |
407 |
|
408 |
nodist_TESTS = |
409 |
|
410 |
TESTS = $(dist_TESTS) $(nodist_TESTS) |
411 |
|
412 |
# Environment for all tests |
413 |
PLAIN_TESTS_ENVIRONMENT = \ |
414 |
PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR) |
415 |
|
416 |
# Environment for tests run by automake |
417 |
TESTS_ENVIRONMENT = \ |
418 |
$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner |
419 |
|
420 |
all_python_code = \ |
421 |
$(dist_sbin_SCRIPTS) \ |
422 |
$(dist_tools_SCRIPTS) \ |
423 |
$(pkglib_python_scripts) \ |
424 |
$(python_tests) \ |
425 |
$(pkgpython_PYTHON) \ |
426 |
$(hypervisor_PYTHON) \ |
427 |
$(rapi_PYTHON) \ |
428 |
$(http_PYTHON) \ |
429 |
$(confd_PYTHON) \ |
430 |
$(masterd_PYTHON) \ |
431 |
$(impexpd_PYTHON) \ |
432 |
$(noinst_PYTHON) |
433 |
|
434 |
srclink_files = \ |
435 |
man/footer.sgml \ |
436 |
test/check-cert-expired_unittest.bash \ |
437 |
test/daemon-util_unittest.bash \ |
438 |
test/ganeti-cleaner_unittest.bash \ |
439 |
test/import-export_unittest.bash \ |
440 |
$(all_python_code) |
441 |
|
442 |
check_python_code = \ |
443 |
$(BUILD_BASH_COMPLETION) \ |
444 |
$(all_python_code) |
445 |
|
446 |
lint_python_code = \ |
447 |
ganeti \ |
448 |
$(dist_sbin_SCRIPTS) \ |
449 |
$(dist_tools_SCRIPTS) \ |
450 |
$(pkglib_python_scripts) \ |
451 |
$(BUILD_BASH_COMPLETION) |
452 |
|
453 |
test/daemon-util_unittest.bash: daemons/daemon-util |
454 |
|
455 |
test/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner |
456 |
|
457 |
devel/upload: devel/upload.in $(REPLACE_VARS_SED) |
458 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
459 |
chmod u+x $@ |
460 |
|
461 |
daemons/%: daemons/%.in \ |
462 |
$(REPLACE_VARS_SED) |
463 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
464 |
chmod +x $@ |
465 |
|
466 |
doc/examples/%: doc/examples/%.in \ |
467 |
$(REPLACE_VARS_SED) |
468 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
469 |
|
470 |
doc/examples/hooks/%: doc/examples/hooks/%.in \ |
471 |
$(REPLACE_VARS_SED) |
472 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
473 |
|
474 |
doc/examples/bash_completion: $(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \ |
475 |
lib/cli.py $(gnt_scripts) tools/burnin |
476 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_BASH_COMPLETION) > $@ |
477 |
|
478 |
doc/%.png: doc/%.dot |
479 |
@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; } |
480 |
$(DOT) -Tpng -o $@ $< |
481 |
|
482 |
man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER) |
483 |
@test -n "$(DOCBOOK2MAN)" || \ |
484 |
{ echo 'docbook2man' not found during configure; exit 1; } |
485 |
$(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $(notdir $(@:.in=)) $@ |
486 |
if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN) $@; fi |
487 |
|
488 |
man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER) |
489 |
@test -n "$(DOCBOOK2HTML)" || \ |
490 |
{ echo 'docbook2html' not found during configure; exit 1; } |
491 |
$(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $(notdir $(@:.in=)) $@ |
492 |
|
493 |
man/%.7: man/%.7.in $(REPLACE_VARS_SED) |
494 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
495 |
|
496 |
man/%.8: man/%.8.in $(REPLACE_VARS_SED) |
497 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
498 |
|
499 |
man/%.html: man/%.html.in $(REPLACE_VARS_SED) |
500 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
501 |
|
502 |
lib/_autoconf.py: Makefile stamp-directories |
503 |
set -e; \ |
504 |
{ echo '# This file is automatically generated, do not edit!'; \ |
505 |
echo '#'; \ |
506 |
echo ''; \ |
507 |
echo '"""Build-time configuration for Ganeti.'; \ |
508 |
echo '';\ |
509 |
echo 'This file is autogenerated by the build process.'; \ |
510 |
echo 'For any changes you need to re-run ./configure (and'; \ |
511 |
echo 'not edit by hand).'; \ |
512 |
echo ''; \ |
513 |
echo '"""'; \ |
514 |
echo ''; \ |
515 |
echo '# pylint: disable-msg=C0301,C0324'; \ |
516 |
echo '# because this is autogenerated, we do not want'; \ |
517 |
echo '# style warnings' ; \ |
518 |
echo ''; \ |
519 |
echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \ |
520 |
echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \ |
521 |
echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \ |
522 |
echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \ |
523 |
echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \ |
524 |
echo "VERSION_FULL = '$(VERSION_FULL)'"; \ |
525 |
echo "LOCALSTATEDIR = '$(localstatedir)'"; \ |
526 |
echo "SYSCONFDIR = '$(sysconfdir)'"; \ |
527 |
echo "SSH_CONFIG_DIR = '$(SSH_CONFIG_DIR)'"; \ |
528 |
echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \ |
529 |
echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \ |
530 |
echo "XEN_BOOTLOADER = '$(XEN_BOOTLOADER)'"; \ |
531 |
echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \ |
532 |
echo "XEN_INITRD = '$(XEN_INITRD)'"; \ |
533 |
echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \ |
534 |
echo "ENABLE_FILE_STORAGE = $(ENABLE_FILE_STORAGE)"; \ |
535 |
echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \ |
536 |
echo "KVM_PATH = '$(KVM_PATH)'"; \ |
537 |
echo "SOCAT_PATH = '$(SOCAT)'"; \ |
538 |
echo "SOCAT_USE_ESCAPE = $(SOCAT_USE_ESCAPE)"; \ |
539 |
echo "LVM_STRIPECOUNT = $(LVM_STRIPECOUNT)"; \ |
540 |
echo "TOOLSDIR = '$(toolsdir)'"; \ |
541 |
echo "GNT_SCRIPTS = [$(foreach i,$(notdir $(gnt_scripts)),'$(i)',)]"; \ |
542 |
echo "PKGLIBDIR = '$(pkglibdir)'"; \ |
543 |
echo "DRBD_BARRIERS = $(DRBD_BARRIERS)"; \ |
544 |
echo "SYSLOG_USAGE = '$(SYSLOG_USAGE)'"; \ |
545 |
echo "DAEMONS_GROUP = '$(DAEMONS_GROUP)'"; \ |
546 |
echo "MASTERD_USER = '$(MASTERD_USER)'"; \ |
547 |
echo "RAPI_USER = '$(RAPI_USER)'"; \ |
548 |
} > $@ |
549 |
|
550 |
$(REPLACE_VARS_SED): Makefile |
551 |
set -e; \ |
552 |
{ echo 's#@PREFIX@#$(prefix)#g'; \ |
553 |
echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \ |
554 |
echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \ |
555 |
echo 's#@BINDIR@#$(bindir)#g'; \ |
556 |
echo 's#@SBINDIR@#$(sbindir)#g'; \ |
557 |
echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \ |
558 |
echo 's#@CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \ |
559 |
echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \ |
560 |
echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \ |
561 |
echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \ |
562 |
echo 's#@RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \ |
563 |
echo 's#@PKGLIBDIR@#$(pkglibdir)#g'; \ |
564 |
echo 's#@GNTMASTERUSER@#$(MASTERD_USER)#g'; \ |
565 |
echo 's#@GNTRAPIUSER@#$(RAPI_USER)#g'; \ |
566 |
echo 's#@GNTCONFDUSER@#$(CONFD_USER)#g'; \ |
567 |
echo 's#@GNTNODEDUSER@#$(NODED_USER)#g'; \ |
568 |
echo 's#@GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \ |
569 |
echo 's#@GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \ |
570 |
echo 's#@GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \ |
571 |
echo 's#@GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \ |
572 |
echo 's#@GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \ |
573 |
} > $@ |
574 |
|
575 |
# We need to create symlinks because "make distcheck" will not install Python |
576 |
# files when building. |
577 |
stamp-srclinks: Makefile stamp-directories |
578 |
set -e; \ |
579 |
for i in $(srclink_files); do \ |
580 |
if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \ |
581 |
$(LN_S) $(abs_top_srcdir)/$$i $$i; \ |
582 |
fi; \ |
583 |
done |
584 |
touch $@ |
585 |
|
586 |
.PHONY: ganeti |
587 |
ganeti: |
588 |
cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; } |
589 |
|
590 |
.PHONY: check-dirs |
591 |
check-dirs: $(BUILT_SOURCES) |
592 |
@set -e; \ |
593 |
find . -type d \( \( -name . \) -o \( \ |
594 |
-name .git -o \ |
595 |
-name autom4te.cache \ |
596 |
\) -prune -o -print \) | { \ |
597 |
error=; \ |
598 |
while read dir; do \ |
599 |
case "$$dir" in \ |
600 |
$(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \ |
601 |
*) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \ |
602 |
esac; \ |
603 |
done; \ |
604 |
for dir in $(DIRS); do \ |
605 |
if ! test -d "$$dir"; then \ |
606 |
echo "Directory $$dir listed in DIRS does not exist" >&2; \ |
607 |
error=1; \ |
608 |
fi \ |
609 |
done; \ |
610 |
if test -n "$$error"; then exit 1; else exit 0; fi; \ |
611 |
} |
612 |
|
613 |
check-local: check-dirs |
614 |
$(CHECK_PYTHON_CODE) $(check_python_code) |
615 |
|
616 |
.PHONY: lint |
617 |
lint: ganeti $(BUILT_SOURCES) |
618 |
@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; } |
619 |
$(PYLINT) $(LINT_OPTS) $(lint_python_code) |
620 |
|
621 |
# a dist hook rule for catching revision control directories |
622 |
distcheck-hook: |
623 |
if find $(top_distdir) -name .svn -or -name .git | grep .; then \ |
624 |
echo "Found revision control files in final archive." 1>&2; \ |
625 |
exit 1; \ |
626 |
fi |
627 |
if find $(top_distdir) -name '*.py[co]' | grep .; then \ |
628 |
echo "Found Python byte code in final archive." 1>&2; \ |
629 |
exit 1; \ |
630 |
fi |
631 |
if find $(top_distdir) -name '*~' | grep .; then \ |
632 |
echo "Found backup files in final archive." 1>&2; \ |
633 |
exit 1; \ |
634 |
fi |
635 |
|
636 |
install-exec-local: |
637 |
@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \ |
638 |
"$(DESTDIR)${localstatedir}/log/ganeti" \ |
639 |
"$(DESTDIR)${localstatedir}/run/ganeti" |
640 |
|
641 |
stamp-directories: Makefile |
642 |
@mkdir_p@ $(DIRS) |
643 |
touch $@ |
644 |
|
645 |
.PHONY: apidoc |
646 |
apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(BUILT_SOURCES) |
647 |
test -e doc/api || mkdir doc/api |
648 |
$(RUN_IN_TEMPDIR) epydoc -v \ |
649 |
--conf $(CURDIR)/epydoc.conf \ |
650 |
--output $(CURDIR)/doc/api |
651 |
|
652 |
.PHONY: TAGS |
653 |
TAGS: $(BUILT_SOURCES) |
654 |
rm -f TAGS |
655 |
find . -path './lib/*.py' -o -path 'scripts/gnt-*' -o \ |
656 |
-path 'daemons/ganeti-*' -o -path 'tools/*' | \ |
657 |
etags - |
658 |
|
659 |
.PHONY: coverage |
660 |
coverage: $(BUILT_SOURCES) $(python_tests) |
661 |
set -e; \ |
662 |
mkdir -p doc/coverage; \ |
663 |
COVERAGE_FILE=$(CURDIR)/doc/coverage/data \ |
664 |
TEXT_COVERAGE=$(CURDIR)/doc/coverage/report.txt \ |
665 |
HTML_COVERAGE=$(CURDIR)/doc/coverage \ |
666 |
$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/gen-coverage \ |
667 |
$(python_tests) |
668 |
|
669 |
commit-check: distcheck lint apidoc |
670 |
|
671 |
-include ./Makefile.local |
672 |
|
673 |
# vim: set noet : |