Makefile.am 81.6 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
EXTRA_DIST=

25 26 27
# Enable colors in shelltest
SHELLTESTARGS = "-c"

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

45
# starting as of Ganeti 2.10, all files are stored in two directories,
46
# with only symbolic links added at other places.
47 48 49 50 51 52 53 54 55 56 57 58 59
#
# $(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.
60
if USE_VERSION_FULL
Klaus Aehlig's avatar
Klaus Aehlig committed
61
DIRVERSION=$(VERSION_FULL)
62 63 64 65
else
DIRVERSION=$(VERSION_MAJOR).$(VERSION_MINOR)
endif
versiondir = $(libdir)/ganeti/$(DIRVERSION)
66
defaultversiondir = $(libdir)/ganeti/default
67
versionedsharedir = $(prefix)/share/ganeti/$(DIRVERSION)
68 69
defaultversionedsharedir = $(prefix)/share/ganeti/default

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

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

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

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

123 124 125
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:

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

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

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

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

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

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

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

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

281
maintainer-clean-local:
282
	rm -rf $(BUILDTIME_DIRS)
283

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

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

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

349
built_base_sources = \
350 351
	stamp-directories \
	stamp-srclinks
352

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

359
built_python_sources = \
360 361
	$(nodist_pkgpython_PYTHON) \
	$(nodist_pkgpython_rpc_stub_PYTHON)
362

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

367 368 369 370 371
# 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
372
	doc/examples/ganeti.logrotate \
373
	doc/examples/ganeti-master-role.ocf \
374
	doc/examples/ganeti-node-role.ocf \
375
	doc/examples/gnt-config-backup \
376 377 378 379 380 381 382 383 384 385
	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
386

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

391
nodist_pkgpython_PYTHON = \
392 393 394
	$(built_python_base_sources) \
	lib/_generated_rpc.py

395 396
nodist_pkgpython_rpc_stub_PYTHON = \
	lib/rpc/stub/wconfd.py
397

398 399 400 401 402 403
nodist_pkgpython_bin_SCRIPTS = \
	$(nodist_pkglib_python_scripts)

pkgpython_bin_SCRIPTS = \
	$(pkglib_python_scripts)

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

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

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

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

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

488
hypervisor_hv_kvm_PYTHON = \
489
  lib/hypervisor/hv_kvm/__init__.py \
490 491
  lib/hypervisor/hv_kvm/monitor.py \
  lib/hypervisor/hv_kvm/netdev.py
492

493
jqueue_PYTHON = \
494 495
	lib/jqueue/__init__.py \
	lib/jqueue/exec.py
496

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

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

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

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

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

533 534 535
impexpd_PYTHON = \
	lib/impexpd/__init__.py

536
watcher_PYTHON = \
537
	lib/watcher/__init__.py \
538 539
	lib/watcher/nodemaint.py \
	lib/watcher/state.py
540

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

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

554 555 556
rpc_stub_PYTHON = \
	lib/rpc/stub/__init__.py

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

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

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

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

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

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

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

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

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

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