Makefile.am 81.9 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 12 13
# For distcheck we need the haskell tests to be enabled. Note:
# The "correct" way would be to define AM_DISTCHECK_CONFIGURE_FLAGS.
# However, we still have to support older versions of autotools,
# so we cannot use that yet, hence we fall back to..
DISTCHECK_CONFIGURE_FLAGS = --enable-haskell-tests

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

18 19 20 21 22
# Helper values for calling builtin functions
empty :=
space := $(empty) $(empty)
comma := ,

23 24 25
# Helper function to strip src/ and test/hs/ from a list
strip_hsroot = $(patsubst src/%,%,$(patsubst test/hs/%,%,$(1)))

26 27 28
# Use bash in order to be able to use pipefail
SHELL=/bin/bash

29 30
EXTRA_DIST=

31 32 33
# Enable colors in shelltest
SHELLTESTARGS = "-c"

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

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

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

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

112 113 114 115 116 117
if USE_BACKUP_DIR
backup_dir = $(BACKUP_DIR)
else
backup_dir = $(localstatedir)/lib
endif

118
SYMLINK_TARGET_DIRS = \
119
	$(sysconfdir)/ganeti \
120
	$(libdir)/ganeti/iallocators \
121 122
	$(libdir)/ganeti/tools \
	$(prefix)/share/ganeti \
Jose A. Lopes's avatar
Jose A. Lopes committed
123 124 125 126 127
	$(BINDIR) \
	$(SBINDIR) \
	$(MANDIR)/man1 \
	$(MANDIR)/man7 \
	$(MANDIR)/man8
128

129 130 131
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:

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

182 183 184
# Haskell directories without the roots (src, test/hs)
HS_DIRS_NOROOT = $(filter-out src,$(filter-out test/hs,$(HS_DIRS)))

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

246
ALL_APIDOC_HS_DIRS = \
247
	$(APIDOC_HS_DIR) \
248
	$(patsubst %,$(APIDOC_HS_DIR)/%,$(call strip_hsroot,$(HS_DIRS_NOROOT)))
249 250 251 252 253

BUILDTIME_DIR_AUTOCREATE = \
	scripts \
	$(APIDOC_DIR) \
	$(ALL_APIDOC_HS_DIRS) \
Iustin Pop's avatar
Iustin Pop committed
254
	$(APIDOC_PY_DIR) \
255 256
	$(COVERAGE_DIR) \
	$(COVERAGE_HS_DIR) \
Iustin Pop's avatar
Iustin Pop committed
257
	$(COVERAGE_PY_DIR) \
258
	.hpc
259 260 261

BUILDTIME_DIRS = \
	$(BUILDTIME_DIR_AUTOCREATE) \
262 263
	doc/html \
	doc/man-html
264 265 266 267

DIRCHECK_EXCLUDE = \
	$(BUILDTIME_DIRS) \
	ganeti-[0-9]*.[0-9]*.[0-9]* \
Iustin Pop's avatar
Iustin Pop committed
268
	doc/html/_* \
269
	doc/man-html/_* \
Iustin Pop's avatar
Iustin Pop committed
270
	autom4te.cache
271

272 273 274 275 276 277 278 279
# 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
280
MAINTAINERCLEANFILES = \
281
	$(maninput) \
282
	doc/install-quick.rst \
283
	doc/news.rst \
284
	doc/upgrade.rst \
285
	vcs-version
Iustin Pop's avatar
Iustin Pop committed
286

287
maintainer-clean-local:
288
	rm -rf $(BUILDTIME_DIRS)
289

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

Iustin Pop's avatar
Iustin Pop committed
338
GENERATED_FILES = \
Iustin Pop's avatar
Iustin Pop committed
339
	$(built_base_sources) \
340
	$(built_python_sources) \
341 342
	$(PYTHON_BOOTSTRAP) \
	$(gnt_python_sbin_SCRIPTS)
343

344
HS_GENERATED_FILES = $(HS_PROGS) src/hluxid src/ganeti-luxid
345
if ENABLE_CONFD
346
HS_GENERATED_FILES += src/hconfd src/ganeti-confd
347
endif
348 349 350
if ENABLE_MOND
HS_GENERATED_FILES += src/ganeti-mond
endif
351 352 353
if ENABLE_METADATA
HS_GENERATED_FILES += src/ganeti-metad
endif
354

