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