Makefile.am 36.8 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
BUILD_RPC = $(top_srcdir)/autotools/build-rpc
32

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

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

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

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

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

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

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

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

112 113 114 115 116 117 118 119
# 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
120
MAINTAINERCLEANFILES = \
121
	$(docpng) \
122
	$(maninput) \
123
	doc/install-quick.rst \
124
	doc/news.rst \
125
	doc/upgrade.rst \
126
	vcs-version
Iustin Pop's avatar
Iustin Pop committed
127

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

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

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

167
BUILT_PYTHON_SOURCES = \
168
	lib/_autoconf.py \
169 170
	lib/_vcsversion.py \
	lib/_generated_rpc.py
171

172 173 174
nodist_pkgpython_PYTHON = \
	$(BUILT_PYTHON_SOURCES)

175
noinst_PYTHON = \
Michael Hanselmann's avatar
Michael Hanselmann committed
176 177
	lib/build/__init__.py \
	lib/build/sphinx_ext.py
178

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

214
client_PYTHON = \
215
	lib/client/__init__.py \
216
	lib/client/gnt_backup.py \
217
	lib/client/gnt_cluster.py \
218
	lib/client/gnt_debug.py \
219
	lib/client/gnt_group.py \
220
	lib/client/gnt_instance.py \
221
	lib/client/gnt_job.py \
222
	lib/client/gnt_node.py \
223
	lib/client/gnt_os.py
224

225 226 227
hypervisor_PYTHON = \
	lib/hypervisor/__init__.py \
	lib/hypervisor/hv_base.py \
228
	lib/hypervisor/hv_chroot.py \
229
	lib/hypervisor/hv_fake.py \
Guido Trotter's avatar
Guido Trotter committed
230
	lib/hypervisor/hv_kvm.py \
Iustin Pop's avatar
Iustin Pop committed
231
	lib/hypervisor/hv_lxc.py \
232 233
	lib/hypervisor/hv_xen.py

234 235
rapi_PYTHON = \
	lib/rapi/__init__.py \
236
	lib/rapi/baserlib.py \
David Knowles's avatar
David Knowles committed
237
	lib/rapi/client.py \
238
	lib/rapi/client_utils.py \
239 240
	lib/rapi/connector.py \
	lib/rapi/rlib2.py
241

242
http_PYTHON = \
243
	lib/http/__init__.py \
244
	lib/http/auth.py \
245 246
	lib/http/client.py \
	lib/http/server.py
247

Guido Trotter's avatar
Guido Trotter committed
248
confd_PYTHON = \
Guido Trotter's avatar
Guido Trotter committed
249
	lib/confd/__init__.py \
Guido Trotter's avatar
Guido Trotter committed
250
	lib/confd/client.py \
251 252
	lib/confd/querylib.py \
	lib/confd/server.py
253

Michael Hanselmann's avatar
Michael Hanselmann committed
254
masterd_PYTHON = \
255 256
	lib/masterd/__init__.py \
	lib/masterd/instance.py
Michael Hanselmann's avatar
Michael Hanselmann committed
257

258 259 260
impexpd_PYTHON = \
	lib/impexpd/__init__.py

261
watcher_PYTHON = \
262
	lib/watcher/__init__.py \
263 264
	lib/watcher/nodemaint.py \
	lib/watcher/state.py
265

266
server_PYTHON = \
267
	lib/server/__init__.py \
268
	lib/server/confd.py \
269
	lib/server/masterd.py \
270 271
	lib/server/noded.py \
	lib/server/rapi.py
272

273 274 275 276
pytools_PYTHON = \
	lib/tools/__init__.py \
	lib/tools/ensure_dirs.py

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

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

333 334
HS_PROGS = htools/htools
HS_BIN_ROLES = hbal hscan hspace
335

