Makefile.am 81.5 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
# Helper function to strip src/ and test/hs/ from a list
strip_hsroot = $(patsubst src/%,%,$(patsubst test/hs/%,%,$(1)))

20 21 22
# Use bash in order to be able to use pipefail
SHELL=/bin/bash

23 24 25
# Enable colors in shelltest
SHELLTESTARGS = "-c"

26
ACLOCAL_AMFLAGS = -I autotools
27
BUILD_BASH_COMPLETION = $(top_srcdir)/autotools/build-bash-completion
28
RUN_IN_TEMPDIR = $(top_srcdir)/autotools/run-in-tempdir
29
CHECK_PYTHON_CODE = $(top_srcdir)/autotools/check-python-code
30
CHECK_HEADER = $(top_srcdir)/autotools/check-header
Iustin Pop's avatar
Iustin Pop committed
31
CHECK_MAN_DASHES = $(top_srcdir)/autotools/check-man-dashes
32
CHECK_MAN_REFERENCES = $(top_srcdir)/autotools/check-man-references
33
CHECK_MAN_WARNINGS = $(top_srcdir)/autotools/check-man-warnings
34
CHECK_VERSION = $(top_srcdir)/autotools/check-version
35
CHECK_NEWS = $(top_srcdir)/autotools/check-news
36
CHECK_IMPORTS = $(top_srcdir)/autotools/check-imports
37
DOCPP = $(top_srcdir)/autotools/docpp
38
REPLACE_VARS_SED = autotools/replace_vars.sed
39
PRINT_PY_CONSTANTS = $(top_srcdir)/autotools/print-py-constants
40
BUILD_RPC = $(top_srcdir)/autotools/build-rpc
41
SHELL_ENV_INIT = autotools/shell-env-init
42

43
# starting as of Ganeti 2.10, all files are stored in two directories,
44
# with only symbolic links added at other places.
45 46 47 48 49 50 51 52 53 54 55 56 57
#
# $(versiondir) contains most of Ganeti and all architecture-dependent files
# $(versionedsharedir) contains only architecture-independent files; all python
# executables need to go directly to $(versionedsharedir), as all ganeti python
# mdules are installed outside the usual python path, i.e., as private modules.
#
# $(defaultversiondir) and $(defaultversionedsharedir) are the corresponding
# directories for "the currently running" version of Ganeti. We never install
# there, but all symbolic links go there, rather than directory to $(versiondir)
# or $(versionedsharedir). Note that all links to $(default*dir) need to be stable;
# so, if some currently architecture-independent executable is replaced by an
# architecture-dependent one (and hence has to go under $(versiondir)), add a link
# under $(versionedsharedir) but do not change the external links.
58
if USE_VERSION_FULL
Klaus Aehlig's avatar
Klaus Aehlig committed
59
DIRVERSION=$(VERSION_FULL)
60 61 62 63
else
DIRVERSION=$(VERSION_MAJOR).$(VERSION_MINOR)
endif
versiondir = $(libdir)/ganeti/$(DIRVERSION)
64
defaultversiondir = $(libdir)/ganeti/default
65
versionedsharedir = $(prefix)/share/ganeti/$(DIRVERSION)
66 67
defaultversionedsharedir = $(prefix)/share/ganeti/default

68 69
# Note: these are automake-specific variables, and must be named after
# the directory + 'dir' suffix
70 71
pkglibdir = $(versiondir)$(libdir)/ganeti
myexeclibdir = $(pkglibdir)
Jose A. Lopes's avatar
Jose A. Lopes committed
72 73 74
bindir = $(versiondir)/$(BINDIR)
sbindir = $(versiondir)$(SBINDIR)
mandir = $(versionedsharedir)/root$(MANDIR)
75
pkgpythondir = $(versionedsharedir)/ganeti
76
pkgpython_rpc_stubdir = $(versionedsharedir)/ganeti/rpc/stub
77 78 79 80
gntpythondir = $(versionedsharedir)
pkgpython_bindir = $(versionedsharedir)
gnt_python_sbindir = $(versionedsharedir)
tools_pythondir = $(versionedsharedir)
81

