Makefile.am 72.7 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 70
# Note: these are automake-specific variables, and must be named after
# the directory + 'dir' suffix
71 72 73 74
pkglibdir = $(versiondir)$(libdir)/ganeti
myexeclibdir = $(pkglibdir)
bindir = $(versiondir)$(exec_prefix)/bin
sbindir = $(versiondir)$(exec_prefix)/sbin
75 76 77 78 79 80
mandir = $(versionedsharedir)$(datarootdir)/man
pkgpythondir = $(versionedsharedir)/ganeti
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
storagedir = $(pkgpythondir)/storage
86
httpdir = $(pkgpythondir)/http
Michael Hanselmann's avatar
Michael Hanselmann committed
87
masterddir = $(pkgpythondir)/masterd
Guido Trotter's avatar
Guido Trotter committed
88
confddir = $(pkgpythondir)/confd
89
rapidir = $(pkgpythondir)/rapi
90
rpcdir = $(pkgpythondir)/rpc
91
serverdir = $(pkgpythondir)/server
92
watcherdir = $(pkgpythondir)/watcher
93
impexpddir = $(pkgpythondir)/impexpd
94
utilsdir = $(pkgpythondir)/utils
95
toolsdir = $(pkglibdir)/tools
96
iallocatorsdir = $(pkglibdir)/iallocators
97
pytoolsdir = $(pkgpythondir)/tools
98 99
docdir = $(versiondir)$(datadir)/doc/$(PACKAGE)

100
SYMLINK_TARGET_DIRS = \
101
	$(sysconfdir)/ganeti \
102
	$(libdir)/ganeti/iallocators \
103 104
	$(libdir)/ganeti/tools \
	$(prefix)/share/ganeti \
105 106 107 108 109
	$(exec_prefix)/bin \
	$(exec_prefix)/sbin \
	$(datarootdir)/man/man1 \
	$(datarootdir)/man/man7 \
	$(datarootdir)/man/man8
110

111 112 113
# Delete output file if an error occurred while building it
.DELETE_ON_ERROR:

114
HS_DIRS = \
Iustin Pop's avatar
Iustin Pop committed
115 116 117
	src \
	src/Ganeti \
	src/Ganeti/Confd \
118
	src/Ganeti/Curl \
119
	src/Ganeti/Cpu \
Iustin Pop's avatar
Iustin Pop committed
120
	src/Ganeti/DataCollectors \
121
	src/Ganeti/Hs2Py \
Iustin Pop's avatar
Iustin Pop committed
122 123 124
	src/Ganeti/HTools \
	src/Ganeti/HTools/Backend \
	src/Ganeti/HTools/Program \
125 126
	src/Ganeti/Hypervisor \
	src/Ganeti/Hypervisor/Xen \
127
	src/Ganeti/Monitoring \
Iustin Pop's avatar
Iustin Pop committed
128
	src/Ganeti/Query \
129 130 131
	src/Ganeti/Storage \
	src/Ganeti/Storage/Diskstats \
	src/Ganeti/Storage/Drbd \
Michele Tartara's avatar
Michele Tartara committed
132
	src/Ganeti/Storage/Lvm \
133
	src/Ganeti/THH \
134 135 136
	test/hs \
	test/hs/Test \
	test/hs/Test/Ganeti \
137 138 139
	test/hs/Test/Ganeti/Storage \
	test/hs/Test/Ganeti/Storage/Diskstats \
	test/hs/Test/Ganeti/Storage/Drbd \
Michele Tartara's avatar
Michele Tartara committed
140
	test/hs/Test/Ganeti/Storage/Lvm \
141 142 143
	test/hs/Test/Ganeti/Confd \
	test/hs/Test/Ganeti/HTools \
	test/hs/Test/Ganeti/HTools/Backend \
144 145
	test/hs/Test/Ganeti/Hypervisor \
	test/hs/Test/Ganeti/Hypervisor/Xen \
146
	test/hs/Test/Ganeti/Query
147

148 149 150
# Haskell directories without the roots (src, test/hs)
HS_DIRS_NOROOT = $(filter-out src,$(filter-out test/hs,$(HS_DIRS)))

