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