82
clientdir = $(pkgpythondir)/client
83
cmdlibdir = $(pkgpythondir)/cmdlib
84
hypervisordir = $(pkgpythondir)/hypervisor
85
hypervisor_hv_kvmdir = $(pkgpythondir)/hypervisor/hv_kvm
86
jqueuedir = $(pkgpythondir)/jqueue
87
storagedir = $(pkgpythondir)/storage
88
httpdir = $(pkgpythondir)/http
Michael Hanselmann's avatar
Michael Hanselmann committed
89
masterddir = $(pkgpythondir)/masterd
Guido Trotter's avatar
Guido Trotter committed
90
confddir = $(pkgpythondir)/confd
91
rapidir = $(pkgpythondir)/rapi
92
rpcdir = $(pkgpythondir)/rpc
93
rpc_stubdir = $(pkgpythondir)/rpc/stub
94
serverdir = $(pkgpythondir)/server
95
watcherdir = $(pkgpythondir)/watcher
96
impexpddir = $(pkgpythondir)/impexpd
97
utilsdir = $(pkgpythondir)/utils
98
toolsdir = $(pkglibdir)/tools
99
iallocatorsdir = $(pkglibdir)/iallocators
100
pytoolsdir = $(pkgpythondir)/tools
101
docdir = $(versiondir)$(datadir)/doc/$(PACKAGE)
102
ifupdir = $(sysconfdir)/ganeti
103

104 105 106 107 108 109
if USE_BACKUP_DIR
backup_dir = $(BACKUP_DIR)
else
backup_dir = $(localstatedir)/lib
endif

110
SYMLINK_TARGET_DIRS = \
111
	$(sysconfdir)/ganeti \
112
	$(libdir)/ganeti/iallocators \
113 114
	$(libdir)/ganeti/tools \
	$(prefix)/share/ganeti \
Jose A. Lopes's avatar
Jose A. Lopes committed
115 116 117 118 119
	$(BINDIR) \
	$(SBINDIR) \
	$(MANDIR)/man1 \
	$(MANDIR)/man7 \
	$(MANDIR)/man8
120

121 122 123
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:

124
HS_DIRS = \
Iustin Pop's avatar
Iustin Pop committed
125 126 127
	src \
	src/Ganeti \
	src/Ganeti/Confd \
128
	src/Ganeti/Curl \
129
	src/Ganeti/Cpu \
Iustin Pop's avatar
Iustin Pop committed
130
	src/Ganeti/DataCollectors \
131
	src/Ganeti/Daemon \
132
	src/Ganeti/Hs2Py \
Iustin Pop's avatar
Iustin Pop committed
133 134 135
	src/Ganeti/HTools \
	src/Ganeti/HTools/Backend \
	src/Ganeti/HTools/Program \
136 137
	src/Ganeti/Hypervisor \
	src/Ganeti/Hypervisor/Xen \
138
	src/Ganeti/JQScheduler \
139
	src/Ganeti/JQueue \
140
	src/Ganeti/Locking \
141
	src/Ganeti/Logging \
142
	src/Ganeti/Monitoring \
143
	src/Ganeti/Metad \
144
	src/Ganeti/Objects \
Klaus Aehlig's avatar
Klaus Aehlig committed
145
	src/Ganeti/OpCodes \
Iustin Pop's avatar
Iustin Pop committed
146
	src/Ganeti/Query \
147 148 149
	src/Ganeti/Storage \
	src/Ganeti/Storage/Diskstats \
	src/Ganeti/Storage/Drbd \
Michele Tartara's avatar
Michele Tartara committed
150
	src/Ganeti/Storage/Lvm \
151
	src/Ganeti/THH \
152
	src/Ganeti/Utils \
Petr Pudlak's avatar
Petr Pudlak committed
153
	src/Ganeti/WConfd \
154 155 156
	test/hs \
	test/hs/Test \
	test/hs/Test/Ganeti \
157 158 159
	test/hs/Test/Ganeti/Storage \
	test/hs/Test/Ganeti/Storage/Diskstats \
	test/hs/Test/Ganeti/Storage/Drbd \
Michele Tartara's avatar
Michele Tartara committed
160
	test/hs/Test/Ganeti/Storage/Lvm \
161 162 163
	test/hs/Test/Ganeti/Confd \
	test/hs/Test/Ganeti/HTools \
	test/hs/Test/Ganeti/HTools/Backend \