151
DIRS = \
152
	$(HS_DIRS) \
153 154 155
	autotools \
	daemons \
	devel \
156
	devel/data \
157
	doc \
158
	doc/css \
159
	doc/examples \
160
	doc/examples/gnt-debug \
Iustin Pop's avatar
Iustin Pop committed
161
	doc/examples/hooks \
162
	doc/users \
163 164 165
	test/data/htools \
	test/data/htools/rapi \
	test/hs/shelltests \
Michele Tartara's avatar
Michele Tartara committed
166
	test/autotools \
167
	lib \
168
	lib/build \
Iustin Pop's avatar
Iustin Pop committed
169
	lib/client \
170
	lib/cmdlib \
171
	lib/confd \
172
	lib/http \
173
	lib/hypervisor \
174
	lib/impexpd \
Michael Hanselmann's avatar
Michael Hanselmann committed
175
	lib/masterd \
176
	lib/rapi \
177
	lib/rpc \
178
	lib/server \
179
	lib/storage \
180
	lib/tools \
181
	lib/utils \
182
	lib/watcher \
183 184 185 186
	man \
	qa \
	test \
	test/data \
187
	test/data/bdev-rbd \
Agata Murawska's avatar
Agata Murawska committed
188
	test/data/ovfdata \
Agata Murawska's avatar
Agata Murawska committed
189
	test/data/ovfdata/other \
Iustin Pop's avatar
Iustin Pop committed
190
	test/py \
191 192
	test/py/cmdlib \
	test/py/cmdlib/testsupport \
193 194
	tools

195
ALL_APIDOC_HS_DIRS = \
196
	$(APIDOC_HS_DIR) \
197
	$(patsubst %,$(APIDOC_HS_DIR)/%,$(call strip_hsroot,$(HS_DIRS_NOROOT)))
198 199 200 201 202

BUILDTIME_DIR_AUTOCREATE = \
	scripts \
	$(APIDOC_DIR) \
	$(ALL_APIDOC_HS_DIRS) \
Iustin Pop's avatar
Iustin Pop committed
203
	$(APIDOC_PY_DIR) \
204 205
	$(COVERAGE_DIR) \
	$(COVERAGE_HS_DIR) \
Iustin Pop's avatar
Iustin Pop committed
206
	$(COVERAGE_PY_DIR) \
207
	.hpc
208 209 210

BUILDTIME_DIRS = \
	$(BUILDTIME_DIR_AUTOCREATE) \
211 212
	doc/html \
	doc/man-html
213 214 215 216

DIRCHECK_EXCLUDE = \
	$(BUILDTIME_DIRS) \
	ganeti-[0-9]*.[0-9]*.[0-9]* \
Iustin Pop's avatar
Iustin Pop committed
217
	doc/html/_* \
218
	doc/man-html/_* \
Iustin Pop's avatar
Iustin Pop committed
219
	autom4te.cache
220

221 222 223 224 225 226 227 228
# 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
229
MAINTAINERCLEANFILES = \
230
	$(maninput) \
231
	doc/install-quick.rst \
232
	doc/news.rst \
233
	doc/upgrade.rst \
234
	vcs-version
Iustin Pop's avatar
Iustin Pop committed
235

236
maintainer-clean-local:
237
	rm -rf $(BUILDTIME_DIRS)
238

