Makefile.am 36.2 KB
Newer Older
1
2
3
4
5
# Ganeti makefile
# - Indent with tabs only.
# - Keep files sorted; one line per file.
# - Directories in lib/ must have their own *dir variable (see hypervisor).
# - All directories must be listed DIRS.
Michael Hanselmann's avatar
Michael Hanselmann committed
6
# - Use autogen.sh to generate Makefile.in and configure script.
7
8
9
10
11

# Automake doesn't export these variables before version 1.10.
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@

12
13
14
15
16
# Helper values for calling builtin functions
empty :=
space := $(empty) $(empty)
comma := ,

17
18
19
# Use bash in order to be able to use pipefail
SHELL=/bin/bash

20
ACLOCAL_AMFLAGS = -I autotools
21
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
22
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
23
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
24
CHECK_MAN = $(top_srcdir)/autotools/check-man
25
CHECK_VERSION = $(top_srcdir)/autotools/check-version
26
CHECK_NEWS = $(top_srcdir)/autotools/check-news
27
CHECK_IMPORTS = $(top_srcdir)/autotools/check-imports
28
DOCPP = $(top_srcdir)/autotools/docpp
29
REPLACE_VARS_SED = autotools/replace_vars.sed
30
CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
31

32
33
# Note: these are automake-specific variables, and must be named after
# the directory + 'dir' suffix
34
clientdir = $(pkgpythondir)/client
35
hypervisordir = $(pkgpythondir)/hypervisor
36
httpdir = $(pkgpythondir)/http
Michael Hanselmann's avatar
Michael Hanselmann committed
37
masterddir = $(pkgpythondir)/masterd
Guido Trotter's avatar
Guido Trotter committed
38
confddir = $(pkgpythondir)/confd
39
rapidir = $(pkgpythondir)/rapi
40
serverdir = $(pkgpythondir)/server
41
watcherdir = $(pkgpythondir)/watcher
42
impexpddir = $(pkgpythondir)/impexpd
43
utilsdir = $(pkgpythondir)/utils
44
toolsdir = $(pkglibdir)/tools
45
iallocatorsdir = $(pkglibdir)/iallocators
46
pytoolsdir = $(pkgpythondir)/tools
47
48
docdir = $(datadir)/doc/$(PACKAGE)

49
50
51
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:

52
53
54
HTOOLS_DIRS = \
	htools \
	htools/Ganeti \
55
56
	htools/Ganeti/HTools \
	htools/Ganeti/HTools/Program
57

58
59
60
61
62
63
DIRS = \
	autotools \
	daemons \
	devel \
	doc \
	doc/examples \
Guido Trotter's avatar
Guido Trotter committed
64
	doc/examples/hooks \
65
	doc/examples/gnt-debug \
66
	$(HTOOLS_DIRS) \
67
	lib \
68
	lib/client \
69
	lib/build \
70
	lib/confd \
71
	lib/http \
72
	lib/hypervisor \
73
	lib/impexpd \
Michael Hanselmann's avatar
Michael Hanselmann committed
74
	lib/masterd \
75
	lib/rapi \
76
	lib/server \
77
	lib/tools \
78
	lib/utils \
79
	lib/watcher \
80
81
82
83
	man \
	qa \
	test \
	test/data \
Agata Murawska's avatar
Agata Murawska committed
84
	test/data/ovfdata \
Agata Murawska's avatar
Agata Murawska committed
85
	test/data/ovfdata/other \
86
87
	tools

88
BUILDTIME_DIR_AUTOCREATE = \
89
	scripts \
90
91
92
93
	$(APIDOC_DIR) \
	$(APIDOC_PY_DIR) \
	$(APIDOC_HS_DIR) \
	$(APIDOC_HS_DIR)/Ganeti $(APIDOC_HS_DIR)/Ganeti/HTools \
94
	$(APIDOC_HS_DIR)/Ganeti/HTools/Program \
95
96
97
	$(COVERAGE_DIR) \
	$(COVERAGE_PY_DIR) \
	$(COVERAGE_HS_DIR) \
98
	.hpc
99
100
101

BUILDTIME_DIRS = \
	$(BUILDTIME_DIR_AUTOCREATE) \
102
103
104
105
106
107
108
	doc/html

DIRCHECK_EXCLUDE = \
	$(BUILDTIME_DIRS) \
	ganeti-[0-9]*.[0-9]*.[0-9]* \
	doc/html/_*

109
all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE))
110