336 337
HS_ALL_PROGS = $(HS_PROGS) htools/test
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
338
# we don't add -Werror by default
339
HFLAGS = -O -Wall -fwarn-monomorphism-restriction -fwarn-tabs -ihtools
340
# extra flags that can be overriden on the command line
341
HEXTRA =
342
# exclude options for coverage reports
343
HPCEXCL = --exclude Main \
344
	--exclude Ganeti.Constants \
345 346 347
	--exclude Ganeti.THH \
	--exclude Ganeti.HTools.QC \
	--exclude Ganeti.HTools.QCHelper \
348
	--exclude Ganeti.HTools.Version
349

350
HS_LIB_SRCS = \
351 352
	htools/Ganeti/HTools/CLI.hs \
	htools/Ganeti/HTools/Cluster.hs \
353
	htools/Ganeti/HTools/Compat.hs \
354 355 356 357 358
	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 \
359
	htools/Ganeti/HTools/JSON.hs \
360 361 362 363 364
	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 \
365
	htools/Ganeti/HTools/QCHelper.hs \
366 367 368 369 370
	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 \
371
	htools/Ganeti/HTools/Program/Hail.hs \
372
	htools/Ganeti/HTools/Program/Hbal.hs \
373
	htools/Ganeti/HTools/Program/Hscan.hs \
374
	htools/Ganeti/HTools/Program/Hspace.hs \
375 376
	htools/Ganeti/Jobs.hs \
	htools/Ganeti/Luxi.hs \
377 378
	htools/Ganeti/OpCodes.hs \
	htools/Ganeti/THH.hs
379

380
HS_BUILT_SRCS = htools/Ganeti/HTools/Version.hs htools/Ganeti/Constants.hs
381
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
382

383 384
$(RUN_IN_TEMPDIR): | $(all_dirfiles)

