Makefile.am 39 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_HEADER = $(top_srcdir)/autotools/check-header
Iustin Pop's avatar
Iustin Pop committed
25
CHECK_MAN_DASHES = $(top_srcdir)/autotools/check-man-dashes
26
CHECK_MAN_WARNINGS = $(top_srcdir)/autotools/check-man-warnings
27
CHECK_VERSION = $(top_srcdir)/autotools/check-version
28
CHECK_NEWS = $(top_srcdir)/autotools/check-news
29
CHECK_IMPORTS = $(top_srcdir)/autotools/check-imports
30
DOCPP = $(top_srcdir)/autotools/docpp
31
REPLACE_VARS_SED = autotools/replace_vars.sed
32
CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-constants
33
BUILD_RPC = $(top_srcdir)/autotools/build-rpc
34

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

53 54 55
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:

56 57 58
HTOOLS_DIRS = \
	htools \
	htools/Ganeti \
59 60
	htools/Ganeti/HTools \
	htools/Ganeti/HTools/Program
61

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

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

BUILDTIME_DIRS = \
	$(BUILDTIME_DIR_AUTOCREATE) \
106 107 108 109 110 111 112
	doc/html

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

113
all_dirfiles = $(addsuffix /.dir,$(DIRS) $(BUILDTIME_DIR_AUTOCREATE))
114

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

131
maintainer-clean-local:
132
	rm -rf $(BUILDTIME_DIRS)
133

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

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

built_base_sources = \
165
	ganeti \
166
	stamp-srclinks \
167
	$(all_dirfiles)
168

169
built_python_base_sources = \
170
	lib/_autoconf.py \
171 172 173 174
	lib/_vcsversion.py

BUILT_PYTHON_SOURCES = \
	$(built_python_base_sources) \
175
	lib/_generated_rpc.py
176

177 178 179 180
# Generating the RPC wrappers depends on many things, so make sure it's built at
# the end of the built sources
lib/_generated_rpc.py: | $(built_base_sources) $(built_python_base_sources)

181 182 183 184 185 186 187 188
# these are all built from the underlying %.in sources
BUILT_EXAMPLES = \
	doc/examples/ganeti-kvm-poweroff.initd \
	doc/examples/ganeti.cron \
	doc/examples/ganeti.initd \
	doc/examples/gnt-config-backup \
	doc/examples/hooks/ipsec

189 190 191
nodist_pkgpython_PYTHON = \
	$(BUILT_PYTHON_SOURCES)

192
noinst_PYTHON = \
Michael Hanselmann's avatar
Michael Hanselmann committed
193 194
	lib/build/__init__.py \
	lib/build/sphinx_ext.py
195

196 197
pkgpython_PYTHON = \
	lib/__init__.py \
Guido Trotter's avatar
Guido Trotter committed
198
	lib/asyncnotifier.py \
199 200 201 202 203
	lib/backend.py \
	lib/bdev.py \
	lib/bootstrap.py \
	lib/cli.py \
	lib/cmdlib.py \
204
	lib/compat.py \
205 206
	lib/config.py \
	lib/constants.py \
207
	lib/daemon.py \
208
	lib/errors.py \
209
	lib/ht.py \
210
	lib/jqueue.py \
211
	lib/jstore.py \
212 213 214
	lib/locking.py \
	lib/luxi.py \
	lib/mcpu.py \
215
	lib/netutils.py \
216 217
	lib/objects.py \
	lib/opcodes.py \
218
	lib/ovf.py \
219
	lib/qlang.py \
220
	lib/query.py \
221
	lib/rpc.py \
222
	lib/rpc_defs.py \
223
	lib/runtime.py \
224 225 226
	lib/serializer.py \
	lib/ssconf.py \
	lib/ssh.py \
227
	lib/storage.py \
228
	lib/uidpool.py \
229
	lib/workerpool.py
230

231
client_PYTHON = \
232
	lib/client/__init__.py \
233
	lib/client/gnt_backup.py \
234
	lib/client/gnt_cluster.py \
235
	lib/client/gnt_debug.py \