164 165
	test/hs/Test/Ganeti/Hypervisor \
	test/hs/Test/Ganeti/Hypervisor/Xen \
166
	test/hs/Test/Ganeti/JQueue \
167
	test/hs/Test/Ganeti/Locking \
168
	test/hs/Test/Ganeti/Objects \
Petr Pudlak's avatar
Petr Pudlak committed
169
	test/hs/Test/Ganeti/Query \
170
	test/hs/Test/Ganeti/THH \
171 172
	test/hs/Test/Ganeti/Utils \
	test/hs/Test/Ganeti/WConfd
173

174 175 176
# Haskell directories without the roots (src, test/hs)
HS_DIRS_NOROOT = $(filter-out src,$(filter-out test/hs,$(HS_DIRS)))

177
DIRS = \
178
	$(HS_DIRS) \
179 180 181
	autotools \
	daemons \
	devel \
182
	devel/data \
183
	doc \
184
	doc/css \
185
	doc/examples \
186
	doc/examples/gnt-debug \
Iustin Pop's avatar
Iustin Pop committed
187
	doc/examples/hooks \
188
	doc/examples/systemd \
189
	doc/users \
190 191 192
	test/data/htools \
	test/data/htools/rapi \
	test/hs/shelltests \
Michele Tartara's avatar
Michele Tartara committed
193
	test/autotools \
194
	lib \
195
	lib/build \
Iustin Pop's avatar
Iustin Pop committed
196
	lib/client \
197
	lib/cmdlib \
198
	lib/confd \
199
	lib/jqueue \
200
	lib/http \
201
	lib/hypervisor \
202
	lib/hypervisor/hv_kvm \
203
	lib/impexpd \
Michael Hanselmann's avatar
Michael Hanselmann committed
204
	lib/masterd \
205
	lib/rapi \
206
	lib/rpc \
207
	lib/rpc/stub \
208
	lib/server \
209
	lib/storage \
210
	lib/tools \
211
	lib/utils \
212
	lib/watcher \
213 214
	man \
	qa \
Thomas Thrainer's avatar
Thomas Thrainer committed
215
	qa/patch \
216 217
	test \
	test/data \
218
	test/data/bdev-rbd \
Agata Murawska's avatar
Agata Murawska committed
219
	test/data/ovfdata \
Agata Murawska's avatar
Agata Murawska committed
220
	test/data/ovfdata/other \
221 222 223 224 225 226 227 228 229 230 231 232
	test/data/cgroup_root \
        test/data/cgroup_root/memory \
        test/data/cgroup_root/memory/lxc \
        test/data/cgroup_root/memory/lxc/instance1 \
        test/data/cgroup_root/cpuset \
        test/data/cgroup_root/cpuset/some_group \
        test/data/cgroup_root/cpuset/some_group/lxc \
        test/data/cgroup_root/cpuset/some_group/lxc/instance1 \
        test/data/cgroup_root/devices \
        test/data/cgroup_root/devices/some_group \
        test/data/cgroup_root/devices/some_group/lxc \
        test/data/cgroup_root/devices/some_group/lxc/instance1 \
Iustin Pop's avatar
Iustin Pop committed
233
	test/py \
234 235
	test/py/cmdlib \
	test/py/cmdlib/testsupport \
236 237
	tools

238
ALL_APIDOC_HS_DIRS = \
239
	$(APIDOC_HS_DIR) \
240
	$(patsubst %,$(APIDOC_HS_DIR)/%,$(call strip_hsroot,$(HS_DIRS_NOROOT)))
241 242 243 244 245

BUILDTIME_DIR_AUTOCREATE = \
	scripts \
	$(APIDOC_DIR) \
	$(ALL_APIDOC_HS_DIRS) \
Iustin Pop's avatar
Iustin Pop committed
246
	$(APIDOC_PY_DIR) \
247 248
	$(COVERAGE_DIR) \
	$(COVERAGE_HS_DIR) \
Iustin Pop's avatar
Iustin Pop committed
249
	$(COVERAGE_PY_DIR) \
250
	.hpc
251 252 253

BUILDTIME_DIRS = \
	$(BUILDTIME_DIR_AUTOCREATE) \
254 255
	doc/html \
	doc/man-html