111
112
113
114
115
116
117
118
# some helper vars
COVERAGE_DIR = doc/coverage
COVERAGE_PY_DIR = $(COVERAGE_DIR)/py
COVERAGE_HS_DIR = $(COVERAGE_DIR)/hs
APIDOC_DIR = doc/api
APIDOC_PY_DIR = $(APIDOC_DIR)/py
APIDOC_HS_DIR = $(APIDOC_DIR)/hs

Iustin Pop's avatar
Iustin Pop committed
119
MAINTAINERCLEANFILES = \
120
	$(docpng) \
121
	$(maninput) \
122
	doc/install-quick.rst \
123
	doc/news.rst \
124
	doc/upgrade.rst \
125
	vcs-version
Iustin Pop's avatar
Iustin Pop committed
126

127
maintainer-clean-local:
128
	rm -rf $(BUILDTIME_DIRS)
129

130
CLEANFILES = \
131
	$(addsuffix /*.py[co],$(DIRS)) \
132
133
	$(addsuffix /*.hi,$(HTOOLS_DIRS)) \
	$(addsuffix /*.o,$(HTOOLS_DIRS)) \
134
	$(all_dirfiles) \
135
	$(PYTHON_BOOTSTRAP) \
136
	epydoc.conf \
137
	autotools/replace_vars.sed \
138
	daemons/daemon-util \
139
	daemons/ganeti-cleaner \
140
	devel/upload \
141
	doc/examples/bash_completion \
142
	doc/examples/ganeti.initd \
143
	doc/examples/ganeti-kvm-poweroff.initd \
144
	doc/examples/ganeti.cron \
145
	doc/examples/gnt-config-backup \
Luca Bigliardi's avatar
Luca Bigliardi committed
146
	doc/examples/hooks/ipsec \
Iustin Pop's avatar
Iustin Pop committed
147
148
	$(man_MANS) \
	$(manhtml) \
149
	tools/kvm-ifup \
150
	stamp-srclinks \
151
	$(nodist_pkgpython_PYTHON) \
152
	$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
153
154
	.hpc/*.mix htools/*.tix \
	doc/hs-lint.html
155

156
157
# BUILT_SOURCES should only be used as a dependency on phony targets. Otherwise
# it'll cause the target to rebuild every time.
158
159
BUILT_SOURCES = \
	ganeti \
160
	stamp-srclinks \
161
	$(all_dirfiles) \
162
163
	$(PYTHON_BOOTSTRAP) \
	$(BUILT_PYTHON_SOURCES)
164

165
BUILT_PYTHON_SOURCES = \
166
167
	lib/_autoconf.py \
	lib/_vcsversion.py
168

169
170
171
nodist_pkgpython_PYTHON = \
	$(BUILT_PYTHON_SOURCES)

172
noinst_PYTHON = \
Michael Hanselmann's avatar
Michael Hanselmann committed
173
174
	lib/build/__init__.py \
	lib/build/sphinx_ext.py
175

176
177
pkgpython_PYTHON = \
	lib/__init__.py \
Guido Trotter's avatar
Guido Trotter committed
178
	lib/asyncnotifier.py \
179
180
181
182
183
	lib/backend.py \
	lib/bdev.py \
	lib/bootstrap.py \
	lib/cli.py \
	lib/cmdlib.py \
184
	lib/compat.py \
185
186
	lib/config.py \
	lib/constants.py \
187
	lib/daemon.py \
188
	lib/errors.py \
189
	lib/ht.py \
190
	lib/jqueue.py \
191
	lib/jstore.py \
192
193
194
	lib/locking.py \
	lib/luxi.py \
	lib/mcpu.py \
195
	lib/netutils.py \
196
197
	lib/objects.py \
	lib/opcodes.py \
198
	lib/ovf.py \
199
	lib/qlang.py \
200
	lib/query.py \
201
	lib/rpc.py \
202
	lib/runtime.py \
203
204
205
	lib/serializer.py \
	lib/ssconf.py \
	lib/ssh.py \
206
	lib/storage.py \
207
	lib/uidpool.py \
208
	lib/workerpool.py
209

210
client_PYTHON = \
211
	lib/client/__init__.py \
212
	lib/client/gnt_backup.py \
213
	lib/client/gnt_cluster.py \
214
	lib/client/gnt_debug.py \
215
	lib/client/gnt_group.py \
216
	lib/client/gnt_instance.py \
217
	lib/client/gnt_job.py \
218
	lib/client/gnt_node.py \
219
	lib/client/gnt_os.py
220

221
222
223
hypervisor_PYTHON = \
	lib/hypervisor/__init__.py \
	lib/hypervisor/hv_base.py \
224
	lib/hypervisor/hv_chroot.py \
225
	lib/hypervisor/hv_fake.py \
Guido Trotter's avatar
Guido Trotter committed
226
	lib/hypervisor/hv_kvm.py \
Iustin Pop's avatar
Iustin Pop committed
227
	lib/hypervisor/hv_lxc.py \
228
229
	lib/hypervisor/hv_xen.py

230
231
rapi_PYTHON = \
	lib/rapi/__init__.py \
232
	lib/rapi/baserlib.py \
David Knowles's avatar
David Knowles committed
233
	lib/rapi/client.py \
234
	lib/rapi/client_utils.py \
235
236
	lib/rapi/connector.py \
	lib/rapi/rlib2.py
237

238
http_PYTHON = \
239
	lib/http/__init__.py \
240
	lib/http/auth.py \
241
242
	lib/http/client.py \
	lib/http/server.py
243

Guido Trotter's avatar
Guido Trotter committed
244
confd_PYTHON = \
Guido Trotter's avatar
Guido Trotter committed
245
	lib/confd/__init__.py \
Guido Trotter's avatar
Guido Trotter committed
246
	lib/confd/client.py \
247
248
	lib/confd/querylib.py \
	lib/confd/server.py
249

Michael Hanselmann's avatar
Michael Hanselmann committed
250
masterd_PYTHON = \
251
252
	lib/masterd/__init__.py \
	lib/masterd/instance.py
Michael Hanselmann's avatar
Michael Hanselmann committed
253

254
255
256
impexpd_PYTHON = \
	lib/impexpd/__init__.py

257
watcher_PYTHON = \
258
	lib/watcher/__init__.py \
259
260
	lib/watcher/nodemaint.py \
	lib/watcher/state.py
261

262
server_PYTHON = \
263
	lib/server/__init__.py \
264
	lib/server/confd.py \
265
	lib/server/masterd.py \
266
267
	lib/server/noded.py \
	lib/server/rapi.py
268

269
270
271
272
pytools_PYTHON = \
	lib/tools/__init__.py \
	lib/tools/ensure_dirs.py

273
utils_PYTHON = \
274
	lib/utils/__init__.py \
275
	lib/utils/algo.py \
276
	lib/utils/filelock.py \
277
	lib/utils/hash.py \
278
	lib/utils/io.py \
279
	lib/utils/log.py \
280
	lib/utils/mlock.py \
281
	lib/utils/nodesetup.py \
282
	lib/utils/process.py \
283
	lib/utils/retry.py \
284
	lib/utils/text.py \
285
286
	lib/utils/wrapper.py \
	lib/utils/x509.py
287

Michael Hanselmann's avatar
Michael Hanselmann committed
288
docrst = \
289
	doc/admin.rst \
290
	doc/design-2.0.rst \
291
	doc/design-2.1.rst \
292
	doc/design-2.2.rst \
Guido Trotter's avatar
Guido Trotter committed
293
	doc/design-2.3.rst \
294
	doc/design-htools-2.3.rst \
295
	doc/design-2.4.rst \
296
	doc/design-2.5.rst \
297
	doc/design-draft.rst \
298
	doc/design-oob.rst \
Tsachy Shacham's avatar
Tsachy Shacham committed
299
	doc/design-cpu-pinning.rst \
300
	doc/design-query2.rst \
301
	doc/design-x509-ca.rst \
302
	doc/design-http-server.rst \
303
	doc/design-impexp2.rst \
304
	doc/design-lu-generated-jobs.rst \
305
	doc/design-multi-reloc.rst \
306
	doc/design-network.rst \
Michael Hanselmann's avatar
Michael Hanselmann committed
307
	doc/design-chained-jobs.rst \
308
	doc/design-ovf-support.rst \
309
	doc/cluster-merge.rst \
310
	doc/design-shared-storage.rst \
311
	doc/design-node-state-cache.rst \
312
	doc/devnotes.rst \
313
	doc/glossary.rst \
314
	doc/hooks.rst \
315
	doc/iallocator.rst \
316
	doc/index.rst \
317
	doc/install-quick.rst \
318
	doc/install.rst \
319
	doc/locking.rst \
320
	doc/move-instance.rst \
Iustin Pop's avatar
Iustin Pop committed
321
	doc/news.rst \
322
	doc/rapi.rst \
323
	doc/security.rst \
324
	doc/upgrade.rst \
Iustin Pop's avatar
Iustin Pop committed
325
	doc/walkthrough.rst
Michael Hanselmann's avatar
Michael Hanselmann committed
326

327
328
HS_PROGS = htools/htools
HS_BIN_ROLES = hbal hscan hspace
329

330
331
HS_ALL_PROGS = $(HS_PROGS) htools/test
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
332
# we don't add -Werror by default
333
HFLAGS = -O -Wall -fwarn-monomorphism-restriction -fwarn-tabs -ihtools
334
# extra flags that can be overriden on the command line
335
HEXTRA =
336
# exclude options for coverage reports
337
338
339
HPCEXCL = --exclude Main --exclude Ganeti.HTools.QC \
	--exclude Ganeti.Constants \
	--exclude Ganeti.HTools.Version
340

341
HS_LIB_SRCS = \
342
343
	htools/Ganeti/HTools/CLI.hs \
	htools/Ganeti/HTools/Cluster.hs \
344
	htools/Ganeti/HTools/Compat.hs \
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
	htools/Ganeti/HTools/Container.hs \
	htools/Ganeti/HTools/ExtLoader.hs \
	htools/Ganeti/HTools/Group.hs \
	htools/Ganeti/HTools/IAlloc.hs \
	htools/Ganeti/HTools/Instance.hs \
	htools/Ganeti/HTools/Loader.hs \
	htools/Ganeti/HTools/Luxi.hs \
	htools/Ganeti/HTools/Node.hs \
	htools/Ganeti/HTools/PeerMap.hs \
	htools/Ganeti/HTools/QC.hs \
	htools/Ganeti/HTools/Rapi.hs \
	htools/Ganeti/HTools/Simu.hs \
	htools/Ganeti/HTools/Text.hs \
	htools/Ganeti/HTools/Types.hs \
	htools/Ganeti/HTools/Utils.hs \
360
	htools/Ganeti/HTools/Program/Hail.hs \
361
	htools/Ganeti/HTools/Program/Hbal.hs \
362
	htools/Ganeti/HTools/Program/Hscan.hs \
363
	htools/Ganeti/HTools/Program/Hspace.hs \
364
365
366
367
	htools/Ganeti/Jobs.hs \
	htools/Ganeti/Luxi.hs \
	htools/Ganeti/OpCodes.hs

368
HS_BUILT_SRCS = htools/Ganeti/HTools/Version.hs htools/Ganeti/Constants.hs
369
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
370

371
372
$(RUN_IN_TEMPDIR): | $(all_dirfiles)

Iustin Pop's avatar
Iustin Pop committed
373
374
375
376
377
# Note: we use here an order-only prerequisite, as the contents of
# _autoconf.py are not actually influencing the html build output: it
# has to exist in order for the sphinx module to be loaded
# successfully, but we certainly don't want the docs to be rebuilt if
# it changes
378
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
Iustin Pop's avatar
Iustin Pop committed
379
	$(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
380
	| $(BUILT_PYTHON_SOURCES)
381
382
	@test -n "$(SPHINX)" || \
	    { echo 'sphinx-build' not found during configure; exit 1; }
383
	@mkdir_p@ $(dir $@)
384
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
385
	    -d . \
386
387
	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
	    -D release="$(PACKAGE_VERSION)" \
388
389
390
391
	    $(abs_top_srcdir)/doc $(CURDIR)/doc/html
	rm -f doc/html/.buildinfo doc/html/objects.inv
	touch $@

392
doc/html: doc/html/index.html
Iustin Pop's avatar
Iustin Pop committed
393

394
doc/install-quick.rst: INSTALL
395
doc/news.rst: NEWS
396
doc/upgrade.rst: UPGRADE
397

398
doc/install-quick.rst doc/news.rst doc/upgrade.rst:
399
400
401
402
403
404
405
	set -e; \
	{ echo '.. This file is automatically updated at build time from $<.'; \
	  echo '.. Do not edit.'; \
	  echo; \
	  cat $<; \
	} > $@

406
docdot = \
407
408
409
	doc/arch-2.0.dot \
	doc/design-2.1-lock-acquire.dot \
	doc/design-2.1-lock-release.dot
410

411
docpng = $(patsubst %.dot,%.png,$(docdot))
412

413
414
415
416
417
418
419
420
# Things to build but not to install (add it to EXTRA_DIST if it should be
# distributed)
noinst_DATA = \
	devel/upload \
	doc/html \
	doc/examples/bash_completion \
	doc/examples/ganeti.cron \
	doc/examples/ganeti.initd \
421
	doc/examples/ganeti-kvm-poweroff.initd \
422
	doc/examples/gnt-config-backup \
423
424
	doc/examples/hooks/ipsec \
	$(manhtml)
425

426
gnt_scripts = \
427
428
429
	scripts/gnt-backup \
	scripts/gnt-cluster \
	scripts/gnt-debug \
430
	scripts/gnt-group \
431
432
433
434
435
	scripts/gnt-instance \
	scripts/gnt-job \
	scripts/gnt-node \
	scripts/gnt-os

436
PYTHON_BOOTSTRAP_SBIN = \
437
	daemons/ganeti-confd \
438
	daemons/ganeti-masterd \
439
	daemons/ganeti-noded \
440
	daemons/ganeti-watcher \
441
	daemons/ganeti-rapi \
442
	scripts/gnt-backup \
443
	scripts/gnt-cluster \
444
	scripts/gnt-debug \
445
	scripts/gnt-group \
446
	scripts/gnt-instance \
447
	scripts/gnt-job \
448
	scripts/gnt-node \
449
	scripts/gnt-os
450

451
452
453
454
PYTHON_BOOTSTRAP = \
	$(PYTHON_BOOTSTRAP_SBIN) \
	tools/ensure-dirs

455
456
457
458
459
460
461
qa_scripts = \
	qa/ganeti-qa.py \
	qa/qa_cluster.py \
	qa/qa_config.py \
	qa/qa_daemon.py \
	qa/qa_env.py \
	qa/qa_error.py \
Andrea Spadaccini's avatar
Andrea Spadaccini committed
462
	qa/qa_group.py \
463
464
465
466
467
468
469
	qa/qa_instance.py \
	qa/qa_node.py \
	qa/qa_os.py \
	qa/qa_rapi.py \
	qa/qa_tags.py \
	qa/qa_utils.py

470
471
bin_SCRIPTS =
if WANT_HTOOLS
472
bin_SCRIPTS += $(filter-out htools/hail,$(HS_PROGS))
473
474
install-exec-hook:
	@mkdir_p@ $(DESTDIR)$(iallocatorsdir)
475
476
# FIXME: this is a hardcoded logic, instead of auto-resolving
	$(LN_S) -f ../../../bin/htools \
477
		   $(DESTDIR)$(iallocatorsdir)/hail
478
	for role in $(HS_BIN_ROLES); do \
479
		$(LN_S) -f htools \
480
481
			   $(DESTDIR)$(bindir)/$$role ; \
	done
482
483
endif

484
$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
485
486
487
488
	@if [ -z "$(HTOOLS)" ]; then \
	  echo "Error: htools compilation disabled at configure time" 1>&2 ;\
	  exit 1; \
	fi
489
490
	@BINARY=$(@:htools/%=%); \
	if [ "$BINARY" = "test" ] && [ -z "$(GHC_PKG_QUICKCHECK)" ]; then \
491
492
	  echo "Error: cannot run unittests without the QuickCheck library (see devnotes.rst)" 1>&2; \
	  exit 1; \
493
494
	fi
	BINARY=$(@:htools/%=%); $(GHC) --make \
495
496
	  $(HFLAGS) $(HEXTRA) \
	  $(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) \
497
	  -osuf $$BINARY.o -hisuf $$BINARY.hi $@
498

499
500
501
502
503
# for the htools/test binary, we need to enable profiling/coverage
htools/test: HEXTRA=-fhpc -Wwarn -fno-warn-missing-signatures \
	-fno-warn-monomorphism-restriction -fno-warn-orphans \
	-fno-warn-missing-methods -fno-warn-unused-imports

504
505
dist_sbin_SCRIPTS = \
	tools/ganeti-listrunner
506

507
nodist_sbin_SCRIPTS = \
508
	$(PYTHON_BOOTSTRAP_SBIN) \
509
510
	daemons/ganeti-cleaner

511
dist_tools_PYTHON = \
512
513
514
	tools/burnin \
	tools/cfgshell \
	tools/cfgupgrade \
515
	tools/cfgupgrade12 \
516
	tools/cluster-merge \
Iustin Pop's avatar
Iustin Pop committed
517
	tools/lvmstrap \
518
	tools/move-instance \
519
	tools/ovfconverter \
520
	tools/setup-ssh \
Iustin Pop's avatar
Iustin Pop committed
521
	tools/sanitize-config
522

523
524
dist_tools_SCRIPTS = \
	$(dist_tools_PYTHON) \
525
	tools/kvm-console-wrapper \
526
527
	tools/xm-console-wrapper

528
pkglib_python_scripts = \
529
530
	daemons/import-export \
	tools/check-cert-expired
531

532
533
534
nodist_pkglib_python_scripts = \
	tools/ensure-dirs

535
pkglib_SCRIPTS = \
536
	daemons/daemon-util \
537
	tools/kvm-ifup \
538
	$(pkglib_python_scripts)
539

540
541
542
nodist_pkglib_SCRIPTS = \
	$(nodist_pkglib_python_scripts)

543
544
EXTRA_DIST = \
	NEWS \
545
	UPGRADE \
546
	epydoc.conf.in \
Michael Hanselmann's avatar
Michael Hanselmann committed
547
	pylintrc \
548
	autotools/build-bash-completion \
549
	autotools/check-python-code \
550
	autotools/check-imports \
551
	autotools/check-man \
552
	autotools/check-news \
553
	autotools/check-tar \
554
	autotools/check-version \
555
	autotools/convert-constants \
556
	autotools/docpp \
557
	autotools/gen-coverage \
558
	autotools/testrunner \
559
	$(RUN_IN_TEMPDIR) \
560
	daemons/daemon-util.in \
561
	daemons/ganeti-cleaner.in \
562
	$(pkglib_python_scripts) \
563
	devel/upload.in \
564
	tools/kvm-ifup.in \
565
	$(docdot) \
566
	$(docpng) \
567
568
569
	$(docrst) \
	doc/conf.py \
	doc/html \
570
	doc/examples/ganeti.initd.in \
571
	doc/examples/ganeti-kvm-poweroff.initd.in \
572
	doc/examples/ganeti.cron.in \
573
	doc/examples/gnt-config-backup.in \
574
575
	doc/examples/ganeti.default \
	doc/examples/ganeti.default-debug \
Guido Trotter's avatar
Guido Trotter committed
576
	doc/examples/hooks/ethers \
Luca Bigliardi's avatar
Luca Bigliardi committed
577
	doc/examples/hooks/ipsec.in \
578
579
580
	doc/examples/gnt-debug/README \
	doc/examples/gnt-debug/delay0.json \
	doc/examples/gnt-debug/delay50.json \
581
582
583
584
	test/testutils.py \
	test/mocks.py \
	$(dist_TESTS) \
	$(TEST_FILES) \
Iustin Pop's avatar
Iustin Pop committed
585
586
	man/footer.rst \
	$(manrst) \
587
	$(maninput) \
Michael Hanselmann's avatar
Michael Hanselmann committed
588
	qa/qa-sample.json \
589
	$(qa_scripts) \
590
591
	$(HS_LIB_SRCS) $(HS_BUILT_SRCS_IN) \
	$(HS_PROG_SRCS)
592
593
594

man_MANS = \
	man/ganeti.7 \
595
	man/ganeti-cleaner.8 \
Guido Trotter's avatar
Guido Trotter committed
596
	man/ganeti-confd.8 \
597
	man/ganeti-listrunner.8 \
598
	man/ganeti-masterd.8 \
599
600
	man/ganeti-noded.8 \
	man/ganeti-os-interface.7 \
601
	man/ganeti-rapi.8 \
602
603
604
	man/ganeti-watcher.8 \
	man/gnt-backup.8 \
	man/gnt-cluster.8 \
605
	man/gnt-debug.8 \
606
	man/gnt-group.8 \
607
	man/gnt-instance.8 \
608
	man/gnt-job.8 \
609
	man/gnt-node.8 \
610
611
612
613
	man/gnt-os.8 \
	man/hail.1 \
	man/hbal.1 \
	man/hscan.1 \
Iustin Pop's avatar
Iustin Pop committed
614
615
	man/hspace.1 \
	man/htools.1
616

617
manrst = $(patsubst %.1,%.rst,$(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS))))
Iustin Pop's avatar
Iustin Pop committed
618
manhtml = $(patsubst %.rst,%.html,$(manrst))
619
mangen = $(patsubst %.rst,%.gen,$(manrst))
620
maninput = \
621
	$(patsubst %.1,%.1.in,$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS)))) \
Iustin Pop's avatar
Iustin Pop committed
622
	$(patsubst %.html,%.html.in,$(manhtml)) \
623
	man/footer.man man/footer.html $(mangen)
624
625

TEST_FILES = \
Manuel Franceschini's avatar
Manuel Franceschini committed
626
627
628
629
630
	test/data/bdev-drbd-8.0.txt \
	test/data/bdev-drbd-8.3.txt \
	test/data/bdev-drbd-disk.txt \
	test/data/bdev-drbd-net-ip4.txt \
	test/data/bdev-drbd-net-ip6.txt \
631
	test/data/cert1.pem \
632
633
634
635
636
637
638
	test/data/ip-addr-show-dummy0.txt \
	test/data/ip-addr-show-lo-ipv4.txt \
	test/data/ip-addr-show-lo-ipv6.txt \
	test/data/ip-addr-show-lo-oneline-ipv4.txt \
	test/data/ip-addr-show-lo-oneline-ipv6.txt \
	test/data/ip-addr-show-lo-oneline.txt \
	test/data/ip-addr-show-lo.txt \
639
	test/data/proc_drbd8.txt \
640
	test/data/proc_drbd80-emptyline.txt \
641
	test/data/proc_drbd83.txt \
642
643
	test/data/proc_drbd83_sync.txt \
	test/data/proc_drbd83_sync_krnl2.6.39.txt \
644
	test/data/sys_drbd_usermode_helper.txt \
Agata Murawska's avatar
Agata Murawska committed
645
	test/data/ovfdata/compr_disk.vmdk.gz \
Agata Murawska's avatar
Agata Murawska committed
646
	test/data/ovfdata/config.ini \
Agata Murawska's avatar
Agata Murawska committed
647
	test/data/ovfdata/corrupted_resources.ovf \
Agata Murawska's avatar
Agata Murawska committed
648
	test/data/ovfdata/empty.ini \
Agata Murawska's avatar
Agata Murawska committed
649
650
651
652
653
	test/data/ovfdata/empty.ovf \
	test/data/ovfdata/ganeti.mf \
	test/data/ovfdata/ganeti.ovf \
	test/data/ovfdata/gzip_disk.ovf \
	test/data/ovfdata/new_disk.vmdk \
Agata Murawska's avatar
Agata Murawska committed
654
	test/data/ovfdata/no_disk.ini \
Agata Murawska's avatar
Agata Murawska committed
655
	test/data/ovfdata/no_disk_in_ref.ovf \
Agata Murawska's avatar
Agata Murawska committed
656
	test/data/ovfdata/no_os.ini \
Agata Murawska's avatar
Agata Murawska committed
657
658
659
	test/data/ovfdata/no_ovf.ova \
	test/data/ovfdata/ova.ova \
	test/data/ovfdata/second_disk.vmdk \
Agata Murawska's avatar
Agata Murawska committed
660
661
	test/data/ovfdata/rawdisk.raw \
	test/data/ovfdata/unsafe_path.ini \
Agata Murawska's avatar
Agata Murawska committed
662
663
	test/data/ovfdata/virtualbox.ovf \
	test/data/ovfdata/wrong_extension.ovd \
Agata Murawska's avatar
Agata Murawska committed
664
	test/data/ovfdata/wrong_config.ini \
Agata Murawska's avatar
Agata Murawska committed
665
666
667
668
	test/data/ovfdata/wrong_manifest.mf \
	test/data/ovfdata/wrong_manifest.ovf \
	test/data/ovfdata/wrong_ova.ova \
	test/data/ovfdata/wrong_xml.ovf \
Agata Murawska's avatar
Agata Murawska committed
669
	test/data/ovfdata/other/rawdisk.raw \
670
	test/import-export_unittest-helper
671

672
python_tests = \
Guido Trotter's avatar
Guido Trotter committed
673
	test/ganeti.asyncnotifier_unittest.py \
674
	test/ganeti.backend_unittest.py \
675
676
	test/ganeti.bdev_unittest.py \
	test/ganeti.cli_unittest.py \
René Nussbaumer's avatar
René Nussbaumer committed
677
	test/ganeti.client.gnt_cluster_unittest.py \
678
	test/ganeti.client.gnt_instance_unittest.py \
Guido Trotter's avatar
Guido Trotter committed
679
	test/ganeti.daemon_unittest.py \
680
	test/ganeti.cmdlib_unittest.py \
681
	test/ganeti.compat_unittest.py \
682
	test/ganeti.confd.client_unittest.py \
683
	test/ganeti.config_unittest.py \
684
	test/ganeti.constants_unittest.py \
685
	test/ganeti.errors_unittest.py \
686
	test/ganeti.hooks_unittest.py \
687
	test/ganeti.ht_unittest.py \
688
	test/ganeti.http_unittest.py \
689
	test/ganeti.hypervisor_unittest.py \
690
691
	test/ganeti.hypervisor.hv_chroot_unittest.py \
	test/ganeti.hypervisor.hv_fake_unittest.py \
692
	test/ganeti.hypervisor.hv_kvm_unittest.py \
693
694
	test/ganeti.hypervisor.hv_lxc_unittest.py \
	test/ganeti.hypervisor.hv_xen_unittest.py \
695
	test/ganeti.impexpd_unittest.py \
696
	test/ganeti.jqueue_unittest.py \
697
	test/ganeti.locking_unittest.py \
698
	test/ganeti.luxi_unittest.py \
699
	test/ganeti.masterd.instance_unittest.py \
700
	test/ganeti.mcpu_unittest.py \
701
	test/ganeti.netutils_unittest.py \
702
	test/ganeti.objects_unittest.py \
703
	test/ganeti.opcodes_unittest.py \
Agata Murawska's avatar
Agata Murawska committed
704
	test/ganeti.ovf_unittest.py \
705
	test/ganeti.qlang_unittest.py \
706
	test/ganeti.query_unittest.py \
707
	test/ganeti.rapi.baserlib_unittest.py \
David Knowles's avatar
David Knowles committed
708
	test/ganeti.rapi.client_unittest.py \
709
	test/ganeti.rapi.resources_unittest.py \
710
	test/ganeti.rapi.rlib2_unittest.py \
711
	test/ganeti.rpc_unittest.py \
712
	test/ganeti.runtime_unittest.py \
713
714
	test/ganeti.serializer_unittest.py \
	test/ganeti.ssh_unittest.py \
715
	test/ganeti.tools.ensure_dirs_unittest.py \
Balazs Lecz's avatar
Balazs Lecz committed
716
	test/ganeti.uidpool_unittest.py \
717
	test/ganeti.utils.algo_unittest.py \
718
	test/ganeti.utils.filelock_unittest.py \
719
	test/ganeti.utils.hash_unittest.py \
720
	test/ganeti.utils.io_unittest.py \
721
	test/ganeti.utils.log_unittest.py \
722
	test/ganeti.utils.mlock_unittest.py \
723
	test/ganeti.utils.nodesetup_unittest.py \
724
	test/ganeti.utils.process_unittest.py \
725
	test/ganeti.utils.retry_unittest.py \
726
	test/ganeti.utils.text_unittest.py \
727
	test/ganeti.utils.wrapper_unittest.py \
728
	test/ganeti.utils.x509_unittest.py \
729
	test/ganeti.utils_unittest.py \
730
	test/ganeti.workerpool_unittest.py \
731
	test/cfgupgrade_unittest.py \
732
733
	test/docs_unittest.py \
	test/tempfile_fork_unittest.py
734

735
736
haskell_tests = htools/test

737
dist_TESTS = \
738
	test/check-cert-expired_unittest.bash \
739
	test/daemon-util_unittest.bash \
740
	test/ganeti-cleaner_unittest.bash \
741
	test/import-export_unittest.bash \
742
743
	$(python_tests)

744
nodist_TESTS =
745
if WANT_HTOOLSTESTS
746
747
nodist_TESTS += $(haskell_tests)
endif
748
749
750

TESTS = $(dist_TESTS) $(nodist_TESTS)

751
752
753
754
755
# Environment for all tests
PLAIN_TESTS_ENVIRONMENT = \
	PYTHONPATH=. TOP_SRCDIR=$(abs_top_srcdir) PYTHON=$(PYTHON) $(RUN_IN_TEMPDIR)

# Environment for tests run by automake
756
TESTS_ENVIRONMENT = \
757
	$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner
758

759
all_python_code = \
760
	$(dist_sbin_SCRIPTS) \
761
	$(dist_tools_PYTHON) \
762
	$(pkglib_python_scripts) \
763
	$(nodist_pkglib_python_scripts) \
764
	$(python_tests) \
765
	$(pkgpython_PYTHON) \
766
	$(client_PYTHON) \
767
768
	$(hypervisor_PYTHON) \
	$(rapi_PYTHON) \
769
	$(server_PYTHON) \
770
	$(pytools_PYTHON) \
771
772
	$(http_PYTHON) \
	$(confd_PYTHON) \
Michael Hanselmann's avatar
Michael Hanselmann committed
773
	$(masterd_PYTHON) \
774
	$(impexpd_PYTHON) \
775
	$(utils_PYTHON) \
776
	$(watcher_PYTHON) \
777
778
	$(noinst_PYTHON) \
	$(qa_scripts)
779

780
srclink_files = \
Iustin Pop's avatar
Iustin Pop committed
781
	man/footer.rst \
782
	test/check-cert-expired_unittest.bash \
783
	test/daemon-util_unittest.bash \