Iustin Pop's avatar
Iustin Pop committed
385 386 387 388 389
# 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
390
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
Iustin Pop's avatar
Iustin Pop committed
391
	$(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
392
	| $(BUILT_PYTHON_SOURCES)
393 394
	@test -n "$(SPHINX)" || \
	    { echo 'sphinx-build' not found during configure; exit 1; }
395
	@mkdir_p@ $(dir $@)
396
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
397
	    -d . \
398 399
	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
	    -D release="$(PACKAGE_VERSION)" \
400 401 402 403
	    $(abs_top_srcdir)/doc $(CURDIR)/doc/html
	rm -f doc/html/.buildinfo doc/html/objects.inv
	touch $@

404
doc/html: doc/html/index.html
Iustin Pop's avatar
Iustin Pop committed
405

406
doc/install-quick.rst: INSTALL
407
doc/news.rst: NEWS
408
doc/upgrade.rst: UPGRADE
409

410
doc/install-quick.rst doc/news.rst doc/upgrade.rst:
411 412 413 414 415 416 417
	set -e; \
	{ echo '.. This file is automatically updated at build time from $<.'; \
	  echo '.. Do not edit.'; \
	  echo; \
	  cat $<; \
	} > $@

418
docdot = \
419 420 421
	doc/arch-2.0.dot \
	doc/design-2.1-lock-acquire.dot \
	doc/design-2.1-lock-release.dot
422

423
docpng = $(patsubst %.dot,%.png,$(docdot))
424

425 426 427 428 429 430 431 432
# 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 \
433
	doc/examples/ganeti-kvm-poweroff.initd \
434
	doc/examples/gnt-config-backup \
435 436
	doc/examples/hooks/ipsec \
	$(manhtml)
437

438
gnt_scripts = \
439 440 441
	scripts/gnt-backup \
	scripts/gnt-cluster \
	scripts/gnt-debug \
442
	scripts/gnt-group \
443 444 445 446 447
	scripts/gnt-instance \
	scripts/gnt-job \
	scripts/gnt-node \
	scripts/gnt-os

448
PYTHON_BOOTSTRAP_SBIN = \
449
	daemons/ganeti-confd \
450
	daemons/ganeti-masterd \
451
	daemons/ganeti-noded \
452
	daemons/ganeti-watcher \
453
	daemons/ganeti-rapi \
454
	scripts/gnt-backup \
455
	scripts/gnt-cluster \
456
	scripts/gnt-debug \
457
	scripts/gnt-group \
458
	scripts/gnt-instance \
459
	scripts/gnt-job \
460
	scripts/gnt-node \
461
	scripts/gnt-os
462

463 464 465 466
PYTHON_BOOTSTRAP = \
	$(PYTHON_BOOTSTRAP_SBIN) \
	tools/ensure-dirs

467 468 469 470 471 472 473
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
474
	qa/qa_group.py \
475 476 477 478 479 480 481
	qa/qa_instance.py \
	qa/qa_node.py \
	qa/qa_os.py \
	qa/qa_rapi.py \
	qa/qa_tags.py \
	qa/qa_utils.py

482 483
bin_SCRIPTS =
if WANT_HTOOLS
484
bin_SCRIPTS += $(filter-out htools/hail,$(HS_PROGS))
485 486
install-exec-hook:
	@mkdir_p@ $(DESTDIR)$(iallocatorsdir)
487 488
# FIXME: this is a hardcoded logic, instead of auto-resolving
	$(LN_S) -f ../../../bin/htools \
489
		   $(DESTDIR)$(iallocatorsdir)/hail
490
	for role in $(HS_BIN_ROLES); do \
491
		$(LN_S) -f htools \
492 493
			   $(DESTDIR)$(bindir)/$$role ; \
	done
494 495
endif

496
$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
497 498 499 500
	@if [ -z "$(HTOOLS)" ]; then \
	  echo "Error: htools compilation disabled at configure time" 1>&2 ;\
	  exit 1; \
	fi
501 502
	@BINARY=$(@:htools/%=%); \
	if [ "$BINARY" = "test" ] && [ -z "$(GHC_PKG_QUICKCHECK)" ]; then \
503 504
	  echo "Error: cannot run unittests without the QuickCheck library (see devnotes.rst)" 1>&2; \
	  exit 1; \
505 506
	fi
	BINARY=$(@:htools/%=%); $(GHC) --make \
Iustin Pop's avatar
Iustin Pop committed
507
	  $(HFLAGS) \
508
	  $(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) \
Iustin Pop's avatar
Iustin Pop committed
509 510
	  -osuf $$BINARY.o -hisuf $$BINARY.hi \
	  $(HEXTRA) $@
511

512 513 514 515 516
# 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

517 518
dist_sbin_SCRIPTS = \
	tools/ganeti-listrunner
519

520
nodist_sbin_SCRIPTS = \
521
	$(PYTHON_BOOTSTRAP_SBIN) \
522 523
	daemons/ganeti-cleaner

524
dist_tools_PYTHON = \
525 526 527
	tools/burnin \
	tools/cfgshell \
	tools/cfgupgrade \
528
	tools/cfgupgrade12 \
529
	tools/cluster-merge \
Iustin Pop's avatar
Iustin Pop committed
530
	tools/lvmstrap \
531
	tools/move-instance \
532
	tools/ovfconverter \
533
	tools/setup-ssh \
Iustin Pop's avatar
Iustin Pop committed
534
	tools/sanitize-config
535

536 537
dist_tools_SCRIPTS = \
	$(dist_tools_PYTHON) \
538
	tools/kvm-console-wrapper \
539 540
	tools/xm-console-wrapper

541
pkglib_python_scripts = \
542 543
	daemons/import-export \
	tools/check-cert-expired
544

545 546 547
nodist_pkglib_python_scripts = \
	tools/ensure-dirs

548
pkglib_SCRIPTS = \
549
	daemons/daemon-util \
550
	tools/kvm-ifup \
551
	$(pkglib_python_scripts)
552

553 554 555
nodist_pkglib_SCRIPTS = \
	$(nodist_pkglib_python_scripts)

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

man_MANS = \
	man/ganeti.7 \
609
	man/ganeti-cleaner.8 \
Guido Trotter's avatar
Guido Trotter committed
610
	man/ganeti-confd.8 \
611
	man/ganeti-listrunner.8 \
612
	man/ganeti-masterd.8 \
613 614
	man/ganeti-noded.8 \
	man/ganeti-os-interface.7 \
615
	man/ganeti-rapi.8 \
616 617 618
	man/ganeti-watcher.8 \
	man/gnt-backup.8 \
	man/gnt-cluster.8 \
619
	man/gnt-debug.8 \
620
	man/gnt-group.8 \
621
	man/gnt-instance.8 \
622
	man/gnt-job.8 \
623
	man/gnt-node.8 \
624 625 626 627
	man/gnt-os.8 \
	man/hail.1 \
	man/hbal.1 \
	man/hscan.1 \
Iustin Pop's avatar
Iustin Pop committed
628 629
	man/hspace.1 \
	man/htools.1
630

631
manrst = $(patsubst %.1,%.rst,$(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS))))
Iustin Pop's avatar
Iustin Pop committed
632
manhtml = $(patsubst %.rst,%.html,$(manrst))
633
mangen = $(patsubst %.rst,%.gen,$(manrst))
634
maninput = \
635
	$(patsubst %.1,%.1.in,$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS)))) \