256 257 258 259

DIRCHECK_EXCLUDE = \
	$(BUILDTIME_DIRS) \
	ganeti-[0-9]*.[0-9]*.[0-9]* \
Iustin Pop's avatar
Iustin Pop committed
260
	doc/html/_* \
261
	doc/man-html/_* \
Iustin Pop's avatar
Iustin Pop committed
262
	autom4te.cache
263

264 265 266 267 268 269 270 271
# 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
272
MAINTAINERCLEANFILES = \
273
	$(maninput) \
274
	doc/install-quick.rst \
275
	doc/news.rst \
276
	doc/upgrade.rst \
277
	vcs-version
Iustin Pop's avatar
Iustin Pop committed
278

279
maintainer-clean-local:
280
	rm -rf $(BUILDTIME_DIRS)
281

282
CLEANFILES = \
283
	$(addsuffix /*.py[co],$(DIRS)) \
284 285
	$(addsuffix /*.hi,$(HS_DIRS)) \
	$(addsuffix /*.o,$(HS_DIRS)) \
286 287 288 289
	$(addsuffix /*.$(HTEST_SUFFIX)_hi,$(HS_DIRS)) \
	$(addsuffix /*.$(HTEST_SUFFIX)_o,$(HS_DIRS)) \
	Makefile.ghc \
	Makefile.ghc.bak \
290
	$(PYTHON_BOOTSTRAP) \
291
	$(gnt_python_sbin_SCRIPTS) \
292
	epydoc.conf \
Iustin Pop's avatar
Iustin Pop committed
293
	$(REPLACE_VARS_SED) \
294
	$(SHELL_ENV_INIT) \
295
	daemons/daemon-util \
296
	daemons/ganeti-cleaner \
297 298
	devel/squeeze-amd64.tar.gz \
	devel/squeeze-amd64.conf \
299 300
	$(mandocrst) \
	doc/manpages-enabled.rst \
301
	$(BUILT_EXAMPLES) \
302
	doc/examples/bash_completion \
303
	doc/examples/bash_completion-debug \
304
	$(userspecs) \
305
	lib/_generated_rpc.py \
Iustin Pop's avatar
Iustin Pop committed
306 307
	$(man_MANS) \
	$(manhtml) \
308
	tools/kvm-ifup \
309
	tools/kvm-ifup-os \
Jose A. Lopes's avatar
Jose A. Lopes committed
310
	tools/xen-ifup-os \
311 312
	tools/vif-ganeti \
	tools/net-common \
313
	tools/users-setup \
314
	tools/vcluster-setup \
315
	stamp-directories \
316
	stamp-srclinks \
317
	$(nodist_pkgpython_PYTHON) \
318
	$(nodist_pkgpython_rpc_stub_PYTHON) \
319
	$(gnt_scripts) \
320
	$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
321
	$(HS_BUILT_TEST_HELPERS) \
Iustin Pop's avatar
Iustin Pop committed
322
	src/ganeti-confd \
Petr Pudlak's avatar
Petr Pudlak committed
323
	src/ganeti-wconfd \
Thomas Thrainer's avatar
Thomas Thrainer committed
324
	src/ganeti-luxid \
325
	src/ganeti-metad \
326
	src/ganeti-mond \
327
	.hpc/*.mix src/*.tix test/hs/*.tix *.tix \
328
	doc/hs-lint.html
329

Iustin Pop's avatar
Iustin Pop committed
330
GENERATED_FILES = \
Iustin Pop's avatar
Iustin Pop committed
331
	$(built_base_sources) \
332
	$(built_python_sources) \
333 334
	$(PYTHON_BOOTSTRAP) \
	$(gnt_python_sbin_SCRIPTS)
335

336
HS_GENERATED_FILES = $(HS_PROGS) src/hluxid src/ganeti-luxid
337
if ENABLE_CONFD
338
HS_GENERATED_FILES += src/hconfd src/ganeti-confd
339
endif
340 341 342
if ENABLE_MOND
HS_GENERATED_FILES += src/ganeti-mond
endif
343 344 345
if ENABLE_METADATA
HS_GENERATED_FILES += src/ganeti-metad
endif
346

347
built_base_sources = \
348 349
	stamp-directories \
	stamp-srclinks
350

351
built_python_base_sources = \
352
	lib/_constants.py \
Jose A. Lopes's avatar
Jose A. Lopes committed
353
	lib/_vcsversion.py \
354 355
	lib/opcodes.py \
	lib/rpc/stub/wconfd.py
356

357
built_python_sources = \
358 359
	$(nodist_pkgpython_PYTHON) \
	$(nodist_pkgpython_rpc_stub_PYTHON)
360

Iustin Pop's avatar
Iustin Pop committed
361 362
# Generating the RPC wrappers depends on many things, so make sure
# it's built at the end of the built sources
363 364
lib/_generated_rpc.py: | $(built_base_sources) $(built_python_base_sources)

365 366 367 368 369
# 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 \
Apollon Oikonomopoulos's avatar
Apollon Oikonomopoulos committed
370
	doc/examples/ganeti.logrotate \
371
	doc/examples/ganeti-master-role.ocf \
372
	doc/examples/ganeti-node-role.ocf \
373
	doc/examples/gnt-config-backup \
374 375 376 377 378 379 380 381 382 383
	doc/examples/hooks/ipsec \
	doc/examples/systemd/ganeti-common.service \
	doc/examples/systemd/ganeti-confd.service \
	doc/examples/systemd/ganeti-kvmd.service \
	doc/examples/systemd/ganeti-luxid.service \
	doc/examples/systemd/ganeti-metad.service \
	doc/examples/systemd/ganeti-mond.service \
	doc/examples/systemd/ganeti-noded.service \
	doc/examples/systemd/ganeti-rapi.service \
	doc/examples/systemd/ganeti-wconfd.service
384

385
dist_ifup_SCRIPTS = \
Jose A. Lopes's avatar
Jose A. Lopes committed
386 387
	tools/kvm-ifup-os \
	tools/xen-ifup-os
388

389
nodist_pkgpython_PYTHON = \
390 391 392
	$(built_python_base_sources) \
	lib/_generated_rpc.py

393 394
nodist_pkgpython_rpc_stub_PYTHON = \
	lib/rpc/stub/wconfd.py
395

396 397 398 399 400 401
nodist_pkgpython_bin_SCRIPTS = \
	$(nodist_pkglib_python_scripts)

pkgpython_bin_SCRIPTS = \
	$(pkglib_python_scripts)

402
noinst_PYTHON = \
Michael Hanselmann's avatar
Michael Hanselmann committed
403
	lib/build/__init__.py \
Iustin Pop's avatar
Iustin Pop committed
404 405
	lib/build/shell_example_lexer.py \
	lib/build/sphinx_ext.py
406

407 408
pkgpython_PYTHON = \
	lib/__init__.py \
Guido Trotter's avatar
Guido Trotter committed
409
	lib/asyncnotifier.py \
410 411 412
	lib/backend.py \
	lib/bootstrap.py \
	lib/cli.py \
413
	lib/compat.py \
414 415
	lib/config.py \
	lib/constants.py \
416
	lib/daemon.py \
417
	lib/errors.py \
418
	lib/hooksmaster.py \
419
	lib/ht.py \
420
	lib/jstore.py \
421 422 423
	lib/locking.py \
	lib/luxi.py \
	lib/mcpu.py \
424
	lib/netutils.py \
425
	lib/objects.py \
Jose A. Lopes's avatar
Jose A. Lopes committed
426
	lib/opcodes_base.py \
427
	lib/outils.py \
428
	lib/ovf.py \
429
	lib/pathutils.py \
430
	lib/qlang.py \
431
	lib/query.py \
432
	lib/rpc_defs.py \
433
	lib/runtime.py \
434 435 436
	lib/serializer.py \
	lib/ssconf.py \
	lib/ssh.py \
437
	lib/uidpool.py \
438
	lib/vcluster.py \
439
	lib/network.py \
Petr Pudlak's avatar
Petr Pudlak committed
440
	lib/wconfd.py \
441
	lib/workerpool.py
442

443
client_PYTHON = \
444
	lib/client/__init__.py \
445
	lib/client/base.py \
446
	lib/client/gnt_backup.py \
447
	lib/client/gnt_cluster.py \
448
	lib/client/gnt_debug.py \
449
	lib/client/gnt_group.py \
450
	lib/client/gnt_instance.py \
451
	lib/client/gnt_job.py \
452
	lib/client/gnt_node.py \
453
	lib/client/gnt_network.py \
454 455
	lib/client/gnt_os.py \
	lib/client/gnt_storage.py
456

457
cmdlib_PYTHON = \
458
	lib/cmdlib/__init__.py \
459
	lib/cmdlib/backup.py \
460
	lib/cmdlib/base.py \
461
	lib/cmdlib/cluster.py \
462
	lib/cmdlib/common.py \
463
	lib/cmdlib/group.py \
464
	lib/cmdlib/instance.py \
465
	lib/cmdlib/instance_migration.py \
466
	lib/cmdlib/instance_operation.py \
467
	lib/cmdlib/instance_query.py \
468
	lib/cmdlib/instance_storage.py \
469
	lib/cmdlib/instance_utils.py \
470 471 472
	lib/cmdlib/misc.py \
	lib/cmdlib/network.py \
	lib/cmdlib/node.py \
473
	lib/cmdlib/operating_system.py \
474
	lib/cmdlib/query.py \
475
	lib/cmdlib/tags.py \
476
	lib/cmdlib/test.py
477

478 479 480
hypervisor_PYTHON = \
	lib/hypervisor/__init__.py \
	lib/hypervisor/hv_base.py \
481
	lib/hypervisor/hv_chroot.py \
482
	lib/hypervisor/hv_fake.py \
Iustin Pop's avatar
Iustin Pop committed
483
	lib/hypervisor/hv_lxc.py \
484 485
	lib/hypervisor/hv_xen.py

486
hypervisor_hv_kvm_PYTHON = \
487
  lib/hypervisor/hv_kvm/__init__.py \
488 489
  lib/hypervisor/hv_kvm/monitor.py \
  lib/hypervisor/hv_kvm/netdev.py
490

491
jqueue_PYTHON = \
492 493
	lib/jqueue/__init__.py \
	lib/jqueue/exec.py
494

495 496 497 498
storage_PYTHON = \
	lib/storage/__init__.py \
	lib/storage/bdev.py \
	lib/storage/base.py \
499
	lib/storage/container.py \
500 501
	lib/storage/drbd.py \
	lib/storage/drbd_info.py \
502
	lib/storage/drbd_cmdgen.py \
503
	lib/storage/extstorage.py \
Santi Raffa's avatar
Santi Raffa committed
504 505
	lib/storage/filestorage.py \
	lib/storage/gluster.py
506

507 508
rapi_PYTHON = \
	lib/rapi/__init__.py \
509
	lib/rapi/baserlib.py \
David Knowles's avatar
David Knowles committed
510
	lib/rapi/client.py \
511
	lib/rapi/client_utils.py \
512
	lib/rapi/connector.py \
513 514
	lib/rapi/rlib2.py \
	lib/rapi/testutils.py
515

516
http_PYTHON = \
517
	lib/http/__init__.py \
518
	lib/http/auth.py \
519 520
	lib/http/client.py \
	lib/http/server.py
521

Guido Trotter's avatar
Guido Trotter committed
522
confd_PYTHON = \
Guido Trotter's avatar
Guido Trotter committed
523
	lib/confd/__init__.py \
524
	lib/confd/client.py
525

Michael Hanselmann's avatar
Michael Hanselmann committed
526
masterd_PYTHON = \
527
	lib/masterd/__init__.py \
René Nussbaumer's avatar
René Nussbaumer committed
528
	lib/masterd/iallocator.py \
529
	lib/masterd/instance.py
Michael Hanselmann's avatar
Michael Hanselmann committed
530

531 532 533
impexpd_PYTHON = \
	lib/impexpd/__init__.py

534
watcher_PYTHON = \
535
	lib/watcher/__init__.py \
536 537
	lib/watcher/nodemaint.py \
	lib/watcher/state.py
538

539
server_PYTHON = \
540
	lib/server/__init__.py \
541
	lib/server/masterd.py \
542 543
	lib/server/noded.py \
	lib/server/rapi.py
544

545 546
rpc_PYTHON = \
	lib/rpc/__init__.py \
547
	lib/rpc/client.py \
548 549 550
	lib/rpc/errors.py \
	lib/rpc/node.py \
	lib/rpc/transport.py
551

552 553 554
rpc_stub_PYTHON = \
	lib/rpc/stub/__init__.py

555 556
pytools_PYTHON = \
	lib/tools/__init__.py \
557
	lib/tools/burnin.py \
558
	lib/tools/ensure_dirs.py \
Michael Hanselmann's avatar
Michael Hanselmann committed
559
	lib/tools/node_cleanup.py \
560
	lib/tools/node_daemon_setup.py \
561
	lib/tools/prepare_node_join.py
562

563
utils_PYTHON = \
564
	lib/utils/__init__.py \
565
	lib/utils/algo.py \
566
	lib/utils/filelock.py \
567
	lib/utils/hash.py \
568
	lib/utils/io.py \
569
	lib/utils/livelock.py \
570
	lib/utils/log.py \
571
	lib/utils/lvm.py \
572
	lib/utils/mlock.py \
573
	lib/utils/nodesetup.py \
574
	lib/utils/process.py \
575
	lib/utils/retry.py \
576
	lib/utils/security.py \
Helga Velroyen's avatar
Helga Velroyen committed
577
	lib/utils/storage.py \
578
	lib/utils/text.py \
579
	lib/utils/version.py \
580 581
	lib/utils/wrapper.py \
	lib/utils/x509.py
582

583
docinput = \
584
	doc/admin.rst \
Jose A. Lopes's avatar
Jose A. Lopes committed
585
	doc/cluster-keys-replacement.rst \
Iustin Pop's avatar
Iustin Pop committed
586
	doc/cluster-merge.rst \
587 588
	doc/conf.py \
	doc/css/style.css \
589
	doc/design-2.0.rst \
590
	doc/design-2.1.rst \
591
	doc/design-2.2.rst \
Guido Trotter's avatar
Guido Trotter committed
592
	doc/design-2.3.rst \
593
	doc/design-2.4.rst \
594
	doc/design-2.5.rst \
595
	doc/design-2.6.rst \
596
	doc/design-2.7.rst \
597
	doc/design-2.8.rst \
Klaus Aehlig's avatar
Klaus Aehlig committed
598
	doc/design-2.9.rst \
599
	doc/design-2.10.rst \
600
	doc/design-2.11.rst \
601
	doc/design-2.12.rst \
Iustin Pop's avatar
Iustin Pop committed
602 603
	doc/design-autorepair.rst \
	doc/design-bulk-create.rst \
604
	doc/design-ceph-ganeti-support.rst \
Iustin Pop's avatar
Iustin Pop committed
605
	doc/design-chained-jobs.rst \
606
	doc/design-cmdlib-unittests.rst \
Tsachy Shacham's avatar
Tsachy Shacham committed
607
	doc/design-cpu-pinning.rst \
608
	doc/design-cpu-speed.rst \
609
	doc/design-daemons.rst \
610
	doc/design-device-uuid-name.rst \
611
	doc/design-disk-conversion.rst \
612
	doc/design-disks.rst \
Iustin Pop's avatar
Iustin Pop committed
613
	doc/design-draft.rst \
Jose A. Lopes's avatar
Jose A. Lopes committed
614
	doc/design-file-based-storage.rst \
615
	doc/design-glusterfs-ganeti-support.rst \
616 617 618
	doc/design-hotplug.rst \
	doc/design-hroller.rst \
	doc/design-hsqueeze.rst \
Iustin Pop's avatar
Iustin Pop committed
619
	doc/design-htools-2.3.rst \
620
	doc/design-http-server.rst \
621
	doc/design-hugepages-support.rst \
622
	doc/design-ifdown.rst \
623
	doc/design-impexp2.rst \
624
	doc/design-internal-shutdown.rst \
Jose A. Lopes's avatar
Jose A. Lopes committed
625
	doc/design-kvmd.rst \
626
	doc/design-location.rst \
627
	doc/design-linuxha.rst \
628 629
	doc/design-lu-generated-jobs.rst \
	doc/design-monitoring-agent.rst \
630
	doc/design-move-instance-improvements.rst \
631
	doc/design-multi-reloc.rst \
632
	doc/design-multi-version-tests.rst \
633
	doc/design-network.rst \
634
	doc/design-network2.rst \
635
	doc/design-node-add.rst \
636
	doc/design-node-security.rst \
Iustin Pop's avatar
Iustin Pop committed
637
	doc/design-oob.rst \
638
	doc/design-openvswitch.rst \
639
	doc/design-opportunistic-locking.rst \
640
	doc/design-optables.rst \
641
	doc/design-os.rst \
642
	doc/design-ovf-support.rst \
Iustin Pop's avatar
Iustin Pop committed
643
	doc/design-partitioned.rst \
644
	doc/design-performance-tests.rst \
Iustin Pop's avatar
Iustin Pop committed
645 646
	doc/design-query-splitting.rst \
	doc/design-query2.rst \
647
	doc/design-query-splitting.rst \
648
	doc/design-reason-trail.rst \
649
	doc/design-reservations.rst \
650
	doc/design-resource-model.rst \
651
	doc/design-restricted-commands.rst \
652
	doc/design-shared-storage.rst \
653
	doc/design-ssh-ports.rst \
654
	doc/design-storagetypes.rst \
655
	doc/design-systemd.rst \
656
	doc/design-upgrade.rst \
657
	doc/design-virtual-clusters.rst \
Iustin Pop's avatar
Iustin Pop committed
658
	doc/design-x509-ca.rst \
659
	doc/dev-codestyle.rst \
660
	doc/devnotes.rst \
661
	doc/glossary.rst \
662
	doc/hooks.rst \
663
	doc/iallocator.rst \
664
	doc/index.rst \
665
	doc/install-quick.rst \
666
	doc/install.rst \
667
	doc/locking.rst \
668
	doc/manpages-disabled.rst \
669
	doc/monitoring-query-format.rst \
670
	doc/move-instance.rst \
Iustin Pop's avatar
Iustin Pop committed
671
	doc/news.rst \
672
	doc/ovfconverter.rst \
673
	doc/rapi.rst \
674
	doc/security.rst \
675
	doc/upgrade.rst \
676
	doc/virtual-cluster.rst \
Iustin Pop's avatar
Iustin Pop committed
677
	doc/walkthrough.rst
Michael Hanselmann's avatar
Michael Hanselmann committed
678

679 680 681
# Generates file names such as "doc/man-gnt-instance.rst"
mandocrst = $(addprefix doc/man-,$(notdir $(manrst)))

682 683 684 685
# Haskell programs to be installed in $PREFIX/bin
HS_BIN_PROGS=src/htools

# Haskell programs to be installed in the MYEXECLIB dir
686
if ENABLE_MOND
687
HS_MYEXECLIB_PROGS=src/mon-collector
688 689 690
else
HS_MYEXECLIB_PROGS=
endif
691

692
# Haskell programs to be compiled by "make really-all"
693
HS_COMPILE_PROGS = \
Jose A. Lopes's avatar
Jose A. Lopes committed
694
	src/ganeti-kvmd \
Petr Pudlak's avatar
Petr Pudlak committed
695
	src/ganeti-wconfd \
Thomas Thrainer's avatar
Thomas Thrainer committed
696
	src/hluxid \
Jose A. Lopes's avatar
Jose A. Lopes committed
697
	src/hs2py \
698
	src/rpc-test
699 700 701 702 703 704
if ENABLE_CONFD
HS_COMPILE_PROGS += src/hconfd
endif
if ENABLE_MOND
HS_COMPILE_PROGS += src/ganeti-mond
endif
705 706 707
if ENABLE_METADATA
HS_COMPILE_PROGS += src/ganeti-metad
endif
708 709 710 711

# All Haskell non-test programs to be compiled but not automatically installed
HS_PROGS = $(HS_BIN_PROGS) $(HS_MYEXECLIB_PROGS)

712
HS_BIN_ROLES = harep hbal hscan hspace hinfo hcheck hroller hsqueeze
713
HS_HTOOLS_PROGS = $(HS_BIN_ROLES) hail
714

715 716 717 718
# Haskell programs that cannot be disabled at configure (e.g., unlike
# 'mon-collector')
HS_DEFAULT_PROGS = \
	$(HS_BIN_PROGS) \
719 720
	test/hs/hpc-htools \
	test/hs/hpc-mon-collector \
721
	$(HS_COMPILE_PROGS)
722