236
	lib/client/gnt_group.py \
237
	lib/client/gnt_instance.py \
238
	lib/client/gnt_job.py \
239
	lib/client/gnt_node.py \
240
	lib/client/gnt_os.py
241

242 243 244
hypervisor_PYTHON = \
	lib/hypervisor/__init__.py \
	lib/hypervisor/hv_base.py \
245
	lib/hypervisor/hv_chroot.py \
246
	lib/hypervisor/hv_fake.py \
Guido Trotter's avatar
Guido Trotter committed
247
	lib/hypervisor/hv_kvm.py \
Iustin Pop's avatar
Iustin Pop committed
248
	lib/hypervisor/hv_lxc.py \
249 250
	lib/hypervisor/hv_xen.py

251 252
rapi_PYTHON = \
	lib/rapi/__init__.py \
253
	lib/rapi/baserlib.py \
David Knowles's avatar
David Knowles committed
254
	lib/rapi/client.py \
255
	lib/rapi/client_utils.py \
256
	lib/rapi/connector.py \
257 258
	lib/rapi/rlib2.py \
	lib/rapi/testutils.py
259

260
http_PYTHON = \
261
	lib/http/__init__.py \
262
	lib/http/auth.py \
263 264
	lib/http/client.py \
	lib/http/server.py
265

Guido Trotter's avatar
Guido Trotter committed
266
confd_PYTHON = \
Guido Trotter's avatar
Guido Trotter committed
267
	lib/confd/__init__.py \
Guido Trotter's avatar
Guido Trotter committed
268
	lib/confd/client.py \
269 270
	lib/confd/querylib.py \
	lib/confd/server.py
271

Michael Hanselmann's avatar
Michael Hanselmann committed
272
masterd_PYTHON = \
273 274
	lib/masterd/__init__.py \
	lib/masterd/instance.py
Michael Hanselmann's avatar
Michael Hanselmann committed
275

276 277 278
impexpd_PYTHON = \
	lib/impexpd/__init__.py

279
watcher_PYTHON = \
280
	lib/watcher/__init__.py \
281 282
	lib/watcher/nodemaint.py \
	lib/watcher/state.py
283

284
server_PYTHON = \
285
	lib/server/__init__.py \
286
	lib/server/confd.py \
287
	lib/server/masterd.py \
288 289
	lib/server/noded.py \
	lib/server/rapi.py
290

291 292 293 294
pytools_PYTHON = \
	lib/tools/__init__.py \
	lib/tools/ensure_dirs.py

295
utils_PYTHON = \
296
	lib/utils/__init__.py \
297
	lib/utils/algo.py \
298
	lib/utils/filelock.py \
299
	lib/utils/hash.py \
300
	lib/utils/io.py \
301
	lib/utils/log.py \
302
	lib/utils/mlock.py \
303
	lib/utils/nodesetup.py \
304
	lib/utils/process.py \
305
	lib/utils/retry.py \
306
	lib/utils/text.py \
307 308
	lib/utils/wrapper.py \
	lib/utils/x509.py
309

Michael Hanselmann's avatar
Michael Hanselmann committed
310
docrst = \
311
	doc/admin.rst \
312
	doc/design-2.0.rst \
313
	doc/design-2.1.rst \
314
	doc/design-2.2.rst \
Guido Trotter's avatar
Guido Trotter committed
315
	doc/design-2.3.rst \
316
	doc/design-htools-2.3.rst \
317
	doc/design-2.4.rst \
318
	doc/design-2.5.rst \
319
	doc/design-draft.rst \
320
	doc/design-oob.rst \
Tsachy Shacham's avatar
Tsachy Shacham committed
321
	doc/design-cpu-pinning.rst \
322
	doc/design-query2.rst \
323
	doc/design-x509-ca.rst \
324
	doc/design-http-server.rst \
325
	doc/design-impexp2.rst \
326
	doc/design-lu-generated-jobs.rst \
327
	doc/design-multi-reloc.rst \
328
	doc/design-network.rst \