355
built_base_sources = \
356 357
	stamp-directories \
	stamp-srclinks
358

359
built_python_base_sources = \
360
	lib/_constants.py \
Jose A. Lopes's avatar
Jose A. Lopes committed
361
	lib/_vcsversion.py \
362 363
	lib/opcodes.py \
	lib/rpc/stub/wconfd.py
364

365
built_python_sources = \
366 367
	$(nodist_pkgpython_PYTHON) \
	$(nodist_pkgpython_rpc_stub_PYTHON)
368

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

373 374 375 376 377
# 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
378
	doc/examples/ganeti.logrotate \
379
	doc/examples/ganeti-master-role.ocf \
380
	doc/examples/ganeti-node-role.ocf \
381
	doc/examples/gnt-config-backup \
382 383 384 385 386 387 388 389 390 391
	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
392

393
dist_ifup_SCRIPTS = \
Jose A. Lopes's avatar
Jose A. Lopes committed
394 395
	tools/kvm-ifup-os \
	tools/xen-ifup-os
396

397
nodist_pkgpython_PYTHON = \
398 399 400
	$(built_python_base_sources) \
	lib/_generated_rpc.py

401 402
nodist_pkgpython_rpc_stub_PYTHON = \
	lib/rpc/stub/wconfd.py
403

404 405 406 407 408 409
nodist_pkgpython_bin_SCRIPTS = \
	$(nodist_pkglib_python_scripts)

pkgpython_bin_SCRIPTS = \
	$(pkglib_python_scripts)

410
noinst_PYTHON = \
Michael Hanselmann's avatar
Michael Hanselmann committed
411
	lib/build/__init__.py \
Iustin Pop's avatar
Iustin Pop committed
412 413
	lib/build/shell_example_lexer.py \
	lib/build/sphinx_ext.py
414

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

451
client_PYTHON = \
452
	lib/client/__init__.py \
453
	lib/client/base.py \
454
	lib/client/gnt_backup.py \
455
	lib/client/gnt_cluster.py \
456
	lib/client/gnt_debug.py \
457
	lib/client/gnt_group.py \
458
	lib/client/gnt_instance.py \
459
	lib/client/gnt_job.py \
460
	lib/client/gnt_node.py \
461
	lib/client/gnt_network.py \
462 463
	lib/client/gnt_os.py \
	lib/client/gnt_storage.py
464

465
cmdlib_PYTHON = \
466
	lib/cmdlib/__init__.py \
467
	lib/cmdlib/backup.py \
468
	lib/cmdlib/base.py \
469
	lib/cmdlib/cluster.py \
470
	lib/cmdlib/common.py \
471
	lib/cmdlib/group.py \
472
	lib/cmdlib/instance.py \
473
	lib/cmdlib/instance_migration.py \
474
	lib/cmdlib/instance_operation.py \
475
	lib/cmdlib/instance_query.py \
476
	lib/cmdlib/instance_storage.py \
477
	lib/cmdlib/instance_utils.py \
478 479 480
	lib/cmdlib/misc.py \
	lib/cmdlib/network.py \
	lib/cmdlib/node.py \
481
	lib/cmdlib/operating_system.py \
482
	lib/cmdlib/query.py \
483
	lib/cmdlib/tags.py \
484
	lib/cmdlib/test.py
485

486 487 488
hypervisor_PYTHON = \
	lib/hypervisor/__init__.py \
	lib/hypervisor/hv_base.py \
489
	lib/hypervisor/hv_chroot.py \
490
	lib/hypervisor/hv_fake.py \
Iustin Pop's avatar
Iustin Pop committed
491
	lib/hypervisor/hv_lxc.py \
492 493
	lib/hypervisor/hv_xen.py

494
hypervisor_hv_kvm_PYTHON = \
495
  lib/hypervisor/hv_kvm/__init__.py \
496 497
  lib/hypervisor/hv_kvm/monitor.py \
  lib/hypervisor/hv_kvm/netdev.py
498

499
jqueue_PYTHON = \
500 501
	lib/jqueue/__init__.py \
	lib/jqueue/exec.py
502

503 504 505 506
storage_PYTHON = \
	lib/storage/__init__.py \
	lib/storage/bdev.py \
	lib/storage/base.py \