Iustin Pop's avatar
Iustin Pop committed
636
	$(patsubst %.html,%.html.in,$(manhtml)) \
637
	man/footer.man man/footer.html $(mangen)
638 639

TEST_FILES = \
Manuel Franceschini's avatar
Manuel Franceschini committed
640 641 642 643 644
	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 \
645
	test/data/cert1.pem \
646 647 648 649 650 651 652
	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 \
653
	test/data/proc_drbd8.txt \
654
	test/data/proc_drbd80-emptyline.txt \
655
	test/data/proc_drbd83.txt \
656 657
	test/data/proc_drbd83_sync.txt \
	test/data/proc_drbd83_sync_krnl2.6.39.txt \
658
	test/data/sys_drbd_usermode_helper.txt \
Agata Murawska's avatar
Agata Murawska committed
659
	test/data/ovfdata/compr_disk.vmdk.gz \
Agata Murawska's avatar
Agata Murawska committed
660
	test/data/ovfdata/config.ini \
Agata Murawska's avatar
Agata Murawska committed
661
	test/data/ovfdata/corrupted_resources.ovf \
Agata Murawska's avatar
Agata Murawska committed
662
	test/data/ovfdata/empty.ini \
Agata Murawska's avatar
Agata Murawska committed
663 664 665 666 667
	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
668
	test/data/ovfdata/no_disk.ini \
Agata Murawska's avatar
Agata Murawska committed
669
	test/data/ovfdata/no_disk_in_ref.ovf \
Agata Murawska's avatar
Agata Murawska committed
670
	test/data/ovfdata/no_os.ini \
Agata Murawska's avatar
Agata Murawska committed
671 672 673
	test/data/ovfdata/no_ovf.ova \
	test/data/ovfdata/ova.ova \
	test/data/ovfdata/second_disk.vmdk \
Agata Murawska's avatar
Agata Murawska committed
674 675
	test/data/ovfdata/rawdisk.raw \
	test/data/ovfdata/unsafe_path.ini \
Agata Murawska's avatar
Agata Murawska committed
676 677
	test/data/ovfdata/virtualbox.ovf \
	test/data/ovfdata/wrong_extension.ovd \
Agata Murawska's avatar
Agata Murawska committed
678
	test/data/ovfdata/wrong_config.ini \
Agata Murawska's avatar
Agata Murawska committed
679 680 681 682
	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
683
	test/data/ovfdata/other/rawdisk.raw \
684
	test/import-export_unittest-helper
685

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