Michael Hanselmann's avatar
Michael Hanselmann committed
329
	doc/design-chained-jobs.rst \
330
	doc/design-ovf-support.rst \
331
	doc/design-resource-model.rst \
332
	doc/cluster-merge.rst \
333
	doc/design-shared-storage.rst \
334
	doc/design-node-state-cache.rst \
335
	doc/design-virtual-clusters.rst \
336
	doc/devnotes.rst \
337
	doc/glossary.rst \
338
	doc/hooks.rst \
339
	doc/iallocator.rst \
340
	doc/index.rst \
341
	doc/install-quick.rst \
342
	doc/install.rst \
343
	doc/locking.rst \
344
	doc/move-instance.rst \
Iustin Pop's avatar
Iustin Pop committed
345
	doc/news.rst \
346
	doc/rapi.rst \
347
	doc/security.rst \
348
	doc/upgrade.rst \
Iustin Pop's avatar
Iustin Pop committed
349
	doc/walkthrough.rst
Michael Hanselmann's avatar
Michael Hanselmann committed
350

351
HS_PROGS = htools/htools
352
HS_BIN_ROLES = hbal hscan hspace hinfo
353

354 355
HS_ALL_PROGS = $(HS_PROGS) htools/test
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
356
# we don't add -Werror by default
357
HFLAGS = -O -Wall -fwarn-monomorphism-restriction -fwarn-tabs -ihtools
358
# extra flags that can be overriden on the command line
359
HEXTRA =
360 361
# internal extra flags (used for htools/test mainly)
HEXTRA_INT =
362
# exclude options for coverage reports
363
HPCEXCL = --exclude Main \
364
	--exclude Ganeti.Constants \
365 366 367
	--exclude Ganeti.THH \
	--exclude Ganeti.HTools.QC \
	--exclude Ganeti.HTools.QCHelper \
368
	--exclude Ganeti.HTools.Version
369

370
HS_LIB_SRCS = \
371 372
	htools/Ganeti/HTools/CLI.hs \
	htools/Ganeti/HTools/Cluster.hs \
373
	htools/Ganeti/HTools/Compat.hs \
374 375 376 377 378
	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 \
379
	htools/Ganeti/HTools/JSON.hs \
380 381 382 383 384
	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 \
385
	htools/Ganeti/HTools/QCHelper.hs \
386 387 388 389 390
	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 \
391
	htools/Ganeti/HTools/Program.hs \
392
	htools/Ganeti/HTools/Program/Hail.hs \
393
	htools/Ganeti/HTools/Program/Hbal.hs \
394
	htools/Ganeti/HTools/Program/Hinfo.hs \
395
	htools/Ganeti/HTools/Program/Hscan.hs \
396
	htools/Ganeti/HTools/Program/Hspace.hs \
397
	htools/Ganeti/BasicTypes.hs \
398
	htools/Ganeti/Confd.hs \
399
	htools/Ganeti/Config.hs \
400 401
	htools/Ganeti/Jobs.hs \
	htools/Ganeti/Luxi.hs \
402
	htools/Ganeti/Objects.hs \
403 404
	htools/Ganeti/OpCodes.hs \
	htools/Ganeti/THH.hs
405

406
HS_BUILT_SRCS = htools/Ganeti/HTools/Version.hs htools/Ganeti/Constants.hs
407
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
408

409 410
$(RUN_IN_TEMPDIR): | $(all_dirfiles)