239
CLEANFILES = \
240
	$(addsuffix /*.py[co],$(DIRS)) \
241 242
	$(addsuffix /*.hi,$(HS_DIRS)) \
	$(addsuffix /*.o,$(HS_DIRS)) \
243
	$(PYTHON_BOOTSTRAP) \
244
	$(gnt_python_sbin_SCRIPTS) \
245
	epydoc.conf \
Iustin Pop's avatar
Iustin Pop committed
246
	$(REPLACE_VARS_SED) \
247
	$(SHELL_ENV_INIT) \
248
	daemons/daemon-util \
249
	daemons/ganeti-cleaner \
250 251
	devel/squeeze-amd64.tar.gz \
	devel/squeeze-amd64.conf \
252 253
	$(mandocrst) \
	doc/manpages-enabled.rst \
254
	$(BUILT_EXAMPLES) \
255
	doc/examples/bash_completion \
256
	doc/examples/bash_completion-debug \
257
	$(userspecs) \
258
	lib/_generated_rpc.py \
Iustin Pop's avatar
Iustin Pop committed
259 260
	$(man_MANS) \
	$(manhtml) \
261
	tools/kvm-ifup \
262 263
	tools/vif-ganeti \
	tools/net-common \
264
	tools/users-setup \
265
	tools/vcluster-setup \
266
	stamp-directories \
267
	stamp-srclinks \
268
	$(nodist_pkgpython_PYTHON) \
269
	$(gnt_scripts) \
270
	$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
271
	$(HS_BUILT_TEST_HELPERS) \
Iustin Pop's avatar
Iustin Pop committed
272
	src/ganeti-confd \
Thomas Thrainer's avatar
Thomas Thrainer committed
273
	src/ganeti-luxid \
274
	src/ganeti-mond \
275
	.hpc/*.mix src/*.tix test/hs/*.tix *.tix \
276
	doc/hs-lint.html
277

Iustin Pop's avatar
Iustin Pop committed
278
GENERATED_FILES = \
Iustin Pop's avatar
Iustin Pop committed
279
	$(built_base_sources) \
280
	$(BUILT_PYTHON_SOURCES) \
281 282
	$(PYTHON_BOOTSTRAP) \
	$(gnt_python_sbin_SCRIPTS)
283

284
HS_GENERATED_FILES =
285
if WANT_HTOOLS
286
HS_GENERATED_FILES += $(HS_PROGS)
287
if ENABLE_CONFD
Thomas Thrainer's avatar
Thomas Thrainer committed
288
HS_GENERATED_FILES += src/hconfd src/ganeti-confd src/hluxid src/ganeti-luxid
289
endif
290 291 292 293

if ENABLE_MOND
HS_GENERATED_FILES += src/ganeti-mond
endif
294 295
endif

296
built_base_sources = \
297 298
	stamp-directories \
	stamp-srclinks
299

300
built_python_base_sources = \
301
	lib/_constants.py \
Jose A. Lopes's avatar
Jose A. Lopes committed
302 303
	lib/_vcsversion.py \
	lib/opcodes.py
304 305 306

BUILT_PYTHON_SOURCES = \
	$(built_python_base_sources) \
307
	lib/_generated_rpc.py
308

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

313 314 315 316 317
# 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
318
	doc/examples/ganeti.logrotate \
319
	doc/examples/ganeti-master-role.ocf \
320
	doc/examples/ganeti-node-role.ocf \
321 322 323
	doc/examples/gnt-config-backup \
	doc/examples/hooks/ipsec

324 325 326
nodist_pkgpython_PYTHON = \
	$(BUILT_PYTHON_SOURCES)

327 328 329 330 331 332
nodist_pkgpython_bin_SCRIPTS = \
	$(nodist_pkglib_python_scripts)

pkgpython_bin_SCRIPTS = \
	$(pkglib_python_scripts)

333
noinst_PYTHON = \
Michael Hanselmann's avatar
Michael Hanselmann committed
334
	lib/build/__init__.py \
Iustin Pop's avatar
Iustin Pop committed
335 336
	lib/build/shell_example_lexer.py \
	lib/build/sphinx_ext.py
337

338 339
pkgpython_PYTHON = \
	lib/__init__.py \
Guido Trotter's avatar
Guido Trotter committed
340
	lib/asyncnotifier.py \
341 342 343
	lib/backend.py \
	lib/bootstrap.py \
	lib/cli.py \
344
	lib/compat.py \
345 346
	lib/config.py \
	lib/constants.py \
347
	lib/daemon.py \
348
	lib/errors.py \
349
	lib/hooksmaster.py \
350
	lib/ht.py \
351
	lib/jqueue.py \
352
	lib/jstore.py \
353 354 355
	lib/locking.py \
	lib/luxi.py \
	lib/mcpu.py \
356
	lib/netutils.py \
357
	lib/objects.py \
Jose A. Lopes's avatar
Jose A. Lopes committed
358
	lib/opcodes_base.py \
359
	lib/outils.py \
360
	lib/ovf.py \
361
	lib/pathutils.py \
362
	lib/qlang.py \
363
	lib/query.py \
364
	lib/rpc_defs.py \
365
	lib/runtime.py \
366 367 368
	lib/serializer.py \
	lib/ssconf.py \
	lib/ssh.py \
369
	lib/uidpool.py \
370
	lib/vcluster.py \
371
	lib/network.py \
372
	lib/workerpool.py
373

374
client_PYTHON = \
375
	lib/client/__init__.py \
376
	lib/client/gnt_backup.py \
377
	lib/client/gnt_cluster.py \
378
	lib/client/gnt_debug.py \
379
	lib/client/gnt_group.py \
380
	lib/client/gnt_instance.py \
381
	lib/client/gnt_job.py \
382
	lib/client/gnt_node.py \
383
	lib/client/gnt_network.py \
384 385
	lib/client/gnt_os.py \
	lib/client/gnt_storage.py
386

387
cmdlib_PYTHON = \
388
	lib/cmdlib/__init__.py \
389
	lib/cmdlib/backup.py \
390
	lib/cmdlib/base.py \
391
	lib/cmdlib/cluster.py \
392
	lib/cmdlib/common.py \
393
	lib/cmdlib/group.py \
394
	lib/cmdlib/instance.py \
395
	lib/cmdlib/instance_migration.py \
396
	lib/cmdlib/instance_operation.py \
397
	lib/cmdlib/instance_query.py \
398
	lib/cmdlib/instance_storage.py \
399
	lib/cmdlib/instance_utils.py \
400 401 402
	lib/cmdlib/misc.py \
	lib/cmdlib/network.py \
	lib/cmdlib/node.py \
403
	lib/cmdlib/operating_system.py \
404
	lib/cmdlib/query.py \
405
	lib/cmdlib/tags.py \
406
	lib/cmdlib/test.py
407

408 409 410
hypervisor_PYTHON = \
	lib/hypervisor/__init__.py \
	lib/hypervisor/hv_base.py \
411
	lib/hypervisor/hv_chroot.py \
412
	lib/hypervisor/hv_fake.py \
Guido Trotter's avatar
Guido Trotter committed
413
	lib/hypervisor/hv_kvm.py \
Iustin Pop's avatar
Iustin Pop committed
414
	lib/hypervisor/hv_lxc.py \
415 416
	lib/hypervisor/hv_xen.py

417 418 419 420
storage_PYTHON = \
	lib/storage/__init__.py \
	lib/storage/bdev.py \
	lib/storage/base.py \
421
	lib/storage/container.py \
422 423
	lib/storage/drbd.py \
	lib/storage/drbd_info.py \
424
	lib/storage/drbd_cmdgen.py \
Santi Raffa's avatar
Santi Raffa committed
425 426
	lib/storage/filestorage.py \
	lib/storage/gluster.py
427

428 429
rapi_PYTHON = \
	lib/rapi/__init__.py \
430
	lib/rapi/baserlib.py \
David Knowles's avatar
David Knowles committed
431
	lib/rapi/client.py \
432
	lib/rapi/client_utils.py \
433
	lib/rapi/connector.py \
434 435
	lib/rapi/rlib2.py \
	lib/rapi/testutils.py
436

437
http_PYTHON = \
438
	lib/http/__init__.py \
439
	lib/http/auth.py \
440 441
	lib/http/client.py \
	lib/http/server.py
442

Guido Trotter's avatar
Guido Trotter committed
443
confd_PYTHON = \
Guido Trotter's avatar
Guido Trotter committed
444
	lib/confd/__init__.py \
445
	lib/confd/client.py
446

Michael Hanselmann's avatar
Michael Hanselmann committed
447
masterd_PYTHON = \
448
	lib/masterd/__init__.py \
René Nussbaumer's avatar
René Nussbaumer committed
449
	lib/masterd/iallocator.py \
450
	lib/masterd/instance.py
Michael Hanselmann's avatar
Michael Hanselmann committed
451

452 453 454
impexpd_PYTHON = \
	lib/impexpd/__init__.py

455
watcher_PYTHON = \
456
	lib/watcher/__init__.py \
457 458
	lib/watcher/nodemaint.py \
	lib/watcher/state.py
459

460
server_PYTHON = \
461
	lib/server/__init__.py \
462
	lib/server/masterd.py \
463 464
	lib/server/noded.py \
	lib/server/rapi.py
465

466 467
rpc_PYTHON = \
	lib/rpc/__init__.py \
468
	lib/rpc/client.py \
469 470 471
	lib/rpc/errors.py \
	lib/rpc/node.py \
	lib/rpc/transport.py
472

473 474
pytools_PYTHON = \
	lib/tools/__init__.py \
475
	lib/tools/burnin.py \
476
	lib/tools/ensure_dirs.py \
Michael Hanselmann's avatar
Michael Hanselmann committed
477
	lib/tools/node_cleanup.py \
478
	lib/tools/node_daemon_setup.py \
479
	lib/tools/prepare_node_join.py
480

481
utils_PYTHON = \
482
	lib/utils/__init__.py \
483
	lib/utils/algo.py \
484
	lib/utils/filelock.py \
485
	lib/utils/hash.py \
486
	lib/utils/io.py \
487
	lib/utils/log.py \
488
	lib/utils/lvm.py \
489
	lib/utils/mlock.py \
490
	lib/utils/nodesetup.py \
491
	lib/utils/process.py \
492
	lib/utils/retry.py \
Helga Velroyen's avatar
Helga Velroyen committed
493
	lib/utils/storage.py \
494
	lib/utils/text.py \
495
	lib/utils/version.py \
496 497
	lib/utils/wrapper.py \
	lib/utils/x509.py
498

499
docinput = \
500
	doc/admin.rst \
Iustin Pop's avatar
Iustin Pop committed
501
	doc/cluster-merge.rst \
502 503
	doc/conf.py \
	doc/css/style.css \
504
	doc/design-2.0.rst \
505
	doc/design-2.1.rst \
506
	doc/design-2.2.rst \
Guido Trotter's avatar
Guido Trotter committed
507
	doc/design-2.3.rst \
508
	doc/design-2.4.rst \
509
	doc/design-2.5.rst \
510
	doc/design-2.6.rst \
511
	doc/design-2.7.rst \
512
	doc/design-2.8.rst \
Klaus Aehlig's avatar
Klaus Aehlig committed
513
	doc/design-2.9.rst \
514
	doc/design-2.10.rst \
Iustin Pop's avatar
Iustin Pop committed
515 516
	doc/design-autorepair.rst \
	doc/design-bulk-create.rst \
517
	doc/design-ceph-ganeti-support.rst \
Iustin Pop's avatar
Iustin Pop committed
518
	doc/design-chained-jobs.rst \
519
	doc/design-cmdlib-unittests.rst \
Tsachy Shacham's avatar
Tsachy Shacham committed
520
	doc/design-cpu-pinning.rst \
521
	doc/design-daemons.rst \
522
	doc/design-device-uuid-name.rst \
Iustin Pop's avatar
Iustin Pop committed
523
	doc/design-draft.rst \
524
	doc/design-glusterfs-ganeti-support.rst \
525 526 527
	doc/design-hotplug.rst \
	doc/design-hroller.rst \
	doc/design-hsqueeze.rst \
Iustin Pop's avatar
Iustin Pop committed
528
	doc/design-htools-2.3.rst \
529
	doc/design-http-server.rst \
530
	doc/design-hugepages-support.rst \
531
	doc/design-impexp2.rst \
532
	doc/design-internal-shutdown.rst \
533
	doc/design-linuxha.rst \
534 535
	doc/design-lu-generated-jobs.rst \
	doc/design-monitoring-agent.rst \
536
	doc/design-multi-reloc.rst \
537
	doc/design-multi-version-tests.rst \
538
	doc/design-network.rst \
539
	doc/design-node-add.rst \
Iustin Pop's avatar
Iustin Pop committed
540
	doc/design-oob.rst \
541
	doc/design-openvswitch.rst \
542
	doc/design-opportunistic-locking.rst \
543
	doc/design-optables.rst \
544
	doc/design-ovf-support.rst \
Iustin Pop's avatar
Iustin Pop committed
545 546
	doc/design-partitioned.rst \
	doc/design-query2.rst \
547
	doc/design-query-splitting.rst \
548
	doc/design-reason-trail.rst \
549
	doc/design-resource-model.rst \
550
	doc/design-restricted-commands.rst \
551
	doc/design-shared-storage.rst \
552
	doc/design-ssh-ports.rst \
553 554
	doc/design-storagetypes.rst \
	doc/design-upgrade.rst \
555
	doc/design-virtual-clusters.rst \
Iustin Pop's avatar
Iustin Pop committed
556
	doc/design-x509-ca.rst \
557
	doc/devnotes.rst \
558
	doc/glossary.rst \
559
	doc/hooks.rst \
560
	doc/iallocator.rst \
561
	doc/index.rst \
562
	doc/install-quick.rst \
563
	doc/install.rst \
564
	doc/locking.rst \
565
	doc/manpages-disabled.rst \
566
	doc/monitoring-query-format.rst \
567
	doc/move-instance.rst \
Iustin Pop's avatar
Iustin Pop committed
568
	doc/news.rst \
569
	doc/ovfconverter.rst \
570
	doc/rapi.rst \
571
	doc/security.rst \
572
	doc/upgrade.rst \
573
	doc/virtual-cluster.rst \
Iustin Pop's avatar
Iustin Pop committed
574
	doc/walkthrough.rst
Michael Hanselmann's avatar
Michael Hanselmann committed
575

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

579 580 581 582
# Haskell programs to be installed in $PREFIX/bin
HS_BIN_PROGS=src/htools

# Haskell programs to be installed in the MYEXECLIB dir
583
if ENABLE_MOND
584
HS_MYEXECLIB_PROGS=src/mon-collector
585 586 587
else
HS_MYEXECLIB_PROGS=
endif
588

589
# Haskell programs to be compiled by "make really-all"
590
HS_COMPILE_PROGS= \
591
	src/ganeti-mond \
592
	src/hconfd \
Thomas Thrainer's avatar
Thomas Thrainer committed
593
	src/hluxid \
Jose A. Lopes's avatar
Jose A. Lopes committed
594
	src/hs2py \
595 596 597 598 599
	src/rpc-test

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

600
HS_BIN_ROLES = harep hbal hscan hspace hinfo hcheck hroller hsqueeze
601
HS_HTOOLS_PROGS = $(HS_BIN_ROLES) hail
602

603 604 605 606
# Haskell programs that cannot be disabled at configure (e.g., unlike
# 'mon-collector')
HS_DEFAULT_PROGS = \
	$(HS_BIN_PROGS) \
607 608
	test/hs/hpc-htools \
	test/hs/hpc-mon-collector \
Iustin Pop's avatar
Iustin Pop committed
609
	test/hs/htest \
610
	$(HS_COMPILE_PROGS)
611

612 613
HS_ALL_PROGS = $(HS_DEFAULT_PROGS) $(HS_MYEXECLIB_PROGS)

614
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_DEFAULT_PROGS)) src/mon-collector.hs
615
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=test/hs/%) test/hs/hail
616

617
HFLAGS = \
Iustin Pop's avatar
Iustin Pop committed
618
	-O -Wall -Werror -isrc \
619 620 621 622
	-fwarn-monomorphism-restriction \
	-fwarn-tabs \
	$(GHC_BYVERSION_FLAGS)

623
# extra flags that can be overriden on the command line (e.g. -Wwarn, etc.)
624
HEXTRA =
Iustin Pop's avatar
Iustin Pop committed
625
# internal extra flags (used for test/hs/htest mainly)
626
HEXTRA_INT =
627
# exclude options for coverage reports
628
HPCEXCL = --exclude Main \
629
	--exclude Ganeti.Constants \
630
	--exclude Ganeti.HTools.QC \
Iustin Pop's avatar
Iustin Pop committed
631
	--exclude Ganeti.THH \
632
	--exclude Ganeti.Version \
633
	--exclude Test.Ganeti.Attoparsec \
634
	--exclude Test.Ganeti.TestCommon \
635 636
	--exclude Test.Ganeti.TestHTools \
	--exclude Test.Ganeti.TestHelper \
637
	--exclude Test.Ganeti.TestImports \
Iustin Pop's avatar
Iustin Pop committed
638
	$(patsubst src.%,--exclude Test.%,$(subst /,.,$(patsubst %.hs,%, $(HS_LIB_SRCS))))
639

640
HS_LIB_SRCS = \
Iustin Pop's avatar
Iustin Pop committed
641 642 643 644
	src/Ganeti/BasicTypes.hs \
	src/Ganeti/Common.hs \
	src/Ganeti/Compat.hs \
	src/Ganeti/Confd/Client.hs \
645
	src/Ganeti/Confd/ClientFunctions.hs \
Iustin Pop's avatar
Iustin Pop committed
646 647 648 649
	src/Ganeti/Confd/Server.hs \
	src/Ganeti/Confd/Types.hs \
	src/Ganeti/Confd/Utils.hs \
	src/Ganeti/Config.hs \
650
	src/Ganeti/ConfigReader.hs \
651
	src/Ganeti/Constants.hs \
Jose A. Lopes's avatar
Jose A. Lopes committed
652
	src/Ganeti/ConstantUtils.hs \
653 654
	src/Ganeti/Cpu/LoadParser.hs \
	src/Ganeti/Cpu/Types.hs \
655
	src/Ganeti/Curl/Multi.hs \
Iustin Pop's avatar
Iustin Pop committed
656 657
	src/Ganeti/Daemon.hs \
	src/Ganeti/DataCollectors/CLI.hs \
Spyros Trigazis's avatar
Spyros Trigazis committed
658
	src/Ganeti/DataCollectors/CPUload.hs \
Michele Tartara's avatar
Michele Tartara committed
659
	src/Ganeti/DataCollectors/Diskstats.hs \
Iustin Pop's avatar
Iustin Pop committed
660
	src/Ganeti/DataCollectors/Drbd.hs \
661 662
	src/Ganeti/DataCollectors/InstStatus.hs \
	src/Ganeti/DataCollectors/InstStatusTypes.hs \
Michele Tartara's avatar
Michele Tartara committed
663
	src/Ganeti/DataCollectors/Lv.hs \
Iustin Pop's avatar
Iustin Pop committed
664
	src/Ganeti/DataCollectors/Program.hs \
665
	src/Ganeti/DataCollectors/Types.hs \
Iustin Pop's avatar
Iustin Pop committed
666 667 668 669 670 671 672 673 674 675 676 677 678 679
	src/Ganeti/Errors.hs \
	src/Ganeti/HTools/Backend/IAlloc.hs \
	src/Ganeti/HTools/Backend/Luxi.hs \
	src/Ganeti/HTools/Backend/Rapi.hs \
	src/Ganeti/HTools/Backend/Simu.hs \
	src/Ganeti/HTools/Backend/Text.hs \
	src/Ganeti/HTools/CLI.hs \
	src/Ganeti/HTools/Cluster.hs \
	src/Ganeti/HTools/Container.hs \
	src/Ganeti/HTools/ExtLoader.hs \
	src/Ganeti/HTools/Graph.hs \
	src/Ganeti/HTools/Group.hs \
	src/Ganeti/HTools/Instance.hs \
	src/Ganeti/HTools/Loader.hs \
680
	src/Ganeti/HTools/Nic.hs \
Iustin Pop's avatar
Iustin Pop committed
681 682 683
	src/Ganeti/HTools/Node.hs \
	src/Ganeti/HTools/PeerMap.hs \
	src/Ganeti/HTools/Program/Hail.hs \
684
	src/Ganeti/HTools/Program/Harep.hs \
Iustin Pop's avatar
Iustin Pop committed
685 686 687 688 689
	src/Ganeti/HTools/Program/Hbal.hs \
	src/Ganeti/HTools/Program/Hcheck.hs \
	src/Ganeti/HTools/Program/Hinfo.hs \
	src/Ganeti/HTools/Program/Hscan.hs \
	src/Ganeti/HTools/Program/Hspace.hs \
690
	src/Ganeti/HTools/Program/Hsqueeze.hs \
Iustin Pop's avatar
Iustin Pop committed
691
	src/Ganeti/HTools/Program/Hroller.hs \
692
	src/Ganeti/HTools/Program/Main.hs \
Iustin Pop's avatar
Iustin Pop committed
693
	src/Ganeti/HTools/Types.hs \
694
	src/Ganeti/Hypervisor/Xen.hs \
695 696
	src/Ganeti/Hypervisor/Xen/XmParser.hs \
	src/Ganeti/Hypervisor/Xen/Types.hs \
Iustin Pop's avatar
Iustin Pop committed
697
	src/Ganeti/Hash.hs \
698
	src/Ganeti/Hs2Py/GenConstants.hs \
699
	src/Ganeti/Hs2Py/GenOpCodes.hs \
Jose A. Lopes's avatar
Jose A. Lopes committed
700
	src/Ganeti/Hs2Py/OpDoc.hs \
Iustin Pop's avatar
Iustin Pop committed
701
	src/Ganeti/JQueue.hs \
702
	src/Ganeti/JQScheduler.hs \
Iustin Pop's avatar
Iustin Pop committed
703 704 705 706
	src/Ganeti/JSON.hs \
	src/Ganeti/Jobs.hs \
	src/Ganeti/Logging.hs \
	src/Ganeti/Luxi.hs \
707
	src/Ganeti/Monitoring/Server.hs \
Iustin Pop's avatar
Iustin Pop committed
708 709 710 711 712
	src/Ganeti/Network.hs \
	src/Ganeti/Objects.hs \
	src/Ganeti/OpCodes.hs \
	src/Ganeti/OpParams.hs \
	src/Ganeti/Path.hs \
Spyros Trigazis's avatar
Spyros Trigazis committed
713
	src/Ganeti/Parsers.hs \
714
	src/Ganeti/PyValue.hs \
Thomas Thrainer's avatar
Thomas Thrainer committed
715
	src/Ganeti/Query/Cluster.hs \
Iustin Pop's avatar
Iustin Pop committed
716
	src/Ganeti/Query/Common.hs \
717
	src/Ganeti/Query/Export.hs \
Iustin Pop's avatar
Iustin Pop committed
718 719
	src/Ganeti/Query/Filter.hs \
	src/Ganeti/Query/Group.hs \
720
	src/Ganeti/Query/Instance.hs \
Iustin Pop's avatar
Iustin Pop committed
721 722
	src/Ganeti/Query/Job.hs \
	src/Ganeti/Query/Language.hs \
723
	src/Ganeti/Query/Network.hs \
Iustin Pop's avatar
Iustin Pop committed
724 725 726 727 728 729 730
	src/Ganeti/Query/Node.hs \
	src/Ganeti/Query/Query.hs \
	src/Ganeti/Query/Server.hs \
	src/Ganeti/Query/Types.hs \
	src/Ganeti/Rpc.hs \
	src/Ganeti/Runtime.hs \
	src/Ganeti/Ssconf.hs \
731 732 733 734
	src/Ganeti/Storage/Diskstats/Parser.hs \
	src/Ganeti/Storage/Diskstats/Types.hs \
	src/Ganeti/Storage/Drbd/Parser.hs \
	src/Ganeti/Storage/Drbd/Types.hs \
Michele Tartara's avatar
Michele Tartara committed
735 736
	src/Ganeti/Storage/Lvm/LVParser.hs \
	src/Ganeti/Storage/Lvm/Types.hs \
737
	src/Ganeti/Storage/Utils.hs \
Iustin Pop's avatar
Iustin Pop committed
738
	src/Ganeti/THH.hs \
739
	src/Ganeti/THH/PyType.hs \
Iustin Pop's avatar
Iustin Pop committed
740