507
	lib/storage/container.py \
508 509
	lib/storage/drbd.py \
	lib/storage/drbd_info.py \
510
	lib/storage/drbd_cmdgen.py \
511
	lib/storage/extstorage.py \
Santi Raffa's avatar
Santi Raffa committed
512 513
	lib/storage/filestorage.py \
	lib/storage/gluster.py
514

515 516
rapi_PYTHON = \
	lib/rapi/__init__.py \
517
	lib/rapi/baserlib.py \
David Knowles's avatar
David Knowles committed
518
	lib/rapi/client.py \
519
	lib/rapi/client_utils.py \
520
	lib/rapi/connector.py \
521 522
	lib/rapi/rlib2.py \
	lib/rapi/testutils.py
523

524
http_PYTHON = \
525
	lib/http/__init__.py \
526
	lib/http/auth.py \
527 528
	lib/http/client.py \
	lib/http/server.py
529

Guido Trotter's avatar
Guido Trotter committed
530
confd_PYTHON = \
Guido Trotter's avatar
Guido Trotter committed
531
	lib/confd/__init__.py \
532
	lib/confd/client.py
533

Michael Hanselmann's avatar
Michael Hanselmann committed
534
masterd_PYTHON = \
535
	lib/masterd/__init__.py \
René Nussbaumer's avatar
René Nussbaumer committed
536
	lib/masterd/iallocator.py \
537
	lib/masterd/instance.py
Michael Hanselmann's avatar
Michael Hanselmann committed
538

539 540 541
impexpd_PYTHON = \
	lib/impexpd/__init__.py

542
watcher_PYTHON = \
543
	lib/watcher/__init__.py \
544 545
	lib/watcher/nodemaint.py \
	lib/watcher/state.py
546

547
server_PYTHON = \
548
	lib/server/__init__.py \
549
	lib/server/masterd.py \
550 551
	lib/server/noded.py \
	lib/server/rapi.py
552

553 554
rpc_PYTHON = \
	lib/rpc/__init__.py \
555
	lib/rpc/client.py \
556 557 558
	lib/rpc/errors.py \
	lib/rpc/node.py \
	lib/rpc/transport.py
559

560 561 562
rpc_stub_PYTHON = \
	lib/rpc/stub/__init__.py

563 564
pytools_PYTHON = \
	lib/tools/__init__.py \
565
	lib/tools/burnin.py \
566
	lib/tools/ensure_dirs.py \
Michael Hanselmann's avatar
Michael Hanselmann committed
567
	lib/tools/node_cleanup.py \
568
	lib/tools/node_daemon_setup.py \
569
	lib/tools/prepare_node_join.py
570

571
utils_PYTHON = \
572
	lib/utils/__init__.py \
573
	lib/utils/algo.py \
574
	lib/utils/filelock.py \
575
	lib/utils/hash.py \
576
	lib/utils/io.py \
577
	lib/utils/livelock.py \
578
	lib/utils/log.py \
579
	lib/utils/lvm.py \
580
	lib/utils/mlock.py \
581
	lib/utils/nodesetup.py \
582
	lib/utils/process.py \
583
	lib/utils/retry.py \
584
	lib/utils/security.py \
Helga Velroyen's avatar
Helga Velroyen committed
585
	lib/utils/storage.py \
586
	lib/utils/text.py \
587
	lib/utils/version.py \
588 589
	lib/utils/wrapper.py \
	lib/utils/x509.py
590

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

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

690 691 692 693
# Haskell programs to be installed in $PREFIX/bin
HS_BIN_PROGS=src/htools

# Haskell programs to be installed in the MYEXECLIB dir
694
if ENABLE_MOND
695
HS_MYEXECLIB_PROGS=src/mon-collector
696 697 698
else
HS_MYEXECLIB_PROGS=
endif
699

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

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

720
HS_BIN_ROLES = harep hbal hscan hspace hinfo hcheck hroller hsqueeze
721
HS_HTOOLS_PROGS = $(HS_BIN_ROLES) hail
722

723 724 725 726
# Haskell programs that cannot be disabled at configure (e.g., unlike
# 'mon-collector')
HS_DEFAULT_PROGS = \
	$(HS_BIN_PROGS) \