Iustin Pop's avatar
Iustin Pop committed
411 412 413 414 415
# 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
416
doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
Iustin Pop's avatar
Iustin Pop committed
417
	$(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
418
	| $(BUILT_PYTHON_SOURCES)
419 420
	@test -n "$(SPHINX)" || \
	    { echo 'sphinx-build' not found during configure; exit 1; }
421
	@mkdir_p@ $(dir $@)
422
	PYTHONPATH=. $(RUN_IN_TEMPDIR) $(SPHINX) -q -W -b html \
423
	    -d . \
424 425
	    -D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \
	    -D release="$(PACKAGE_VERSION)" \
426 427 428 429
	    $(abs_top_srcdir)/doc $(CURDIR)/doc/html
	rm -f doc/html/.buildinfo doc/html/objects.inv
	touch $@

430
doc/html: doc/html/index.html
Iustin Pop's avatar
Iustin Pop committed
431

432
doc/install-quick.rst: INSTALL
433
doc/news.rst: NEWS
434
doc/upgrade.rst: UPGRADE
435

436
doc/install-quick.rst doc/news.rst doc/upgrade.rst:
437 438 439 440 441 442 443
	set -e; \
	{ echo '.. This file is automatically updated at build time from $<.'; \
	  echo '.. Do not edit.'; \
	  echo; \
	  cat $<; \
	} > $@

444
docdot = \
445 446 447
	doc/arch-2.0.dot \
	doc/design-2.1-lock-acquire.dot \
	doc/design-2.1-lock-release.dot
448

449
docpng = $(patsubst %.dot,%.png,$(docdot))
450

451 452 453 454 455
# Things to build but not to install (add it to EXTRA_DIST if it should be
# distributed)
noinst_DATA = \
	devel/upload \
	doc/html \
456
	$(BUILT_EXAMPLES) \
457 458
	doc/examples/bash_completion \
	$(manhtml)
459

460
gnt_scripts = \
461 462 463
	scripts/gnt-backup \
	scripts/gnt-cluster \
	scripts/gnt-debug \
464
	scripts/gnt-group \
465 466 467 468 469
	scripts/gnt-instance \
	scripts/gnt-job \
	scripts/gnt-node \
	scripts/gnt-os

470
PYTHON_BOOTSTRAP_SBIN = \
471
	daemons/ganeti-confd \
472
	daemons/ganeti-masterd \
473
	daemons/ganeti-noded \
474
	daemons/ganeti-watcher \
475
	daemons/ganeti-rapi \
476
	$(gnt_scripts)
477

478 479 480 481
PYTHON_BOOTSTRAP = \
	$(PYTHON_BOOTSTRAP_SBIN) \
	tools/ensure-dirs

482 483 484 485 486 487 488
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
489
	qa/qa_group.py \
490 491 492 493 494 495 496
	qa/qa_instance.py \
	qa/qa_node.py \
	qa/qa_os.py \
	qa/qa_rapi.py \
	qa/qa_tags.py \
	qa/qa_utils.py

497 498
bin_SCRIPTS =
if WANT_HTOOLS
499
bin_SCRIPTS += $(filter-out htools/hail,$(HS_PROGS))
500 501
install-exec-hook:
	@mkdir_p@ $(DESTDIR)$(iallocatorsdir)
502 503
# FIXME: this is a hardcoded logic, instead of auto-resolving
	$(LN_S) -f ../../../bin/htools \
504
		   $(DESTDIR)$(iallocatorsdir)/hail
505
	for role in $(HS_BIN_ROLES); do \
506
		$(LN_S) -f htools \
507 508
			   $(DESTDIR)$(bindir)/$$role ; \
	done
509 510
endif

511
$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
512 513 514 515
	@if [ -z "$(HTOOLS)" ]; then \
	  echo "Error: htools compilation disabled at configure time" 1>&2 ;\
	  exit 1; \
	fi
516 517
	@BINARY=$(@:htools/%=%); \
	if [ "$BINARY" = "test" ] && [ -z "$(GHC_PKG_QUICKCHECK)" ]; then \
518 519
	  echo "Error: cannot run unittests without the QuickCheck library (see devnotes.rst)" 1>&2; \
	  exit 1; \
520
	fi
521
	rm -f $(@:htools/%=%).tix
522
	BINARY=$(@:htools/%=%); $(GHC) --make \
Iustin Pop's avatar
Iustin Pop committed
523
	  $(HFLAGS) \
524
	  $(HTOOLS_NOCURL) $(HTOOLS_PARALLEL3) \
Iustin Pop's avatar
Iustin Pop committed
525
	  -osuf $$BINARY.o -hisuf $$BINARY.hi \
526
	  $(HEXTRA) $(HEXTRA_INT) $@
527

528
# for the htools/test binary, we need to enable profiling/coverage
529
htools/test: HEXTRA_INT=-fhpc -Wwarn -fno-warn-missing-signatures \
530 531 532
	-fno-warn-monomorphism-restriction -fno-warn-orphans \
	-fno-warn-missing-methods -fno-warn-unused-imports

533 534 535 536 537 538 539 540 541 542 543 544 545 546
# rules for building profiling-enabled versions of the haskell
# programs: hs-prof does the full two-step build, whereas
# hs-prof-quick does only the final rebuild (hs-prof must have been
# run before)
.PHONY: hs-prof hs-prof-quick
hs-prof:
	$(MAKE) clean
	$(MAKE) $(HS_ALL_PROGS) HEXTRA="-osuf .o"
	rm -f $(HS_ALL_PROGS)
	$(MAKE) hs-prof-quick

hs-prof-quick:
	$(MAKE) $(HS_ALL_PROGS) HEXTRA="-osuf .prof_o -prof -auto-all"

547 548
dist_sbin_SCRIPTS = \
	tools/ganeti-listrunner
549

550
nodist_sbin_SCRIPTS = \
551
	$(PYTHON_BOOTSTRAP_SBIN) \
552 553
	daemons/ganeti-cleaner

554
python_scripts = \
555 556 557
	tools/burnin \
	tools/cfgshell \
	tools/cfgupgrade \
558
	tools/cfgupgrade12 \
559
	tools/cluster-merge \
Iustin Pop's avatar
Iustin Pop committed
560
	tools/confd-client \
561
	tools/fmtjson \
Iustin Pop's avatar
Iustin Pop committed
562
	tools/lvmstrap \
563
	tools/move-instance \
564
	tools/ovfconverter \
565
	tools/setup-ssh \
Iustin Pop's avatar
Iustin Pop committed
566
	tools/sanitize-config
567

568
dist_tools_SCRIPTS = \
569
	$(python_scripts) \
570
	tools/kvm-console-wrapper \
571 572
	tools/xm-console-wrapper \
	tools/master-ip-setup
573

574
pkglib_python_scripts = \
575 576
	daemons/import-export \
	tools/check-cert-expired
577

578 579 580
nodist_pkglib_python_scripts = \
	tools/ensure-dirs

581
myexeclib_SCRIPTS = \
582
	daemons/daemon-util \
583
	tools/kvm-ifup \
584
	$(pkglib_python_scripts)
585

586
nodist_myexeclib_SCRIPTS = \
587 588
	$(nodist_pkglib_python_scripts)

589 590
EXTRA_DIST = \
	NEWS \
591
	UPGRADE \
592
	epydoc.conf.in \
Michael Hanselmann's avatar
Michael Hanselmann committed
593
	pylintrc \
594
	autotools/build-bash-completion \
595
	autotools/build-rpc \
596
	autotools/check-header \
597
	autotools/check-python-code \
598
	autotools/check-imports \
Iustin Pop's avatar
Iustin Pop committed
599
	autotools/check-man-dashes \
600
	autotools/check-man-warnings \
601
	autotools/check-news \
602
	autotools/check-tar \
603
	autotools/check-version \
604
	autotools/convert-constants \
605
	autotools/docpp \
606
	autotools/gen-coverage \
607
	autotools/testrunner \
608
	$(RUN_IN_TEMPDIR) \
609
	daemons/daemon-util.in \
610
	daemons/ganeti-cleaner.in \
611
	$(pkglib_python_scripts) \
612
	devel/upload.in \
613
	tools/kvm-ifup.in \
614
	$(docdot) \
615
	$(docpng) \
616 617 618
	$(docrst) \
	doc/conf.py \
	doc/html \
619
	$(BUILT_EXAMPLES:%=%.in) \
620 621
	doc/examples/ganeti.default \
	doc/examples/ganeti.default-debug \
Guido Trotter's avatar
Guido Trotter committed
622
	doc/examples/hooks/ethers \
623 624 625
	doc/examples/gnt-debug/README \
	doc/examples/gnt-debug/delay0.json \
	doc/examples/gnt-debug/delay50.json \
626
	test/lockperf.py \
627 628 629 630
	test/testutils.py \
	test/mocks.py \
	$(dist_TESTS) \
	$(TEST_FILES) \
Iustin Pop's avatar
Iustin Pop committed
631 632
	man/footer.rst \
	$(manrst) \
633
	$(maninput) \
Michael Hanselmann's avatar
Michael Hanselmann committed
634
	qa/qa-sample.json \
635
	$(qa_scripts) \
636
	$(HS_LIB_SRCS) $(HS_BUILT_SRCS_IN) \
637 638
	$(HS_PROG_SRCS) \
	htools/lint-hints.hs
639 640 641

man_MANS = \
	man/ganeti.7 \
642
	man/ganeti-cleaner.8 \
Guido Trotter's avatar
Guido Trotter committed
643
	man/ganeti-confd.8 \
644
	man/ganeti-listrunner.8 \
645
	man/ganeti-masterd.8 \
646 647
	man/ganeti-noded.8 \
	man/ganeti-os-interface.7 \
648
	man/ganeti-rapi.8 \
649 650 651
	man/ganeti-watcher.8 \
	man/gnt-backup.8 \
	man/gnt-cluster.8 \
652
	man/gnt-debug.8 \
653
	man/gnt-group.8 \
654
	man/gnt-instance.8 \
655
	man/gnt-job.8 \
656
	man/gnt-node.8 \
657 658 659
	man/gnt-os.8 \
	man/hail.1 \
	man/hbal.1 \
René Nussbaumer's avatar
René Nussbaumer committed
660
	man/hinfo.1 \
661
	man/hscan.1 \
Iustin Pop's avatar
Iustin Pop committed
662 663
	man/hspace.1 \
	man/htools.1
664

665
manrst = $(patsubst %.1,%.rst,$(patsubst %.7,%.rst,$(patsubst %.8,%.rst,$(man_MANS))))
Iustin Pop's avatar
Iustin Pop committed
666
manhtml = $(patsubst %.rst,%.html,$(manrst))
667
mangen = $(patsubst %.rst,%.gen,$(manrst))
668
maninput = \
669
	$(patsubst %.1,%.1.in,$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS)))) \
Iustin Pop's avatar
Iustin Pop committed
670
	$(patsubst %.html,%.html.in,$(manhtml)) \
671
	man/footer.man man/footer.html $(mangen)
672 673

TEST_FILES = \
Manuel Franceschini's avatar
Manuel Franceschini committed
674 675 676 677 678
	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 \
679
	test/data/cert1.pem \
680 681 682 683 684 685 686
	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 \
687
	test/data/proc_drbd8.txt \
688
	test/data/proc_drbd80-emptyline.txt \
689
	test/data/proc_drbd83.txt \
690 691
	test/data/proc_drbd83_sync.txt \
	test/data/proc_drbd83_sync_krnl2.6.39.txt \
692 693 694 695
	test/data/kvm_1.0_help.txt \
	test/data/kvm_0.15.90_help.txt \
	test/data/kvm_0.12.5_help.txt \
	test/data/kvm_0.9.1_help.txt \
696
	test/data/sys_drbd_usermode_helper.txt \
Agata Murawska's avatar
Agata Murawska committed
697
	test/data/ovfdata/compr_disk.vmdk.gz \
Agata Murawska's avatar
Agata Murawska committed
698
	test/data/ovfdata/config.ini \
Agata Murawska's avatar
Agata Murawska committed
699
	test/data/ovfdata/corrupted_resources.ovf \
Agata Murawska's avatar
Agata Murawska committed
700
	test/data/ovfdata/empty.ini \
Agata Murawska's avatar
Agata Murawska committed
701 702 703 704 705
	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
706
	test/data/ovfdata/no_disk.ini \
Agata Murawska's avatar
Agata Murawska committed
707
	test/data/ovfdata/no_disk_in_ref.ovf \
Agata Murawska's avatar