root / Makefile.am @ a80e802a
History | View | Annotate | Download (72.6 kB)
1 |
# Ganeti makefile |
---|---|
2 |
# - Indent with tabs only. |
3 |
# - Keep files sorted; one line per file. |
4 |
# - Directories in lib/ must have their own *dir variable (see hypervisor). |
5 |
# - All directories must be listed DIRS. |
6 |
# - Use autogen.sh to generate Makefile.in and configure script. |
7 |
|
8 |
# Automake doesn't export these variables before version 1.10. |
9 |
abs_top_builddir = @abs_top_builddir@ |
10 |
abs_top_srcdir = @abs_top_srcdir@ |
11 |
|
12 |
# Helper values for calling builtin functions |
13 |
empty := |
14 |
space := $(empty) $(empty) |
15 |
comma := , |
16 |
|
17 |
# Helper function to strip src/ and test/hs/ from a list |
18 |
strip_hsroot = $(patsubst src/%,%,$(patsubst test/hs/%,%,$(1))) |
19 |
|
20 |
# Use bash in order to be able to use pipefail |
21 |
SHELL=/bin/bash |
22 |
|
23 |
# Enable colors in shelltest |
24 |
SHELLTESTARGS = "-c" |
25 |
|
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 |
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 |
CONVERT_CONSTANTS = $(top_srcdir)/autotools/convert-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 |
# $(versiondir) contains most of Ganeti and all architecture-dependent files |
47 |
# $(versionedsharedir) contains only architecture-independent files; all python |
48 |
# executables need to go directly to $(versionedsharedir), as all ganeti python |
49 |
# mdules are installed outside the usual python path, i.e., as private modules. |
50 |
# |
51 |
# $(defaultversiondir) and $(defaultversionedsharedir) are the corresponding |
52 |
# directories for "the currently running" version of Ganeti. We never install |
53 |
# there, but all symbolic links go there, rather than directory to $(versiondir) |
54 |
# or $(versionedsharedir). Note that all links to $(default*dir) need to be stable; |
55 |
# so, if some currently architecture-independent executable is replaced by an |
56 |
# architecture-dependent one (and hence has to go under $(versiondir)), add a link |
57 |
# under $(versionedsharedir) but do not change the external links. |
58 |
if USE_VERSION_FULL |
59 |
DIRVERSION=$(VERSION_FULL) |
60 |
else |
61 |
DIRVERSION=$(VERSION_MAJOR).$(VERSION_MINOR) |
62 |
endif |
63 |
versiondir = $(libdir)/ganeti/$(DIRVERSION) |
64 |
defaultversiondir = $(libdir)/ganeti/default |
65 |
versionedsharedir = $(prefix)/share/ganeti/$(DIRVERSION) |
66 |
defaultversionedsharedir = $(prefix)/share/ganeti/default |
67 |
|
68 |
|
69 |
# Note: these are automake-specific variables, and must be named after |
70 |
# the directory + 'dir' suffix |
71 |
pkglibdir = $(versiondir)$(libdir)/ganeti |
72 |
myexeclibdir = $(pkglibdir) |
73 |
bindir = $(versiondir)$(exec_prefix)/bin |
74 |
sbindir = $(versiondir)$(exec_prefix)/sbin |
75 |
mandir = $(versionedsharedir)$(datarootdir)/man |
76 |
pkgpythondir = $(versionedsharedir)/ganeti |
77 |
gntpythondir = $(versionedsharedir) |
78 |
pkgpython_bindir = $(versionedsharedir) |
79 |
gnt_python_sbindir = $(versionedsharedir) |
80 |
tools_pythondir = $(versionedsharedir) |
81 |
|
82 |
clientdir = $(pkgpythondir)/client |
83 |
cmdlibdir = $(pkgpythondir)/cmdlib |
84 |
hypervisordir = $(pkgpythondir)/hypervisor |
85 |
storagedir = $(pkgpythondir)/storage |
86 |
httpdir = $(pkgpythondir)/http |
87 |
masterddir = $(pkgpythondir)/masterd |
88 |
confddir = $(pkgpythondir)/confd |
89 |
rapidir = $(pkgpythondir)/rapi |
90 |
serverdir = $(pkgpythondir)/server |
91 |
watcherdir = $(pkgpythondir)/watcher |
92 |
impexpddir = $(pkgpythondir)/impexpd |
93 |
utilsdir = $(pkgpythondir)/utils |
94 |
toolsdir = $(pkglibdir)/tools |
95 |
iallocatorsdir = $(pkglibdir)/iallocators |
96 |
pytoolsdir = $(pkgpythondir)/tools |
97 |
docdir = $(versiondir)$(datadir)/doc/$(PACKAGE) |
98 |
|
99 |
SYMLINK_TARGET_DIRS = \ |
100 |
$(sysconfdir)/ganeti \ |
101 |
$(libdir)/ganeti/iallocators \ |
102 |
$(libdir)/ganeti/tools \ |
103 |
$(prefix)/share/ganeti \ |
104 |
$(exec_prefix)/bin \ |
105 |
$(exec_prefix)/sbin \ |
106 |
$(datarootdir)/man/man1 \ |
107 |
$(datarootdir)/man/man7 \ |
108 |
$(datarootdir)/man/man8 |
109 |
|
110 |
# Delete output file if an error occurred while building it |
111 |
.DELETE_ON_ERROR: |
112 |
|
113 |
HS_DIRS = \ |
114 |
src \ |
115 |
src/Ganeti \ |
116 |
src/Ganeti/Confd \ |
117 |
src/Ganeti/Curl \ |
118 |
src/Ganeti/Cpu \ |
119 |
src/Ganeti/DataCollectors \ |
120 |
src/Ganeti/Hs2Py \ |
121 |
src/Ganeti/HTools \ |
122 |
src/Ganeti/HTools/Backend \ |
123 |
src/Ganeti/HTools/Program \ |
124 |
src/Ganeti/Hypervisor \ |
125 |
src/Ganeti/Hypervisor/Xen \ |
126 |
src/Ganeti/Monitoring \ |
127 |
src/Ganeti/Query \ |
128 |
src/Ganeti/Storage \ |
129 |
src/Ganeti/Storage/Diskstats \ |
130 |
src/Ganeti/Storage/Drbd \ |
131 |
src/Ganeti/Storage/Lvm \ |
132 |
test/hs \ |
133 |
test/hs/Test \ |
134 |
test/hs/Test/Ganeti \ |
135 |
test/hs/Test/Ganeti/Storage \ |
136 |
test/hs/Test/Ganeti/Storage/Diskstats \ |
137 |
test/hs/Test/Ganeti/Storage/Drbd \ |
138 |
test/hs/Test/Ganeti/Storage/Lvm \ |
139 |
test/hs/Test/Ganeti/Confd \ |
140 |
test/hs/Test/Ganeti/HTools \ |
141 |
test/hs/Test/Ganeti/HTools/Backend \ |
142 |
test/hs/Test/Ganeti/Hypervisor \ |
143 |
test/hs/Test/Ganeti/Hypervisor/Xen \ |
144 |
test/hs/Test/Ganeti/Query |
145 |
|
146 |
# Haskell directories without the roots (src, test/hs) |
147 |
HS_DIRS_NOROOT = $(filter-out src,$(filter-out test/hs,$(HS_DIRS))) |
148 |
|
149 |
DIRS = \ |
150 |
$(HS_DIRS) \ |
151 |
autotools \ |
152 |
daemons \ |
153 |
devel \ |
154 |
devel/data \ |
155 |
doc \ |
156 |
doc/css \ |
157 |
doc/examples \ |
158 |
doc/examples/gnt-debug \ |
159 |
doc/examples/hooks \ |
160 |
doc/users \ |
161 |
test/data/htools \ |
162 |
test/data/htools/rapi \ |
163 |
test/hs/shelltests \ |
164 |
test/autotools \ |
165 |
lib \ |
166 |
lib/build \ |
167 |
lib/client \ |
168 |
lib/cmdlib \ |
169 |
lib/confd \ |
170 |
lib/http \ |
171 |
lib/hypervisor \ |
172 |
lib/impexpd \ |
173 |
lib/masterd \ |
174 |
lib/rapi \ |
175 |
lib/server \ |
176 |
lib/storage \ |
177 |
lib/tools \ |
178 |
lib/utils \ |
179 |
lib/watcher \ |
180 |
man \ |
181 |
qa \ |
182 |
test \ |
183 |
test/data \ |
184 |
test/data/bdev-rbd \ |
185 |
test/data/ovfdata \ |
186 |
test/data/ovfdata/other \ |
187 |
test/py \ |
188 |
test/py/cmdlib \ |
189 |
test/py/cmdlib/testsupport \ |
190 |
tools |
191 |
|
192 |
ALL_APIDOC_HS_DIRS = \ |
193 |
$(APIDOC_HS_DIR) \ |
194 |
$(patsubst %,$(APIDOC_HS_DIR)/%,$(call strip_hsroot,$(HS_DIRS_NOROOT))) |
195 |
|
196 |
BUILDTIME_DIR_AUTOCREATE = \ |
197 |
scripts \ |
198 |
$(APIDOC_DIR) \ |
199 |
$(ALL_APIDOC_HS_DIRS) \ |
200 |
$(APIDOC_PY_DIR) \ |
201 |
$(COVERAGE_DIR) \ |
202 |
$(COVERAGE_HS_DIR) \ |
203 |
$(COVERAGE_PY_DIR) \ |
204 |
.hpc |
205 |
|
206 |
BUILDTIME_DIRS = \ |
207 |
$(BUILDTIME_DIR_AUTOCREATE) \ |
208 |
doc/html \ |
209 |
doc/man-html |
210 |
|
211 |
DIRCHECK_EXCLUDE = \ |
212 |
$(BUILDTIME_DIRS) \ |
213 |
ganeti-[0-9]*.[0-9]*.[0-9]* \ |
214 |
doc/html/_* \ |
215 |
doc/man-html/_* \ |
216 |
autom4te.cache |
217 |
|
218 |
# some helper vars |
219 |
COVERAGE_DIR = doc/coverage |
220 |
COVERAGE_PY_DIR = $(COVERAGE_DIR)/py |
221 |
COVERAGE_HS_DIR = $(COVERAGE_DIR)/hs |
222 |
APIDOC_DIR = doc/api |
223 |
APIDOC_PY_DIR = $(APIDOC_DIR)/py |
224 |
APIDOC_HS_DIR = $(APIDOC_DIR)/hs |
225 |
|
226 |
MAINTAINERCLEANFILES = \ |
227 |
$(maninput) \ |
228 |
doc/install-quick.rst \ |
229 |
doc/news.rst \ |
230 |
doc/upgrade.rst \ |
231 |
vcs-version |
232 |
|
233 |
maintainer-clean-local: |
234 |
rm -rf $(BUILDTIME_DIRS) |
235 |
|
236 |
CLEANFILES = \ |
237 |
$(addsuffix /*.py[co],$(DIRS)) \ |
238 |
$(addsuffix /*.hi,$(HS_DIRS)) \ |
239 |
$(addsuffix /*.o,$(HS_DIRS)) \ |
240 |
$(PYTHON_BOOTSTRAP) \ |
241 |
$(gnt_python_sbin_SCRIPTS) \ |
242 |
epydoc.conf \ |
243 |
$(REPLACE_VARS_SED) \ |
244 |
$(SHELL_ENV_INIT) \ |
245 |
daemons/daemon-util \ |
246 |
daemons/ganeti-cleaner \ |
247 |
devel/squeeze-amd64.tar.gz \ |
248 |
devel/squeeze-amd64.conf \ |
249 |
$(mandocrst) \ |
250 |
doc/manpages-enabled.rst \ |
251 |
$(BUILT_EXAMPLES) \ |
252 |
doc/examples/bash_completion \ |
253 |
doc/examples/bash_completion-debug \ |
254 |
$(userspecs) \ |
255 |
lib/_generated_rpc.py \ |
256 |
$(man_MANS) \ |
257 |
$(manhtml) \ |
258 |
tools/kvm-ifup \ |
259 |
tools/vif-ganeti \ |
260 |
tools/net-common \ |
261 |
tools/users-setup \ |
262 |
tools/vcluster-setup \ |
263 |
stamp-directories \ |
264 |
stamp-srclinks \ |
265 |
$(nodist_pkgpython_PYTHON) \ |
266 |
$(gnt_scripts) \ |
267 |
$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \ |
268 |
$(HS_BUILT_TEST_HELPERS) \ |
269 |
src/ganeti-confd \ |
270 |
src/ganeti-luxid \ |
271 |
src/ganeti-mond \ |
272 |
src/hs2py-constants \ |
273 |
.hpc/*.mix src/*.tix test/hs/*.tix *.tix \ |
274 |
doc/hs-lint.html |
275 |
|
276 |
GENERATED_FILES = \ |
277 |
$(built_base_sources) \ |
278 |
$(BUILT_PYTHON_SOURCES) \ |
279 |
$(PYTHON_BOOTSTRAP) \ |
280 |
$(gnt_python_sbin_SCRIPTS) |
281 |
|
282 |
HS_GENERATED_FILES = |
283 |
if WANT_HTOOLS |
284 |
HS_GENERATED_FILES += $(HS_PROGS) |
285 |
if ENABLE_CONFD |
286 |
HS_GENERATED_FILES += src/hconfd src/ganeti-confd src/hluxid src/ganeti-luxid |
287 |
endif |
288 |
|
289 |
if ENABLE_MOND |
290 |
HS_GENERATED_FILES += src/ganeti-mond |
291 |
endif |
292 |
endif |
293 |
|
294 |
built_base_sources = \ |
295 |
stamp-directories \ |
296 |
stamp-srclinks |
297 |
|
298 |
built_python_base_sources = \ |
299 |
lib/_constants.py \ |
300 |
lib/_vcsversion.py \ |
301 |
lib/opcodes.py |
302 |
|
303 |
BUILT_PYTHON_SOURCES = \ |
304 |
$(built_python_base_sources) \ |
305 |
lib/_generated_rpc.py |
306 |
|
307 |
# Generating the RPC wrappers depends on many things, so make sure |
308 |
# it's built at the end of the built sources |
309 |
lib/_generated_rpc.py: | $(built_base_sources) $(built_python_base_sources) |
310 |
|
311 |
# these are all built from the underlying %.in sources |
312 |
BUILT_EXAMPLES = \ |
313 |
doc/examples/ganeti-kvm-poweroff.initd \ |
314 |
doc/examples/ganeti.cron \ |
315 |
doc/examples/ganeti.initd \ |
316 |
doc/examples/ganeti.logrotate \ |
317 |
doc/examples/ganeti-master-role.ocf \ |
318 |
doc/examples/ganeti-node-role.ocf \ |
319 |
doc/examples/gnt-config-backup \ |
320 |
doc/examples/hooks/ipsec |
321 |
|
322 |
nodist_pkgpython_PYTHON = \ |
323 |
$(BUILT_PYTHON_SOURCES) |
324 |
|
325 |
nodist_pkgpython_bin_SCRIPTS = \ |
326 |
$(nodist_pkglib_python_scripts) |
327 |
|
328 |
pkgpython_bin_SCRIPTS = \ |
329 |
$(pkglib_python_scripts) |
330 |
|
331 |
noinst_PYTHON = \ |
332 |
lib/build/__init__.py \ |
333 |
lib/build/shell_example_lexer.py \ |
334 |
lib/build/sphinx_ext.py |
335 |
|
336 |
pkgpython_PYTHON = \ |
337 |
lib/__init__.py \ |
338 |
lib/asyncnotifier.py \ |
339 |
lib/backend.py \ |
340 |
lib/bootstrap.py \ |
341 |
lib/cli.py \ |
342 |
lib/compat.py \ |
343 |
lib/config.py \ |
344 |
lib/constants.py \ |
345 |
lib/daemon.py \ |
346 |
lib/errors.py \ |
347 |
lib/hooksmaster.py \ |
348 |
lib/ht.py \ |
349 |
lib/jqueue.py \ |
350 |
lib/jstore.py \ |
351 |
lib/locking.py \ |
352 |
lib/luxi.py \ |
353 |
lib/mcpu.py \ |
354 |
lib/netutils.py \ |
355 |
lib/objects.py \ |
356 |
lib/opcodes_base.py \ |
357 |
lib/outils.py \ |
358 |
lib/ovf.py \ |
359 |
lib/pathutils.py \ |
360 |
lib/qlang.py \ |
361 |
lib/query.py \ |
362 |
lib/rpc.py \ |
363 |
lib/rpc_defs.py \ |
364 |
lib/runtime.py \ |
365 |
lib/serializer.py \ |
366 |
lib/ssconf.py \ |
367 |
lib/ssh.py \ |
368 |
lib/uidpool.py \ |
369 |
lib/vcluster.py \ |
370 |
lib/network.py \ |
371 |
lib/workerpool.py |
372 |
|
373 |
client_PYTHON = \ |
374 |
lib/client/__init__.py \ |
375 |
lib/client/gnt_backup.py \ |
376 |
lib/client/gnt_cluster.py \ |
377 |
lib/client/gnt_debug.py \ |
378 |
lib/client/gnt_group.py \ |
379 |
lib/client/gnt_instance.py \ |
380 |
lib/client/gnt_job.py \ |
381 |
lib/client/gnt_node.py \ |
382 |
lib/client/gnt_network.py \ |
383 |
lib/client/gnt_os.py \ |
384 |
lib/client/gnt_storage.py |
385 |
|
386 |
cmdlib_PYTHON = \ |
387 |
lib/cmdlib/__init__.py \ |
388 |
lib/cmdlib/backup.py \ |
389 |
lib/cmdlib/base.py \ |
390 |
lib/cmdlib/cluster.py \ |
391 |
lib/cmdlib/common.py \ |
392 |
lib/cmdlib/group.py \ |
393 |
lib/cmdlib/instance.py \ |
394 |
lib/cmdlib/instance_migration.py \ |
395 |
lib/cmdlib/instance_operation.py \ |
396 |
lib/cmdlib/instance_query.py \ |
397 |
lib/cmdlib/instance_storage.py \ |
398 |
lib/cmdlib/instance_utils.py \ |
399 |
lib/cmdlib/misc.py \ |
400 |
lib/cmdlib/network.py \ |
401 |
lib/cmdlib/node.py \ |
402 |
lib/cmdlib/operating_system.py \ |
403 |
lib/cmdlib/query.py \ |
404 |
lib/cmdlib/tags.py \ |
405 |
lib/cmdlib/test.py |
406 |
|
407 |
hypervisor_PYTHON = \ |
408 |
lib/hypervisor/__init__.py \ |
409 |
lib/hypervisor/hv_base.py \ |
410 |
lib/hypervisor/hv_chroot.py \ |
411 |
lib/hypervisor/hv_fake.py \ |
412 |
lib/hypervisor/hv_kvm.py \ |
413 |
lib/hypervisor/hv_lxc.py \ |
414 |
lib/hypervisor/hv_xen.py |
415 |
|
416 |
storage_PYTHON = \ |
417 |
lib/storage/__init__.py \ |
418 |
lib/storage/bdev.py \ |
419 |
lib/storage/base.py \ |
420 |
lib/storage/container.py \ |
421 |
lib/storage/drbd.py \ |
422 |
lib/storage/drbd_info.py \ |
423 |
lib/storage/drbd_cmdgen.py \ |
424 |
lib/storage/filestorage.py |
425 |
|
426 |
rapi_PYTHON = \ |
427 |
lib/rapi/__init__.py \ |
428 |
lib/rapi/baserlib.py \ |
429 |
lib/rapi/client.py \ |
430 |
lib/rapi/client_utils.py \ |
431 |
lib/rapi/connector.py \ |
432 |
lib/rapi/rlib2.py \ |
433 |
lib/rapi/testutils.py |
434 |
|
435 |
http_PYTHON = \ |
436 |
lib/http/__init__.py \ |
437 |
lib/http/auth.py \ |
438 |
lib/http/client.py \ |
439 |
lib/http/server.py |
440 |
|
441 |
confd_PYTHON = \ |
442 |
lib/confd/__init__.py \ |
443 |
lib/confd/client.py |
444 |
|
445 |
masterd_PYTHON = \ |
446 |
lib/masterd/__init__.py \ |
447 |
lib/masterd/iallocator.py \ |
448 |
lib/masterd/instance.py |
449 |
|
450 |
impexpd_PYTHON = \ |
451 |
lib/impexpd/__init__.py |
452 |
|
453 |
watcher_PYTHON = \ |
454 |
lib/watcher/__init__.py \ |
455 |
lib/watcher/nodemaint.py \ |
456 |
lib/watcher/state.py |
457 |
|
458 |
server_PYTHON = \ |
459 |
lib/server/__init__.py \ |
460 |
lib/server/masterd.py \ |
461 |
lib/server/noded.py \ |
462 |
lib/server/rapi.py |
463 |
|
464 |
pytools_PYTHON = \ |
465 |
lib/tools/__init__.py \ |
466 |
lib/tools/burnin.py \ |
467 |
lib/tools/ensure_dirs.py \ |
468 |
lib/tools/node_cleanup.py \ |
469 |
lib/tools/node_daemon_setup.py \ |
470 |
lib/tools/prepare_node_join.py |
471 |
|
472 |
utils_PYTHON = \ |
473 |
lib/utils/__init__.py \ |
474 |
lib/utils/algo.py \ |
475 |
lib/utils/filelock.py \ |
476 |
lib/utils/hash.py \ |
477 |
lib/utils/io.py \ |
478 |
lib/utils/log.py \ |
479 |
lib/utils/lvm.py \ |
480 |
lib/utils/mlock.py \ |
481 |
lib/utils/nodesetup.py \ |
482 |
lib/utils/process.py \ |
483 |
lib/utils/retry.py \ |
484 |
lib/utils/storage.py \ |
485 |
lib/utils/text.py \ |
486 |
lib/utils/version.py \ |
487 |
lib/utils/wrapper.py \ |
488 |
lib/utils/x509.py |
489 |
|
490 |
docinput = \ |
491 |
doc/conf.py \ |
492 |
doc/css/style.css \ |
493 |
doc/admin.rst \ |
494 |
doc/cluster-merge.rst \ |
495 |
doc/design-2.0.rst \ |
496 |
doc/design-2.1.rst \ |
497 |
doc/design-2.2.rst \ |
498 |
doc/design-2.3.rst \ |
499 |
doc/design-2.4.rst \ |
500 |
doc/design-2.5.rst \ |
501 |
doc/design-2.6.rst \ |
502 |
doc/design-2.7.rst \ |
503 |
doc/design-2.8.rst \ |
504 |
doc/design-2.9.rst \ |
505 |
doc/design-autorepair.rst \ |
506 |
doc/design-bulk-create.rst \ |
507 |
doc/design-chained-jobs.rst \ |
508 |
doc/design-cpu-pinning.rst \ |
509 |
doc/design-device-uuid-name.rst \ |
510 |
doc/design-draft.rst \ |
511 |
doc/design-hotplug.rst \ |
512 |
doc/design-glusterfs-ganeti-support.rst \ |
513 |
doc/design-daemons.rst \ |
514 |
doc/design-htools-2.3.rst \ |
515 |
doc/design-http-server.rst \ |
516 |
doc/design-impexp2.rst \ |
517 |
doc/design-internal-shutdown.rst \ |
518 |
doc/design-lu-generated-jobs.rst \ |
519 |
doc/design-linuxha.rst \ |
520 |
doc/design-multi-reloc.rst \ |
521 |
doc/design-network.rst \ |
522 |
doc/design-node-add.rst \ |
523 |
doc/design-oob.rst \ |
524 |
doc/design-openvswitch.rst \ |
525 |
doc/design-ovf-support.rst \ |
526 |
doc/design-opportunistic-locking.rst \ |
527 |
doc/design-optables.rst \ |
528 |
doc/design-partitioned.rst \ |
529 |
doc/design-query-splitting.rst \ |
530 |
doc/design-query2.rst \ |
531 |
doc/design-reason-trail.rst \ |
532 |
doc/design-resource-model.rst \ |
533 |
doc/design-restricted-commands.rst \ |
534 |
doc/design-shared-storage.rst \ |
535 |
doc/design-monitoring-agent.rst \ |
536 |
doc/design-virtual-clusters.rst \ |
537 |
doc/design-x509-ca.rst \ |
538 |
doc/design-hroller.rst \ |
539 |
doc/design-storagetypes.rst \ |
540 |
doc/design-upgrade.rst \ |
541 |
doc/design-hsqueeze.rst \ |
542 |
doc/devnotes.rst \ |
543 |
doc/glossary.rst \ |
544 |
doc/hooks.rst \ |
545 |
doc/iallocator.rst \ |
546 |
doc/index.rst \ |
547 |
doc/install-quick.rst \ |
548 |
doc/install.rst \ |
549 |
doc/locking.rst \ |
550 |
doc/manpages-disabled.rst \ |
551 |
doc/monitoring-query-format.rst \ |
552 |
doc/move-instance.rst \ |
553 |
doc/news.rst \ |
554 |
doc/ovfconverter.rst \ |
555 |
doc/rapi.rst \ |
556 |
doc/security.rst \ |
557 |
doc/upgrade.rst \ |
558 |
doc/virtual-cluster.rst \ |
559 |
doc/walkthrough.rst |
560 |
|
561 |
# Generates file names such as "doc/man-gnt-instance.rst" |
562 |
mandocrst = $(addprefix doc/man-,$(notdir $(manrst))) |
563 |
|
564 |
# Haskell programs to be installed in $PREFIX/bin |
565 |
HS_BIN_PROGS=src/htools |
566 |
|
567 |
# Haskell programs to be installed in the MYEXECLIB dir |
568 |
if ENABLE_MOND |
569 |
HS_MYEXECLIB_PROGS=src/mon-collector |
570 |
else |
571 |
HS_MYEXECLIB_PROGS= |
572 |
endif |
573 |
|
574 |
# Haskell programs to be compiled by "make really-all" |
575 |
HS_COMPILE_PROGS= \ |
576 |
src/ganeti-mond \ |
577 |
src/hconfd \ |
578 |
src/hluxid \ |
579 |
src/hs2py \ |
580 |
src/rpc-test |
581 |
|
582 |
# All Haskell non-test programs to be compiled but not automatically installed |
583 |
HS_PROGS = $(HS_BIN_PROGS) $(HS_MYEXECLIB_PROGS) |
584 |
|
585 |
HS_BIN_ROLES = harep hbal hscan hspace hinfo hcheck hroller |
586 |
HS_HTOOLS_PROGS = $(HS_BIN_ROLES) hail |
587 |
|
588 |
# Haskell programs that cannot be disabled at configure (e.g., unlike |
589 |
# 'mon-collector') |
590 |
HS_DEFAULT_PROGS = \ |
591 |
$(HS_BIN_PROGS) \ |
592 |
test/hs/hpc-htools \ |
593 |
test/hs/hpc-mon-collector \ |
594 |
test/hs/htest \ |
595 |
$(HS_COMPILE_PROGS) |
596 |
|
597 |
HS_ALL_PROGS = $(HS_DEFAULT_PROGS) $(HS_MYEXECLIB_PROGS) |
598 |
|
599 |
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_DEFAULT_PROGS)) \ |
600 |
src/mon-collector.hs \ |
601 |
src/hs2py-constants.hs |
602 |
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=test/hs/%) test/hs/hail |
603 |
|
604 |
HFLAGS = \ |
605 |
-O -Wall -Werror -isrc \ |
606 |
-fwarn-monomorphism-restriction \ |
607 |
-fwarn-tabs \ |
608 |
$(GHC_BYVERSION_FLAGS) |
609 |
|
610 |
# extra flags that can be overriden on the command line (e.g. -Wwarn, etc.) |
611 |
HEXTRA = |
612 |
# internal extra flags (used for test/hs/htest mainly) |
613 |
HEXTRA_INT = |
614 |
# exclude options for coverage reports |
615 |
HPCEXCL = --exclude Main \ |
616 |
--exclude Ganeti.Constants \ |
617 |
--exclude Ganeti.HTools.QC \ |
618 |
--exclude Ganeti.THH \ |
619 |
--exclude Ganeti.Version \ |
620 |
--exclude Test.Ganeti.Attoparsec \ |
621 |
--exclude Test.Ganeti.TestCommon \ |
622 |
--exclude Test.Ganeti.TestHTools \ |
623 |
--exclude Test.Ganeti.TestHelper \ |
624 |
--exclude Test.Ganeti.TestImports \ |
625 |
$(patsubst src.%,--exclude Test.%,$(subst /,.,$(patsubst %.hs,%, $(HS_LIB_SRCS)))) |
626 |
|
627 |
HS_LIB_SRCS = \ |
628 |
src/Ganeti/BasicTypes.hs \ |
629 |
src/Ganeti/Common.hs \ |
630 |
src/Ganeti/Compat.hs \ |
631 |
src/Ganeti/Confd/Client.hs \ |
632 |
src/Ganeti/Confd/ClientFunctions.hs \ |
633 |
src/Ganeti/Confd/Server.hs \ |
634 |
src/Ganeti/Confd/Types.hs \ |
635 |
src/Ganeti/Confd/Utils.hs \ |
636 |
src/Ganeti/Config.hs \ |
637 |
src/Ganeti/ConfigReader.hs \ |
638 |
src/Ganeti/Constants.hs \ |
639 |
src/Ganeti/ConstantUtils.hs \ |
640 |
src/Ganeti/Cpu/LoadParser.hs \ |
641 |
src/Ganeti/Cpu/Types.hs \ |
642 |
src/Ganeti/Curl/Multi.hs \ |
643 |
src/Ganeti/Daemon.hs \ |
644 |
src/Ganeti/DataCollectors/CLI.hs \ |
645 |
src/Ganeti/DataCollectors/CPUload.hs \ |
646 |
src/Ganeti/DataCollectors/Diskstats.hs \ |
647 |
src/Ganeti/DataCollectors/Drbd.hs \ |
648 |
src/Ganeti/DataCollectors/InstStatus.hs \ |
649 |
src/Ganeti/DataCollectors/InstStatusTypes.hs \ |
650 |
src/Ganeti/DataCollectors/Lv.hs \ |
651 |
src/Ganeti/DataCollectors/Program.hs \ |
652 |
src/Ganeti/DataCollectors/Types.hs \ |
653 |
src/Ganeti/Errors.hs \ |
654 |
src/Ganeti/HTools/Backend/IAlloc.hs \ |
655 |
src/Ganeti/HTools/Backend/Luxi.hs \ |
656 |
src/Ganeti/HTools/Backend/Rapi.hs \ |
657 |
src/Ganeti/HTools/Backend/Simu.hs \ |
658 |
src/Ganeti/HTools/Backend/Text.hs \ |
659 |
src/Ganeti/HTools/CLI.hs \ |
660 |
src/Ganeti/HTools/Cluster.hs \ |
661 |
src/Ganeti/HTools/Container.hs \ |
662 |
src/Ganeti/HTools/ExtLoader.hs \ |
663 |
src/Ganeti/HTools/Graph.hs \ |
664 |
src/Ganeti/HTools/Group.hs \ |
665 |
src/Ganeti/HTools/Instance.hs \ |
666 |
src/Ganeti/HTools/Loader.hs \ |
667 |
src/Ganeti/HTools/Nic.hs \ |
668 |
src/Ganeti/HTools/Node.hs \ |
669 |
src/Ganeti/HTools/PeerMap.hs \ |
670 |
src/Ganeti/HTools/Program/Hail.hs \ |
671 |
src/Ganeti/HTools/Program/Harep.hs \ |
672 |
src/Ganeti/HTools/Program/Hbal.hs \ |
673 |
src/Ganeti/HTools/Program/Hcheck.hs \ |
674 |
src/Ganeti/HTools/Program/Hinfo.hs \ |
675 |
src/Ganeti/HTools/Program/Hscan.hs \ |
676 |
src/Ganeti/HTools/Program/Hspace.hs \ |
677 |
src/Ganeti/HTools/Program/Hroller.hs \ |
678 |
src/Ganeti/HTools/Program/Main.hs \ |
679 |
src/Ganeti/HTools/Types.hs \ |
680 |
src/Ganeti/Hypervisor/Xen.hs \ |
681 |
src/Ganeti/Hypervisor/Xen/XmParser.hs \ |
682 |
src/Ganeti/Hypervisor/Xen/Types.hs \ |
683 |
src/Ganeti/Hash.hs \ |
684 |
src/Ganeti/Hs2Py/GenConstants.hs \ |
685 |
src/Ganeti/Hs2Py/GenOpCodes.hs \ |
686 |
src/Ganeti/Hs2Py/OpDoc.hs \ |
687 |
src/Ganeti/HsConstants.hs \ |
688 |
src/Ganeti/JQueue.hs \ |
689 |
src/Ganeti/JSON.hs \ |
690 |
src/Ganeti/Jobs.hs \ |
691 |
src/Ganeti/Logging.hs \ |
692 |
src/Ganeti/Luxi.hs \ |
693 |
src/Ganeti/Monitoring/Server.hs \ |
694 |
src/Ganeti/Network.hs \ |
695 |
src/Ganeti/Objects.hs \ |
696 |
src/Ganeti/OpCodes.hs \ |
697 |
src/Ganeti/OpParams.hs \ |
698 |
src/Ganeti/Path.hs \ |
699 |
src/Ganeti/Parsers.hs \ |
700 |
src/Ganeti/PyValueInstances.hs \ |
701 |
src/Ganeti/Query/Cluster.hs \ |
702 |
src/Ganeti/Query/Common.hs \ |
703 |
src/Ganeti/Query/Export.hs \ |
704 |
src/Ganeti/Query/Filter.hs \ |
705 |
src/Ganeti/Query/Group.hs \ |
706 |
src/Ganeti/Query/Job.hs \ |
707 |
src/Ganeti/Query/Language.hs \ |
708 |
src/Ganeti/Query/Network.hs \ |
709 |
src/Ganeti/Query/Node.hs \ |
710 |
src/Ganeti/Query/Query.hs \ |
711 |
src/Ganeti/Query/Server.hs \ |
712 |
src/Ganeti/Query/Types.hs \ |
713 |
src/Ganeti/Rpc.hs \ |
714 |
src/Ganeti/Runtime.hs \ |
715 |
src/Ganeti/Ssconf.hs \ |
716 |
src/Ganeti/Storage/Diskstats/Parser.hs \ |
717 |
src/Ganeti/Storage/Diskstats/Types.hs \ |
718 |
src/Ganeti/Storage/Drbd/Parser.hs \ |
719 |
src/Ganeti/Storage/Drbd/Types.hs \ |
720 |
src/Ganeti/Storage/Lvm/LVParser.hs \ |
721 |
src/Ganeti/Storage/Lvm/Types.hs \ |
722 |
src/Ganeti/Storage/Utils.hs \ |
723 |
src/Ganeti/THH.hs \ |
724 |
src/Ganeti/Types.hs \ |
725 |
src/Ganeti/Utils.hs |
726 |
|
727 |
HS_TEST_SRCS = \ |
728 |
test/hs/Test/AutoConf.hs \ |
729 |
test/hs/Test/Ganeti/Attoparsec.hs \ |
730 |
test/hs/Test/Ganeti/BasicTypes.hs \ |
731 |
test/hs/Test/Ganeti/Common.hs \ |
732 |
test/hs/Test/Ganeti/Confd/Types.hs \ |
733 |
test/hs/Test/Ganeti/Confd/Utils.hs \ |
734 |
test/hs/Test/Ganeti/Constants.hs \ |
735 |
test/hs/Test/Ganeti/Daemon.hs \ |
736 |
test/hs/Test/Ganeti/Errors.hs \ |
737 |
test/hs/Test/Ganeti/HTools/Backend/Simu.hs \ |
738 |
test/hs/Test/Ganeti/HTools/Backend/Text.hs \ |
739 |
test/hs/Test/Ganeti/HTools/CLI.hs \ |
740 |
test/hs/Test/Ganeti/HTools/Cluster.hs \ |
741 |
test/hs/Test/Ganeti/HTools/Container.hs \ |
742 |
test/hs/Test/Ganeti/HTools/ExtLoader.hs \ |
743 |
test/hs/Test/Ganeti/HTools/Graph.hs \ |
744 |
test/hs/Test/Ganeti/HTools/Instance.hs \ |
745 |
test/hs/Test/Ganeti/HTools/Loader.hs \ |
746 |
test/hs/Test/Ganeti/HTools/Node.hs \ |
747 |
test/hs/Test/Ganeti/HTools/PeerMap.hs \ |
748 |
test/hs/Test/Ganeti/HTools/Types.hs \ |
749 |
test/hs/Test/Ganeti/Hypervisor/Xen/XmParser.hs \ |
750 |
test/hs/Test/Ganeti/JSON.hs \ |
751 |
test/hs/Test/Ganeti/Jobs.hs \ |
752 |
test/hs/Test/Ganeti/JQueue.hs \ |
753 |
test/hs/Test/Ganeti/Luxi.hs \ |
754 |
test/hs/Test/Ganeti/Network.hs \ |
755 |
test/hs/Test/Ganeti/Objects.hs \ |
756 |
test/hs/Test/Ganeti/OpCodes.hs \ |
757 |
test/hs/Test/Ganeti/Query/Filter.hs \ |
758 |
test/hs/Test/Ganeti/Query/Language.hs \ |
759 |
test/hs/Test/Ganeti/Query/Network.hs \ |
760 |
test/hs/Test/Ganeti/Query/Query.hs \ |
761 |
test/hs/Test/Ganeti/Rpc.hs \ |
762 |
test/hs/Test/Ganeti/Runtime.hs \ |
763 |
test/hs/Test/Ganeti/Ssconf.hs \ |
764 |
test/hs/Test/Ganeti/Storage/Diskstats/Parser.hs \ |
765 |
test/hs/Test/Ganeti/Storage/Drbd/Parser.hs \ |
766 |
test/hs/Test/Ganeti/Storage/Drbd/Types.hs \ |
767 |
test/hs/Test/Ganeti/Storage/Lvm/LVParser.hs \ |
768 |
test/hs/Test/Ganeti/THH.hs \ |
769 |
test/hs/Test/Ganeti/TestCommon.hs \ |
770 |
test/hs/Test/Ganeti/TestHTools.hs \ |
771 |
test/hs/Test/Ganeti/TestHelper.hs \ |
772 |
test/hs/Test/Ganeti/Types.hs \ |
773 |
test/hs/Test/Ganeti/Utils.hs |
774 |
|
775 |
HS_LIBTEST_SRCS = $(HS_LIB_SRCS) $(HS_TEST_SRCS) |
776 |
|
777 |
HS_BUILT_SRCS = \ |
778 |
test/hs/Test/Ganeti/TestImports.hs \ |
779 |
src/AutoConf.hs \ |
780 |
src/Ganeti/Hs2Py/ListConstants.hs \ |
781 |
src/Ganeti/PyConstants.hs \ |
782 |
src/Ganeti/Curl/Internal.hs \ |
783 |
src/Ganeti/Version.hs |
784 |
HS_BUILT_SRCS_IN = \ |
785 |
$(patsubst %,%.in,$(filter-out src/Ganeti/Curl/Internal.hs,$(HS_BUILT_SRCS))) \ |
786 |
src/Ganeti/Curl/Internal.hsc \ |
787 |
lib/_constants.py.in \ |
788 |
lib/opcodes.py.in_after \ |
789 |
lib/opcodes.py.in_before |
790 |
|
791 |
HS_LIBTESTBUILT_SRCS = $(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS) |
792 |
|
793 |
$(RUN_IN_TEMPDIR): | stamp-directories |
794 |
|
795 |
doc/html/index.html: ENABLE_MANPAGES = |
796 |
doc/man-html/index.html: ENABLE_MANPAGES = 1 |
797 |
doc/man-html/index.html: doc/manpages-enabled.rst $(mandocrst) |
798 |
|
799 |
# Note: we use here an order-only prerequisite, as the contents of |
800 |
# _constants.py are not actually influencing the html build output: it |
801 |
# has to exist in order for the sphinx module to be loaded |
802 |
# successfully, but we certainly don't want the docs to be rebuilt if |
803 |
# it changes |
804 |
doc/html/index.html doc/man-html/index.html: $(docinput) doc/conf.py \ |
805 |
configure.ac $(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py \ |
806 |
lib/build/shell_example_lexer.py lib/ht.py \ |
807 |
doc/css/style.css lib/rapi/connector.py lib/rapi/rlib2.py \ |
808 |
autotools/sphinx-wrapper | $(BUILT_PYTHON_SOURCES) |
809 |
@test -n "$(SPHINX)" || \ |
810 |
{ echo 'sphinx-build' not found during configure; exit 1; } |
811 |
if !MANPAGES_IN_DOC |
812 |
if test -n '$(ENABLE_MANPAGES)'; then \ |
813 |
echo 'Man pages in documentation were disabled at configure time' >&2; \ |
814 |
exit 1; \ |
815 |
fi |
816 |
endif |
817 |
## Sphinx provides little control over what content should be included. Some |
818 |
## mechanisms exist, but they all have drawbacks or actual issues. Since we |
819 |
## build two different versions of the documentation--once without man pages and |
820 |
## once, if enabled, with them--some control is necessary. xmpp-wrapper provides |
821 |
## us with this, but requires running in a temporary directory. It moves the |
822 |
## correct files into place depending on environment variables. |
823 |
dir=$(dir $@) && \ |
824 |
@mkdir_p@ $$dir && \ |
825 |
PYTHONPATH=. ENABLE_MANPAGES=$(ENABLE_MANPAGES) COPY_DOC=1 \ |
826 |
$(RUN_IN_TEMPDIR) autotools/sphinx-wrapper $(SPHINX) -q -W -b html \ |
827 |
-d . \ |
828 |
-D version="$(VERSION_MAJOR).$(VERSION_MINOR)" \ |
829 |
-D release="$(PACKAGE_VERSION)" \ |
830 |
-D graphviz_dot="$(DOT)" \ |
831 |
-D enable_manpages="$(ENABLE_MANPAGES)" \ |
832 |
doc $(CURDIR)/$$dir && \ |
833 |
rm -f $$dir/.buildinfo $$dir/objects.inv |
834 |
touch $@ |
835 |
|
836 |
doc/html: doc/html/index.html |
837 |
|
838 |
doc/man-html: doc/man-html/index.html |
839 |
|
840 |
doc/install-quick.rst: INSTALL |
841 |
doc/news.rst: NEWS |
842 |
doc/upgrade.rst: UPGRADE |
843 |
|
844 |
doc/install-quick.rst doc/news.rst doc/upgrade.rst: |
845 |
set -e; \ |
846 |
{ echo '.. This file is automatically updated at build time from $<.'; \ |
847 |
echo '.. Do not edit.'; \ |
848 |
echo; \ |
849 |
cat $<; \ |
850 |
} > $@ |
851 |
|
852 |
doc/manpages-enabled.rst: Makefile | $(built_base_sources) |
853 |
{ echo '.. This file is automatically generated, do not edit!'; \ |
854 |
echo ''; \ |
855 |
echo 'Man pages'; \ |
856 |
echo '========='; \ |
857 |
echo; \ |
858 |
echo '.. toctree::'; \ |
859 |
echo ' :maxdepth: 1'; \ |
860 |
echo; \ |
861 |
for i in $(notdir $(mandocrst)); do \ |
862 |
echo " $$i"; \ |
863 |
done | LC_ALL=C sort; \ |
864 |
} > $@ |
865 |
|
866 |
doc/man-%.rst: man/%.gen Makefile $(REPLACE_VARS_SED) | $(built_base_sources) |
867 |
if MANPAGES_IN_DOC |
868 |
{ echo '.. This file is automatically updated at build time from $<.'; \ |
869 |
echo '.. Do not edit.'; \ |
870 |
echo; \ |
871 |
echo "$*"; \ |
872 |
echo '=========================================='; \ |
873 |
tail -n +3 $< | sed -f $(REPLACE_VARS_SED); \ |
874 |
} > $@ |
875 |
else |
876 |
echo 'Man pages in documentation were disabled at configure time' >&2; \ |
877 |
exit 1; |
878 |
endif |
879 |
|
880 |
doc/users/%: doc/users/%.in Makefile $(REPLACE_VARS_SED) |
881 |
cat $< | sed -f $(REPLACE_VARS_SED) | LC_ALL=C sort | uniq | (grep -v '^root' || true) > $@ |
882 |
|
883 |
userspecs = \ |
884 |
doc/users/users \ |
885 |
doc/users/groups \ |
886 |
doc/users/groupmemberships |
887 |
|
888 |
# Things to build but not to install (add it to EXTRA_DIST if it should be |
889 |
# distributed) |
890 |
noinst_DATA = \ |
891 |
$(BUILT_EXAMPLES) \ |
892 |
doc/examples/bash_completion \ |
893 |
doc/examples/bash_completion-debug \ |
894 |
$(userspecs) \ |
895 |
$(manhtml) |
896 |
|
897 |
if HAS_SPHINX |
898 |
if MANPAGES_IN_DOC |
899 |
noinst_DATA += doc/man-html |
900 |
else |
901 |
noinst_DATA += doc/html |
902 |
endif |
903 |
endif |
904 |
|
905 |
gnt_scripts = \ |
906 |
scripts/gnt-backup \ |
907 |
scripts/gnt-cluster \ |
908 |
scripts/gnt-debug \ |
909 |
scripts/gnt-group \ |
910 |
scripts/gnt-instance \ |
911 |
scripts/gnt-job \ |
912 |
scripts/gnt-network \ |
913 |
scripts/gnt-node \ |
914 |
scripts/gnt-os \ |
915 |
scripts/gnt-storage |
916 |
|
917 |
gnt_scripts_basenames = \ |
918 |
$(patsubst scripts/%,%,$(patsubst daemons/%,%,$(gnt_scripts) $(gnt_python_sbin_SCRIPTS))) |
919 |
|
920 |
gnt_python_sbin_SCRIPTS = \ |
921 |
$(PYTHON_BOOTSTRAP_SBIN) |
922 |
|
923 |
gntpython_SCRIPTS = $(gnt_scripts) |
924 |
|
925 |
PYTHON_BOOTSTRAP_SBIN = \ |
926 |
daemons/ganeti-masterd \ |
927 |
daemons/ganeti-noded \ |
928 |
daemons/ganeti-rapi \ |
929 |
daemons/ganeti-watcher |
930 |
|
931 |
PYTHON_BOOTSTRAP = \ |
932 |
tools/burnin \ |
933 |
tools/ensure-dirs \ |
934 |
tools/node-cleanup \ |
935 |
tools/node-daemon-setup \ |
936 |
tools/prepare-node-join |
937 |
|
938 |
qa_scripts = \ |
939 |
qa/__init__.py \ |
940 |
qa/ganeti-qa.py \ |
941 |
qa/qa_cluster.py \ |
942 |
qa/qa_config.py \ |
943 |
qa/qa_daemon.py \ |
944 |
qa/qa_env.py \ |
945 |
qa/qa_error.py \ |
946 |
qa/qa_group.py \ |
947 |
qa/qa_instance.py \ |
948 |
qa/qa_instance_utils.py \ |
949 |
qa/qa_job.py \ |
950 |
qa/qa_monitoring.py \ |
951 |
qa/qa_node.py \ |
952 |
qa/qa_os.py \ |
953 |
qa/qa_rapi.py \ |
954 |
qa/qa_tags.py \ |
955 |
qa/qa_utils.py |
956 |
|
957 |
bin_SCRIPTS = |
958 |
if WANT_HTOOLS |
959 |
bin_SCRIPTS += $(HS_BIN_PROGS) |
960 |
install-exec-hook: |
961 |
@mkdir_p@ $(DESTDIR)$(iallocatorsdir) |
962 |
# FIXME: this is a hardcoded logic, instead of auto-resolving |
963 |
$(LN_S) -f ../../../bin/htools \ |
964 |
$(DESTDIR)$(iallocatorsdir)/hail |
965 |
for role in $(HS_BIN_ROLES); do \ |
966 |
$(LN_S) -f htools $(DESTDIR)$(bindir)/$$role ; \ |
967 |
done |
968 |
endif |
969 |
|
970 |
# This target cannot be merged with the '$(HS_ALL_PROGS)' target |
971 |
# because 'hs2py-constants' cannot depend on 'Ganeti.Constants'. And |
972 |
# the reason for this is because 'hs2py-constants' needs to generate |
973 |
# Python code, and 'Ganeti.Constants' is generated by Python. |
974 |
src/hs2py-constants: src/hs2py-constants.hs src/AutoConf.hs \ |
975 |
src/Ganeti/BasicTypes.hs src/Ganeti/ConstantUtils.hs \ |
976 |
src/Ganeti/JSON.hs src/Ganeti/THH.hs \ |
977 |
src/Ganeti/Hs2Py/GenConstants.hs \ |
978 |
src/Ganeti/Hs2Py/ListConstants.hs \ |
979 |
src/Ganeti/HsConstants.hs \ |
980 |
src/Ganeti/PyValueInstances.hs \ |
981 |
| stamp-srclinks |
982 |
$(GHC) --make \ |
983 |
$(HFLAGS) \ |
984 |
-osuf $(notdir $@).o -hisuf $(notdir $@).hi \ |
985 |
$(HEXTRA) $(HEXTRA_INT) src/hs2py-constants.hs |
986 |
|
987 |
$(HS_ALL_PROGS): %: %.hs $(HS_LIBTESTBUILT_SRCS) Makefile |
988 |
@if [ "$(notdir $@)" = "test" ] && [ "$(HS_NODEV)" ]; then \ |
989 |
echo "Error: cannot run unittests without the development" \ |
990 |
" libraries (see devnotes.rst)" 1>&2; \ |
991 |
exit 1; \ |
992 |
fi |
993 |
@rm -f $(notdir $@).tix |
994 |
$(GHC) --make \ |
995 |
$(HFLAGS) \ |
996 |
$(HS_PARALLEL3) $(HS_REGEX_PCRE) \ |
997 |
-osuf $(notdir $@).o -hisuf $(notdir $@).hi \ |
998 |
$(HEXTRA) $(HEXTRA_INT) $@ |
999 |
@touch "$@" |
1000 |
|
1001 |
# for the test/hs/htest binary, we need to enable profiling/coverage |
1002 |
test/hs/htest: HEXTRA_INT=-fhpc -itest/hs |
1003 |
|
1004 |
# we compile the hpc-htools binary with the program coverage |
1005 |
test/hs/hpc-htools: HEXTRA_INT=-fhpc |
1006 |
|
1007 |
# we compile the hpc-mon-collector binary with the program coverage |
1008 |
test/hs/hpc-mon-collector: HEXTRA_INT=-fhpc |
1009 |
|
1010 |
# test dependency |
1011 |
test/hs/offline-test.sh: test/hs/hpc-htools test/hs/hpc-mon-collector |
1012 |
|
1013 |
# rules for building profiling-enabled versions of the haskell |
1014 |
# programs: hs-prof does the full two-step build, whereas |
1015 |
# hs-prof-quick does only the final rebuild (hs-prof must have been |
1016 |
# run before) |
1017 |
.PHONY: hs-prof hs-prof-quick |
1018 |
hs-prof: |
1019 |
@if [ -z "$(TARGET)" ]; then \ |
1020 |
echo "You need to define TARGET when running this rule" 1>&2; \ |
1021 |
exit 1; \ |
1022 |
fi |
1023 |
$(MAKE) $(AM_MAKEFLAGS) clean |
1024 |
$(MAKE) $(AM_MAKEFLAGS) $(TARGET) HEXTRA="-osuf o" |
1025 |
rm -f $(HS_ALL_PROGS) |
1026 |
$(MAKE) $(AM_MAKEFLAGS) hs-prof-quick |
1027 |
|
1028 |
hs-prof-quick: |
1029 |
@if [ -z "$(TARGET)" ]; then \ |
1030 |
echo "You need to define TARGET when running this rule" 1>&2; \ |
1031 |
exit 1; \ |
1032 |
fi |
1033 |
$(MAKE) $(AM_MAKEFLAGS) $(TARGET) HEXTRA="-osuf prof_o -prof -auto-all" |
1034 |
|
1035 |
dist_sbin_SCRIPTS = \ |
1036 |
tools/ganeti-listrunner |
1037 |
|
1038 |
nodist_sbin_SCRIPTS = \ |
1039 |
daemons/ganeti-cleaner |
1040 |
|
1041 |
# strip path prefixes off the sbin scripts |
1042 |
all_sbin_scripts = \ |
1043 |
$(patsubst tools/%,%,$(patsubst daemons/%,%,$(patsubst scripts/%,%,\ |
1044 |
$(patsubst src/%,%,$(dist_sbin_SCRIPTS) $(nodist_sbin_SCRIPTS))))) |
1045 |
|
1046 |
if ENABLE_CONFD |
1047 |
src/ganeti-confd: src/hconfd |
1048 |
cp -f $< $@ |
1049 |
|
1050 |
src/ganeti-luxid: src/hluxid |
1051 |
cp -f $< $@ |
1052 |
|
1053 |
nodist_sbin_SCRIPTS += src/ganeti-confd |
1054 |
nodist_sbin_SCRIPTS += src/ganeti-luxid |
1055 |
endif |
1056 |
|
1057 |
if ENABLE_MOND |
1058 |
nodist_sbin_SCRIPTS += src/ganeti-mond |
1059 |
endif |
1060 |
|
1061 |
python_scripts = \ |
1062 |
tools/cfgshell \ |
1063 |
tools/cfgupgrade \ |
1064 |
tools/cfgupgrade12 \ |
1065 |
tools/cluster-merge \ |
1066 |
tools/confd-client \ |
1067 |
tools/fmtjson \ |
1068 |
tools/lvmstrap \ |
1069 |
tools/move-instance \ |
1070 |
tools/ovfconverter \ |
1071 |
tools/sanitize-config |
1072 |
|
1073 |
dist_tools_SCRIPTS = \ |
1074 |
tools/kvm-console-wrapper \ |
1075 |
tools/master-ip-setup \ |
1076 |
tools/xen-console-wrapper |
1077 |
|
1078 |
dist_tools_python_SCRIPTS = \ |
1079 |
$(python_scripts) \ |
1080 |
tools/burnin |
1081 |
|
1082 |
nodist_tools_python_SCRIPTS = \ |
1083 |
tools/node-cleanup |
1084 |
|
1085 |
tools_python_basenames = $(patsubst tools/%,%,\ |
1086 |
$(dist_tools_python_SCRIPTS) $(nodist_tools_python_SCRIPTS)) |
1087 |
|
1088 |
nodist_tools_SCRIPTS = \ |
1089 |
tools/users-setup \ |
1090 |
tools/vcluster-setup |
1091 |
|
1092 |
tools_basenames = $(patsubst tools/%,%,$(nodist_tools_SCRIPTS) $(dist_tools_SCRIPTS)) |
1093 |
|
1094 |
pkglib_python_scripts = \ |
1095 |
daemons/import-export \ |
1096 |
tools/check-cert-expired |
1097 |
|
1098 |
nodist_pkglib_python_scripts = \ |
1099 |
tools/ensure-dirs \ |
1100 |
tools/node-daemon-setup \ |
1101 |
tools/prepare-node-join |
1102 |
|
1103 |
pkglib_python_basenames = \ |
1104 |
$(patsubst daemons/%,%,$(patsubst tools/%,%,\ |
1105 |
$(pkglib_python_scripts) $(nodist_pkglib_python_scripts))) |
1106 |
|
1107 |
myexeclib_SCRIPTS = \ |
1108 |
daemons/daemon-util \ |
1109 |
tools/kvm-ifup \ |
1110 |
tools/vif-ganeti \ |
1111 |
tools/net-common \ |
1112 |
$(HS_MYEXECLIB_PROGS) |
1113 |
|
1114 |
# compute the basenames of the myexeclib_scripts |
1115 |
myexeclib_scripts_basenames = \ |
1116 |
$(patsubst tools/%,%,$(patsubst daemons/%,%,$(patsubst src/%,%,$(myexeclib_SCRIPTS)))) |
1117 |
|
1118 |
EXTRA_DIST = \ |
1119 |
NEWS \ |
1120 |
UPGRADE \ |
1121 |
epydoc.conf.in \ |
1122 |
pylintrc \ |
1123 |
pylintrc-test \ |
1124 |
autotools/build-bash-completion \ |
1125 |
autotools/build-rpc \ |
1126 |
autotools/check-header \ |
1127 |
autotools/check-imports \ |
1128 |
autotools/check-man-dashes \ |
1129 |
autotools/check-man-references \ |
1130 |
autotools/check-man-warnings \ |
1131 |
autotools/check-news \ |
1132 |
autotools/check-python-code \ |
1133 |
autotools/check-tar \ |
1134 |
autotools/check-version \ |
1135 |
autotools/convert-constants \ |
1136 |
autotools/docpp \ |
1137 |
autotools/gen-py-coverage \ |
1138 |
autotools/sphinx-wrapper \ |
1139 |
autotools/testrunner \ |
1140 |
autotools/wrong-hardcoded-paths \ |
1141 |
$(RUN_IN_TEMPDIR) \ |
1142 |
daemons/daemon-util.in \ |
1143 |
daemons/ganeti-cleaner.in \ |
1144 |
$(pkglib_python_scripts) \ |
1145 |
devel/upload \ |
1146 |
devel/webserver \ |
1147 |
tools/kvm-ifup.in \ |
1148 |
tools/vif-ganeti.in \ |
1149 |
tools/net-common.in \ |
1150 |
tools/vcluster-setup.in \ |
1151 |
$(docinput) \ |
1152 |
doc/html \ |
1153 |
$(BUILT_EXAMPLES:%=%.in) \ |
1154 |
doc/examples/ganeti.default \ |
1155 |
doc/examples/ganeti.default-debug \ |
1156 |
doc/examples/hooks/ethers \ |
1157 |
doc/examples/gnt-debug/README \ |
1158 |
doc/examples/gnt-debug/delay0.json \ |
1159 |
doc/examples/gnt-debug/delay50.json \ |
1160 |
doc/users/groupmemberships.in \ |
1161 |
doc/users/groups.in \ |
1162 |
doc/users/users.in \ |
1163 |
$(dist_TESTS) \ |
1164 |
$(TEST_FILES) \ |
1165 |
$(python_test_support) \ |
1166 |
man/footer.rst \ |
1167 |
$(manrst) \ |
1168 |
$(maninput) \ |
1169 |
qa/qa-sample.json \ |
1170 |
$(qa_scripts) \ |
1171 |
$(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS_IN) \ |
1172 |
$(HS_PROG_SRCS) \ |
1173 |
src/lint-hints.hs \ |
1174 |
test/hs/cli-tests-defs.sh \ |
1175 |
test/hs/offline-test.sh \ |
1176 |
.ghci |
1177 |
|
1178 |
man_MANS = \ |
1179 |
man/ganeti-cleaner.8 \ |
1180 |
man/ganeti-confd.8 \ |
1181 |
man/ganeti-luxid.8 \ |
1182 |
man/ganeti-listrunner.8 \ |
1183 |
man/ganeti-masterd.8 \ |
1184 |
man/ganeti-mond.8 \ |
1185 |
man/ganeti-noded.8 \ |
1186 |
man/ganeti-os-interface.7 \ |
1187 |
man/ganeti-extstorage-interface.7 \ |
1188 |
man/ganeti-rapi.8 \ |
1189 |
man/ganeti-watcher.8 \ |
1190 |
man/ganeti.7 \ |
1191 |
man/gnt-backup.8 \ |
1192 |
man/gnt-cluster.8 \ |
1193 |
man/gnt-debug.8 \ |
1194 |
man/gnt-group.8 \ |
1195 |
man/gnt-network.8 \ |
1196 |
man/gnt-instance.8 \ |
1197 |
man/gnt-job.8 \ |
1198 |
man/gnt-node.8 \ |
1199 |
man/gnt-os.8 \ |
1200 |
man/gnt-storage.8 \ |
1201 |
man/hail.1 \ |
1202 |
man/harep.1 \ |
1203 |
man/hbal.1 \ |
1204 |
man/hcheck.1 \ |
1205 |
man/hinfo.1 \ |
1206 |
man/hscan.1 \ |
1207 |
man/hspace.1 \ |
1208 |
man/hroller.1 \ |
1209 |
man/htools.1 \ |
1210 |
man/mon-collector.7 |
1211 |
|
1212 |
# Remove extensions from all filenames in man_MANS |
1213 |
mannoext = $(patsubst %.1,%,$(patsubst %.7,%,$(patsubst %.8,%,$(man_MANS)))) |
1214 |
|
1215 |
manrst = $(patsubst %,%.rst,$(mannoext)) |
1216 |
manhtml = $(patsubst %.rst,%.html,$(manrst)) |
1217 |
mangen = $(patsubst %.rst,%.gen,$(manrst)) |
1218 |
maninput = \ |
1219 |
$(patsubst %.1,%.1.in,$(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS)))) \ |
1220 |
$(patsubst %.html,%.html.in,$(manhtml)) \ |
1221 |
$(mangen) |
1222 |
|
1223 |
manfullpath = $(patsubst man/%.1,man1/%.1,\ |
1224 |
$(patsubst man/%.7,man7/%.7,\ |
1225 |
$(patsubst man/%.8,man8/%.8,$(man_MANS)))) |
1226 |
|
1227 |
TEST_FILES = \ |
1228 |
test/autotools/autotools-check-news.test \ |
1229 |
test/data/htools/clean-nonzero-score.data \ |
1230 |
test/data/htools/common-suffix.data \ |
1231 |
test/data/htools/empty-cluster.data \ |
1232 |
test/data/htools/hail-alloc-drbd.json \ |
1233 |
test/data/htools/hail-alloc-invalid-network.json \ |
1234 |
test/data/htools/hail-alloc-invalid-twodisks.json \ |
1235 |
test/data/htools/hail-alloc-restricted-network.json \ |
1236 |
test/data/htools/hail-alloc-spindles.json \ |
1237 |
test/data/htools/hail-alloc-twodisks.json \ |
1238 |
test/data/htools/hail-change-group.json \ |
1239 |
test/data/htools/hail-invalid-reloc.json \ |
1240 |
test/data/htools/hail-node-evac.json \ |
1241 |
test/data/htools/hail-reloc-drbd.json \ |
1242 |
test/data/htools/hbal-dyn.data \ |
1243 |
test/data/htools/hbal-excl-tags.data \ |
1244 |
test/data/htools/hbal-split-insts.data \ |
1245 |
test/data/htools/hspace-tiered-dualspec-exclusive.data \ |
1246 |
test/data/htools/hspace-tiered-dualspec.data \ |
1247 |
test/data/htools/hspace-tiered-exclusive.data \ |
1248 |
test/data/htools/hspace-tiered-ipolicy.data \ |
1249 |
test/data/htools/hspace-tiered-mixed.data \ |
1250 |
test/data/htools/hspace-tiered-resourcetypes.data \ |
1251 |
test/data/htools/hspace-tiered-vcpu.data \ |
1252 |
test/data/htools/hspace-tiered.data \ |
1253 |
test/data/htools/invalid-node.data \ |
1254 |
test/data/htools/missing-resources.data \ |
1255 |
test/data/htools/multiple-master.data \ |
1256 |
test/data/htools/multiple-tags.data \ |
1257 |
test/data/htools/n1-failure.data \ |
1258 |
test/data/htools/rapi/groups.json \ |
1259 |
test/data/htools/rapi/info.json \ |
1260 |
test/data/htools/rapi/instances.json \ |
1261 |
test/data/htools/rapi/nodes.json \ |
1262 |
test/data/htools/hroller-full.data \ |
1263 |
test/data/htools/hroller-nodegroups.data \ |
1264 |
test/data/htools/hroller-nonredundant.data \ |
1265 |
test/data/htools/hroller-online.data \ |
1266 |
test/data/htools/unique-reboot-order.data \ |
1267 |
test/hs/shelltests/htools-balancing.test \ |
1268 |
test/hs/shelltests/htools-basic.test \ |
1269 |
test/hs/shelltests/htools-dynutil.test \ |
1270 |
test/hs/shelltests/htools-excl.test \ |
1271 |
test/hs/shelltests/htools-hail.test \ |
1272 |
test/hs/shelltests/htools-hroller.test \ |
1273 |
test/hs/shelltests/htools-hspace.test \ |
1274 |
test/hs/shelltests/htools-invalid.test \ |
1275 |
test/hs/shelltests/htools-multi-group.test \ |
1276 |
test/hs/shelltests/htools-no-backend.test \ |
1277 |
test/hs/shelltests/htools-rapi.test \ |
1278 |
test/hs/shelltests/htools-single-group.test \ |
1279 |
test/hs/shelltests/htools-text-backend.test \ |
1280 |
test/hs/shelltests/htools-mon-collector.test \ |
1281 |
test/data/bdev-drbd-8.0.txt \ |
1282 |
test/data/bdev-drbd-8.3.txt \ |
1283 |
test/data/bdev-drbd-8.4.txt \ |
1284 |
test/data/bdev-drbd-8.4-no-disk-params.txt \ |
1285 |
test/data/bdev-drbd-disk.txt \ |
1286 |
test/data/bdev-drbd-net-ip4.txt \ |
1287 |
test/data/bdev-drbd-net-ip6.txt \ |
1288 |
test/data/bdev-rbd/json_output_empty.txt \ |
1289 |
test/data/bdev-rbd/json_output_extra_matches.txt \ |
1290 |
test/data/bdev-rbd/json_output_no_matches.txt \ |
1291 |
test/data/bdev-rbd/json_output_ok.txt \ |
1292 |
test/data/bdev-rbd/plain_output_new_extra_matches.txt \ |
1293 |
test/data/bdev-rbd/plain_output_new_no_matches.txt \ |
1294 |
test/data/bdev-rbd/plain_output_new_ok.txt \ |
1295 |
test/data/bdev-rbd/plain_output_old_empty.txt \ |
1296 |
test/data/bdev-rbd/plain_output_old_extra_matches.txt \ |
1297 |
test/data/bdev-rbd/plain_output_old_no_matches.txt \ |
1298 |
test/data/bdev-rbd/plain_output_old_ok.txt \ |
1299 |
test/data/bdev-rbd/output_invalid.txt \ |
1300 |
test/data/cert1.pem \ |
1301 |
test/data/cert2.pem \ |
1302 |
test/data/cluster_config_2.7.json \ |
1303 |
test/data/cluster_config_2.8.json \ |
1304 |
test/data/cluster_config_2.9.json \ |
1305 |
test/data/instance-minor-pairing.txt \ |
1306 |
test/data/instance-prim-sec.txt \ |
1307 |
test/data/ip-addr-show-dummy0.txt \ |
1308 |
test/data/ip-addr-show-lo-ipv4.txt \ |
1309 |
test/data/ip-addr-show-lo-ipv6.txt \ |
1310 |
test/data/ip-addr-show-lo-oneline-ipv4.txt \ |
1311 |
test/data/ip-addr-show-lo-oneline-ipv6.txt \ |
1312 |
test/data/ip-addr-show-lo-oneline.txt \ |
1313 |
test/data/ip-addr-show-lo.txt \ |
1314 |
test/data/kvm_0.12.5_help.txt \ |
1315 |
test/data/kvm_0.15.90_help.txt \ |
1316 |
test/data/kvm_0.9.1_help.txt \ |
1317 |
test/data/kvm_0.9.1_help_boot_test.txt \ |
1318 |
test/data/kvm_1.0_help.txt \ |
1319 |
test/data/kvm_1.1.2_help.txt \ |
1320 |
test/data/lvs_lv.txt \ |
1321 |
test/data/NEWS_OK.txt \ |
1322 |
test/data/NEWS_previous_unreleased.txt \ |
1323 |
test/data/ovfdata/compr_disk.vmdk.gz \ |
1324 |
test/data/ovfdata/config.ini \ |
1325 |
test/data/ovfdata/corrupted_resources.ovf \ |
1326 |
test/data/ovfdata/empty.ini \ |
1327 |
test/data/ovfdata/empty.ovf \ |
1328 |
test/data/ovfdata/ganeti.mf \ |
1329 |
test/data/ovfdata/ganeti.ovf \ |
1330 |
test/data/ovfdata/gzip_disk.ovf \ |
1331 |
test/data/ovfdata/new_disk.vmdk \ |
1332 |
test/data/ovfdata/no_disk.ini \ |
1333 |
test/data/ovfdata/no_disk_in_ref.ovf \ |
1334 |
test/data/ovfdata/no_os.ini \ |
1335 |
test/data/ovfdata/no_ovf.ova \ |
1336 |
test/data/ovfdata/other/rawdisk.raw \ |
1337 |
test/data/ovfdata/ova.ova \ |
1338 |
test/data/ovfdata/rawdisk.raw \ |
1339 |
test/data/ovfdata/second_disk.vmdk \ |
1340 |
test/data/ovfdata/unsafe_path.ini \ |
1341 |
test/data/ovfdata/virtualbox.ovf \ |
1342 |
test/data/ovfdata/wrong_config.ini \ |
1343 |
test/data/ovfdata/wrong_extension.ovd \ |
1344 |
test/data/ovfdata/wrong_manifest.mf \ |
1345 |
test/data/ovfdata/wrong_manifest.ovf \ |
1346 |
test/data/ovfdata/wrong_ova.ova \ |
1347 |
test/data/ovfdata/wrong_xml.ovf \ |
1348 |
test/data/proc_diskstats.txt \ |
1349 |
test/data/proc_drbd8.txt \ |
1350 |
test/data/proc_drbd80-emptyline.txt \ |
1351 |
test/data/proc_drbd80-emptyversion.txt \ |
1352 |
test/data/proc_drbd83.txt \ |
1353 |
test/data/proc_drbd83_sync.txt \ |
1354 |
test/data/proc_drbd83_sync_want.txt \ |
1355 |
test/data/proc_drbd83_sync_krnl2.6.39.txt \ |
1356 |
test/data/proc_drbd84.txt \ |
1357 |
test/data/proc_drbd84_sync.txt \ |
1358 |
test/data/proc_meminfo.txt \ |
1359 |
test/data/proc_cpuinfo.txt \ |
1360 |
test/data/qa-minimal-nodes-instances-only.json \ |
1361 |
test/data/sys_drbd_usermode_helper.txt \ |
1362 |
test/data/vgreduce-removemissing-2.02.02.txt \ |
1363 |
test/data/vgreduce-removemissing-2.02.66-fail.txt \ |
1364 |
test/data/vgreduce-removemissing-2.02.66-ok.txt \ |
1365 |
test/data/vgs-missing-pvs-2.02.02.txt \ |
1366 |
test/data/vgs-missing-pvs-2.02.66.txt \ |
1367 |
test/data/xen-xm-info-4.0.1.txt \ |
1368 |
test/data/xen-xm-list-4.0.1-dom0-only.txt \ |
1369 |
test/data/xen-xm-list-4.0.1-four-instances.txt \ |
1370 |
test/data/xen-xm-list-long-4.0.1.txt \ |
1371 |
test/data/xen-xm-uptime-4.0.1.txt \ |
1372 |
test/py/ganeti-cli.test \ |
1373 |
test/py/gnt-cli.test \ |
1374 |
test/py/import-export_unittest-helper |
1375 |
|
1376 |
|
1377 |
python_tests = \ |
1378 |
doc/examples/rapi_testutils.py \ |
1379 |
test/py/cmdlib/backup_unittest.py \ |
1380 |
test/py/cmdlib/cluster_unittest.py \ |
1381 |
test/py/cmdlib/cmdlib_unittest.py \ |
1382 |
test/py/cmdlib/group_unittest.py \ |
1383 |
test/py/cmdlib/instance_unittest.py \ |
1384 |
test/py/cmdlib/instance_migration_unittest.py \ |
1385 |
test/py/cmdlib/instance_query_unittest.py \ |
1386 |
test/py/cmdlib/instance_storage_unittest.py \ |
1387 |
test/py/cmdlib/node_unittest.py \ |
1388 |
test/py/cmdlib/test_unittest.py \ |
1389 |
test/py/cfgupgrade_unittest.py \ |
1390 |
test/py/docs_unittest.py \ |
1391 |
test/py/ganeti.asyncnotifier_unittest.py \ |
1392 |
test/py/ganeti.backend_unittest-runasroot.py \ |
1393 |
test/py/ganeti.backend_unittest.py \ |
1394 |
test/py/ganeti.bootstrap_unittest.py \ |
1395 |
test/py/ganeti.cli_unittest.py \ |
1396 |
test/py/ganeti.client.gnt_cluster_unittest.py \ |
1397 |
test/py/ganeti.client.gnt_instance_unittest.py \ |
1398 |
test/py/ganeti.client.gnt_job_unittest.py \ |
1399 |
test/py/ganeti.compat_unittest.py \ |
1400 |
test/py/ganeti.confd.client_unittest.py \ |
1401 |
test/py/ganeti.config_unittest.py \ |
1402 |
test/py/ganeti.constants_unittest.py \ |
1403 |
test/py/ganeti.daemon_unittest.py \ |
1404 |
test/py/ganeti.errors_unittest.py \ |
1405 |
test/py/ganeti.hooks_unittest.py \ |
1406 |
test/py/ganeti.ht_unittest.py \ |
1407 |
test/py/ganeti.http_unittest.py \ |
1408 |
test/py/ganeti.hypervisor.hv_chroot_unittest.py \ |
1409 |
test/py/ganeti.hypervisor.hv_fake_unittest.py \ |
1410 |
test/py/ganeti.hypervisor.hv_kvm_unittest.py \ |
1411 |
test/py/ganeti.hypervisor.hv_lxc_unittest.py \ |
1412 |
test/py/ganeti.hypervisor.hv_xen_unittest.py \ |
1413 |
test/py/ganeti.hypervisor_unittest.py \ |
1414 |
test/py/ganeti.impexpd_unittest.py \ |
1415 |
test/py/ganeti.jqueue_unittest.py \ |
1416 |
test/py/ganeti.jstore_unittest.py \ |
1417 |
test/py/ganeti.locking_unittest.py \ |
1418 |
test/py/ganeti.luxi_unittest.py \ |
1419 |
test/py/ganeti.masterd.iallocator_unittest.py \ |
1420 |
test/py/ganeti.masterd.instance_unittest.py \ |
1421 |
test/py/ganeti.mcpu_unittest.py \ |
1422 |
test/py/ganeti.netutils_unittest.py \ |
1423 |
test/py/ganeti.objects_unittest.py \ |
1424 |
test/py/ganeti.opcodes_unittest.py \ |
1425 |
test/py/ganeti.outils_unittest.py \ |
1426 |
test/py/ganeti.ovf_unittest.py \ |
1427 |
test/py/ganeti.qlang_unittest.py \ |
1428 |
test/py/ganeti.query_unittest.py \ |
1429 |
test/py/ganeti.rapi.baserlib_unittest.py \ |
1430 |
test/py/ganeti.rapi.client_unittest.py \ |
1431 |
test/py/ganeti.rapi.resources_unittest.py \ |
1432 |
test/py/ganeti.rapi.rlib2_unittest.py \ |
1433 |
test/py/ganeti.rapi.testutils_unittest.py \ |
1434 |
test/py/ganeti.rpc_unittest.py \ |
1435 |
test/py/ganeti.runtime_unittest.py \ |
1436 |
test/py/ganeti.serializer_unittest.py \ |
1437 |
test/py/ganeti.server.rapi_unittest.py \ |
1438 |
test/py/ganeti.ssconf_unittest.py \ |
1439 |
test/py/ganeti.ssh_unittest.py \ |
1440 |
test/py/ganeti.storage.bdev_unittest.py \ |
1441 |
test/py/ganeti.storage.container_unittest.py \ |
1442 |
test/py/ganeti.storage.drbd_unittest.py \ |
1443 |
test/py/ganeti.storage.filestorage_unittest.py \ |
1444 |
test/py/ganeti.tools.burnin_unittest.py \ |
1445 |
test/py/ganeti.tools.ensure_dirs_unittest.py \ |
1446 |
test/py/ganeti.tools.node_daemon_setup_unittest.py \ |
1447 |
test/py/ganeti.tools.prepare_node_join_unittest.py \ |
1448 |
test/py/ganeti.uidpool_unittest.py \ |
1449 |
test/py/ganeti.utils.algo_unittest.py \ |
1450 |
test/py/ganeti.utils.filelock_unittest.py \ |
1451 |
test/py/ganeti.utils.hash_unittest.py \ |
1452 |
test/py/ganeti.utils.io_unittest-runasroot.py \ |
1453 |
test/py/ganeti.utils.io_unittest.py \ |
1454 |
test/py/ganeti.utils.log_unittest.py \ |
1455 |
test/py/ganeti.utils.lvm_unittest.py \ |
1456 |
test/py/ganeti.utils.mlock_unittest.py \ |
1457 |
test/py/ganeti.utils.nodesetup_unittest.py \ |
1458 |
test/py/ganeti.utils.process_unittest.py \ |
1459 |
test/py/ganeti.utils.retry_unittest.py \ |
1460 |
test/py/ganeti.utils.storage_unittest.py \ |
1461 |
test/py/ganeti.utils.text_unittest.py \ |
1462 |
test/py/ganeti.utils.version_unittest.py \ |
1463 |
test/py/ganeti.utils.wrapper_unittest.py \ |
1464 |
test/py/ganeti.utils.x509_unittest.py \ |
1465 |
test/py/ganeti.utils_unittest.py \ |
1466 |
test/py/ganeti.vcluster_unittest.py \ |
1467 |
test/py/ganeti.workerpool_unittest.py \ |
1468 |
test/py/pycurl_reset_unittest.py \ |
1469 |
test/py/qa.qa_config_unittest.py \ |
1470 |
test/py/tempfile_fork_unittest.py |
1471 |
|
1472 |
python_test_support = \ |
1473 |
test/py/__init__.py \ |
1474 |
test/py/lockperf.py \ |
1475 |
test/py/testutils.py \ |
1476 |
test/py/mocks.py \ |
1477 |
test/py/cmdlib/__init__.py \ |
1478 |
test/py/cmdlib/testsupport/__init__.py \ |
1479 |
test/py/cmdlib/testsupport/cmdlib_testcase.py \ |
1480 |
test/py/cmdlib/testsupport/config_mock.py \ |
1481 |
test/py/cmdlib/testsupport/iallocator_mock.py \ |
1482 |
test/py/cmdlib/testsupport/lock_manager_mock.py \ |
1483 |
test/py/cmdlib/testsupport/netutils_mock.py \ |
1484 |
test/py/cmdlib/testsupport/processor_mock.py \ |
1485 |
test/py/cmdlib/testsupport/rpc_runner_mock.py \ |
1486 |
test/py/cmdlib/testsupport/ssh_mock.py \ |
1487 |
test/py/cmdlib/testsupport/util.py |
1488 |
|
1489 |
haskell_tests = test/hs/htest |
1490 |
|
1491 |
dist_TESTS = \ |
1492 |
test/py/check-cert-expired_unittest.bash \ |
1493 |
test/py/daemon-util_unittest.bash \ |
1494 |
test/py/ganeti-cleaner_unittest.bash \ |
1495 |
test/py/import-export_unittest.bash \ |
1496 |
test/py/cli-test.bash \ |
1497 |
test/py/bash_completion.bash |
1498 |
|
1499 |
if PY_UNIT |
1500 |
dist_TESTS += $(python_tests) |
1501 |
endif |
1502 |
|
1503 |
nodist_TESTS = |
1504 |
check_SCRIPTS = |
1505 |
|
1506 |
if WANT_HSTESTS |
1507 |
nodist_TESTS += $(haskell_tests) |
1508 |
dist_TESTS += test/hs/offline-test.sh |
1509 |
check_SCRIPTS += \ |
1510 |
test/hs/hpc-htools \ |
1511 |
test/hs/hpc-mon-collector \ |
1512 |
$(HS_BUILT_TEST_HELPERS) |
1513 |
endif |
1514 |
|
1515 |
TESTS = $(dist_TESTS) $(nodist_TESTS) |
1516 |
|
1517 |
# Environment for all tests |
1518 |
PLAIN_TESTS_ENVIRONMENT = \ |
1519 |
PYTHONPATH=.:./test/py \ |
1520 |
TOP_SRCDIR=$(abs_top_srcdir) TOP_BUILDDIR=$(abs_top_builddir) \ |
1521 |
PYTHON=$(PYTHON) FAKEROOT=$(FAKEROOT_PATH) \ |
1522 |
$(RUN_IN_TEMPDIR) |
1523 |
|
1524 |
# Environment for tests run by automake |
1525 |
TESTS_ENVIRONMENT = \ |
1526 |
$(PLAIN_TESTS_ENVIRONMENT) $(abs_top_srcdir)/autotools/testrunner |
1527 |
|
1528 |
all_python_code = \ |
1529 |
$(dist_sbin_SCRIPTS) \ |
1530 |
$(python_scripts) \ |
1531 |
$(pkglib_python_scripts) \ |
1532 |
$(nodist_pkglib_python_scripts) \ |
1533 |
$(nodist_tools_python_scripts) \ |
1534 |
$(pkgpython_PYTHON) \ |
1535 |
$(client_PYTHON) \ |
1536 |
$(cmdlib_PYTHON) \ |
1537 |
$(hypervisor_PYTHON) \ |
1538 |
$(storage_PYTHON) \ |
1539 |
$(rapi_PYTHON) \ |
1540 |
$(server_PYTHON) \ |
1541 |
$(pytools_PYTHON) \ |
1542 |
$(http_PYTHON) \ |
1543 |
$(confd_PYTHON) \ |
1544 |
$(masterd_PYTHON) \ |
1545 |
$(impexpd_PYTHON) \ |
1546 |
$(utils_PYTHON) \ |
1547 |
$(watcher_PYTHON) \ |
1548 |
$(noinst_PYTHON) \ |
1549 |
$(qa_scripts) |
1550 |
|
1551 |
if PY_UNIT |
1552 |
all_python_code += $(python_tests) |
1553 |
all_python_code += $(python_test_support) |
1554 |
endif |
1555 |
|
1556 |
srclink_files = \ |
1557 |
man/footer.rst \ |
1558 |
test/py/check-cert-expired_unittest.bash \ |
1559 |
test/py/daemon-util_unittest.bash \ |
1560 |
test/py/ganeti-cleaner_unittest.bash \ |
1561 |
test/py/import-export_unittest.bash \ |
1562 |
test/py/cli-test.bash \ |
1563 |
test/py/bash_completion.bash \ |
1564 |
test/hs/offline-test.sh \ |
1565 |
test/hs/cli-tests-defs.sh \ |
1566 |
$(all_python_code) \ |
1567 |
$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS) \ |
1568 |
$(docinput) |
1569 |
|
1570 |
check_python_code = \ |
1571 |
$(BUILD_BASH_COMPLETION) \ |
1572 |
$(CHECK_IMPORTS) \ |
1573 |
$(CHECK_HEADER) \ |
1574 |
$(DOCPP) \ |
1575 |
$(all_python_code) |
1576 |
|
1577 |
lint_python_code = \ |
1578 |
ganeti \ |
1579 |
ganeti/http/server.py \ |
1580 |
$(dist_sbin_SCRIPTS) \ |
1581 |
$(python_scripts) \ |
1582 |
$(pkglib_python_scripts) \ |
1583 |
$(BUILD_BASH_COMPLETION) \ |
1584 |
$(CHECK_IMPORTS) \ |
1585 |
$(CHECK_HEADER) \ |
1586 |
$(DOCPP) \ |
1587 |
$(gnt_python_sbin_SCRIPTS) \ |
1588 |
$(PYTHON_BOOTSTRAP) |
1589 |
|
1590 |
standalone_python_modules = \ |
1591 |
lib/rapi/client.py \ |
1592 |
tools/ganeti-listrunner |
1593 |
|
1594 |
pep8_python_code = \ |
1595 |
ganeti \ |
1596 |
ganeti/http/server.py \ |
1597 |
$(dist_sbin_SCRIPTS) \ |
1598 |
$(python_scripts) \ |
1599 |
$(pkglib_python_scripts) \ |
1600 |
$(BUILD_BASH_COMPLETION) \ |
1601 |
$(CHECK_HEADER) \ |
1602 |
$(DOCPP) \ |
1603 |
$(PYTHON_BOOTSTRAP) \ |
1604 |
$(gnt_python_sbin_SCRIPTS) \ |
1605 |
qa \ |
1606 |
$(python_test_support) |
1607 |
|
1608 |
test/py/daemon-util_unittest.bash: daemons/daemon-util |
1609 |
|
1610 |
test/py/ganeti-cleaner_unittest.bash: daemons/ganeti-cleaner |
1611 |
|
1612 |
test/py/bash_completion.bash: doc/examples/bash_completion-debug |
1613 |
|
1614 |
tools/kvm-ifup: tools/kvm-ifup.in $(REPLACE_VARS_SED) |
1615 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1616 |
chmod +x $@ |
1617 |
|
1618 |
tools/vif-ganeti: tools/vif-ganeti.in $(REPLACE_VARS_SED) |
1619 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1620 |
chmod +x $@ |
1621 |
|
1622 |
tools/net-common: tools/net-common.in $(REPLACE_VARS_SED) |
1623 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1624 |
chmod +x $@ |
1625 |
|
1626 |
tools/users-setup: Makefile $(userspecs) |
1627 |
set -e; \ |
1628 |
{ echo '#!/bin/sh'; \ |
1629 |
echo 'if [ "x$$1" != "x--yes-do-it" ];'; \ |
1630 |
echo 'then echo "This will do the following changes"'; \ |
1631 |
$(AWK) -- '{print "echo + Will add group ",$$1; count++}\ |
1632 |
END {if (count == 0) {print "echo + No groups to add"}}' doc/users/groups; \ |
1633 |
$(AWK) -- '{if (NF > 1) {print "echo + Will add user",$$1,"with primary group",$$2} \ |
1634 |
else {print "echo + Will add user",$$1}; count++}\ |
1635 |
END {if (count == 0) {print "echo + No users to add"}}' doc/users/users; \ |
1636 |
$(AWK) -- '{print "echo + Will add user",$$1,"to group",$$2}' doc/users/groupmemberships; \ |
1637 |
echo 'echo'; \ |
1638 |
echo 'echo "OK? (y/n)"'; \ |
1639 |
echo 'read confirm'; \ |
1640 |
echo 'if [ "x$$confirm" != "xy" ]; then exit 0; fi'; \ |
1641 |
echo 'fi'; \ |
1642 |
$(AWK) -- '{print "addgroup --system",$$1}' doc/users/groups; \ |
1643 |
$(AWK) -- '{if (NF > 1) {print "adduser --system --ingroup",$$2,$$1} else {print "adduser --system",$$1}}' doc/users/users; \ |
1644 |
$(AWK) -- '{print "adduser",$$1,$$2}' doc/users/groupmemberships; \ |
1645 |
} > $@ |
1646 |
chmod +x $@ |
1647 |
|
1648 |
tools/vcluster-setup: tools/vcluster-setup.in $(REPLACE_VARS_SED) |
1649 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1650 |
chmod +x $@ |
1651 |
|
1652 |
daemons/%:: daemons/%.in $(REPLACE_VARS_SED) |
1653 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1654 |
chmod +x $@ |
1655 |
|
1656 |
doc/examples/%:: doc/examples/%.in $(REPLACE_VARS_SED) |
1657 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1658 |
|
1659 |
doc/examples/bash_completion: BC_ARGS = --compact |
1660 |
doc/examples/bash_completion-debug: BC_ARGS = |
1661 |
|
1662 |
doc/examples/bash_completion doc/examples/bash_completion-debug: \ |
1663 |
$(BUILD_BASH_COMPLETION) $(RUN_IN_TEMPDIR) \ |
1664 |
lib/cli.py $(gnt_scripts) $(client_PYTHON) tools/burnin \ |
1665 |
daemons/ganeti-cleaner \ |
1666 |
$(GENERATED_FILES) $(HS_GENERATED_FILES) |
1667 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) \ |
1668 |
$(CURDIR)/$(BUILD_BASH_COMPLETION) $(BC_ARGS) > $@ |
1669 |
|
1670 |
man/%.gen: man/%.rst lib/query.py lib/build/sphinx_ext.py \ |
1671 |
lib/build/shell_example_lexer.py \ |
1672 |
| $(RUN_IN_TEMPDIR) $(BUILT_PYTHON_SOURCES) |
1673 |
@echo "Checking $< for hardcoded paths..." |
1674 |
@if grep -nEf autotools/wrong-hardcoded-paths $<; then \ |
1675 |
echo "Man page $< has hardcoded paths (see above)!" 1>&2 ; \ |
1676 |
exit 1; \ |
1677 |
fi |
1678 |
set -e ; \ |
1679 |
trap 'echo auto-removing $@; rm $@' EXIT; \ |
1680 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(DOCPP) < $< > $@ ;\ |
1681 |
$(CHECK_MAN_REFERENCES) $@; \ |
1682 |
trap - EXIT |
1683 |
|
1684 |
man/%.7.in man/%.8.in man/%.1.in: man/%.gen man/footer.rst |
1685 |
@test -n "$(PANDOC)" || \ |
1686 |
{ echo 'pandoc' not found during configure; exit 1; } |
1687 |
set -o pipefail -e; \ |
1688 |
trap 'echo auto-removing $@; rm $@' EXIT; \ |
1689 |
$(PANDOC) -s -f rst -t man $< man/footer.rst | \ |
1690 |
sed -e 's/\\@/@/g' > $@; \ |
1691 |
if test -n "$(MAN_HAS_WARNINGS)"; then $(CHECK_MAN_WARNINGS) $@; fi; \ |
1692 |
$(CHECK_MAN_DASHES) $@; \ |
1693 |
trap - EXIT |
1694 |
|
1695 |
man/%.html.in: man/%.gen man/footer.rst |
1696 |
@test -n "$(PANDOC)" || \ |
1697 |
{ echo 'pandoc' not found during configure; exit 1; } |
1698 |
set -o pipefail ; \ |
1699 |
$(PANDOC) --toc -s -f rst -t html $< man/footer.rst | \ |
1700 |
sed -e 's/\\@/@/g' > $@ |
1701 |
|
1702 |
man/%: man/%.in $(REPLACE_VARS_SED) |
1703 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1704 |
|
1705 |
epydoc.conf: epydoc.conf.in $(REPLACE_VARS_SED) |
1706 |
sed -f $(REPLACE_VARS_SED) < $< > $@ |
1707 |
|
1708 |
vcs-version: |
1709 |
if test -d .git; then \ |
1710 |
git describe > $@; \ |
1711 |
elif test ! -f $@ ; then \ |
1712 |
echo "Cannot auto-generate $@ file"; exit 1; \ |
1713 |
fi |
1714 |
|
1715 |
.PHONY: clean-vcs-version |
1716 |
clean-vcs-version: |
1717 |
rm -f vcs-version |
1718 |
|
1719 |
.PHONY: regen-vcs-version |
1720 |
regen-vcs-version: |
1721 |
@set -e; \ |
1722 |
cd $(srcdir); \ |
1723 |
if test -d .git; then \ |
1724 |
T=`mktemp` ; trap 'rm -f $$T' EXIT; \ |
1725 |
git describe > $$T; \ |
1726 |
if ! cmp --quiet $$T vcs-version; then \ |
1727 |
mv $$T vcs-version; \ |
1728 |
fi; \ |
1729 |
fi |
1730 |
|
1731 |
src/Ganeti/Version.hs: src/Ganeti/Version.hs.in \ |
1732 |
vcs-version $(built_base_sources) |
1733 |
set -e; \ |
1734 |
VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \ |
1735 |
sed -e "s/%ver%/$$VCSVER/" < $< > $@ |
1736 |
|
1737 |
src/Ganeti/Hs2Py/ListConstants.hs: src/Ganeti/Hs2Py/ListConstants.hs.in \ |
1738 |
src/Ganeti/HsConstants.hs \ |
1739 |
| stamp-directories |
1740 |
@echo Generating $@ |
1741 |
@set -e; \ |
1742 |
## Extract constant names from 'HsConstants.hs' by extracting the left |
1743 |
## side of all lines containing an equal sign (i.e., '=') and |
1744 |
## prepending the apostrophe sign (i.e., "'"). |
1745 |
## |
1746 |
## For example, the constant |
1747 |
## adminstDown = ... |
1748 |
## becomes |
1749 |
## 'adminstDown |
1750 |
NAMES=$$(sed -e "/^--/ d" $(abs_top_srcdir)/src/Ganeti/HsConstants.hs |\ |
1751 |
sed -n -e "/=/ s/\(.*\) =.*/ '\1:/g p"); \ |
1752 |
m4 -DPY_CONSTANT_NAMES="$$NAMES" $(abs_top_srcdir)/$< > $@ |
1753 |
|
1754 |
src/Ganeti/PyConstants.hs: src/Ganeti/PyConstants.hs.in \ |
1755 |
lib/constants.py lib/luxi.py lib/errors.py \ |
1756 |
lib/jstore.py $(RUN_IN_TEMPDIR) \ |
1757 |
$(CONVERT_CONSTANTS) $(built_base_sources) \ |
1758 |
| lib/_vcsversion.py |
1759 |
set -e; \ |
1760 |
{ cat $< ; \ |
1761 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CONVERT_CONSTANTS); \ |
1762 |
} > $@ |
1763 |
|
1764 |
src/Ganeti/Curl/Internal.hs: src/Ganeti/Curl/Internal.hsc | stamp-directories |
1765 |
hsc2hs -o $@ $< |
1766 |
|
1767 |
test/hs/Test/Ganeti/TestImports.hs: test/hs/Test/Ganeti/TestImports.hs.in \ |
1768 |
$(built_base_sources) |
1769 |
set -e; \ |
1770 |
{ cat $< ; \ |
1771 |
echo ; \ |
1772 |
for name in $(filter-out Ganeti.THH,$(subst /,.,$(patsubst %.hs,%,$(patsubst src/%,%,$(HS_LIB_SRCS))))) ; do \ |
1773 |
echo "import $$name ()" ; \ |
1774 |
done ; \ |
1775 |
} > $@ |
1776 |
|
1777 |
lib/_constants.py: Makefile lib/_constants.py.in src/hs2py-constants \ |
1778 |
| stamp-directories |
1779 |
cat $(abs_top_srcdir)/lib/_constants.py.in > $@ |
1780 |
src/hs2py-constants >> $@ |
1781 |
|
1782 |
lib/constants.py: lib/_constants.py |
1783 |
|
1784 |
src/AutoConf.hs: Makefile src/AutoConf.hs.in | stamp-directories |
1785 |
@echo "m4 ... >" $@ |
1786 |
@m4 -DPACKAGE_VERSION="$(PACKAGE_VERSION)" \ |
1787 |
-DVERSION_MAJOR="$(VERSION_MAJOR)" \ |
1788 |
-DVERSION_MINOR="$(VERSION_MINOR)" \ |
1789 |
-DVERSION_REVISION="$(VERSION_REVISION)" \ |
1790 |
-DVERSION_SUFFIX="$(VERSION_SUFFIX)" \ |
1791 |
-DVERSION_FULL="$(VERSION_FULL)" \ |
1792 |
-DDIRVERSION="$(DIRVERSION)" \ |
1793 |
-DLOCALSTATEDIR="$(localstatedir)" \ |
1794 |
-DSYSCONFDIR="$(sysconfdir)" \ |
1795 |
-DSSH_CONFIG_DIR="$(SSH_CONFIG_DIR)" \ |
1796 |
-DSSH_LOGIN_USER="$(SSH_LOGIN_USER)" \ |
1797 |
-DSSH_CONSOLE_USER="$(SSH_CONSOLE_USER)" \ |
1798 |
-DEXPORT_DIR="$(EXPORT_DIR)" \ |
1799 |
-DOS_SEARCH_PATH="\"$(OS_SEARCH_PATH)\"" \ |
1800 |
-DES_SEARCH_PATH="\"$(ES_SEARCH_PATH)\"" \ |
1801 |
-DXEN_BOOTLOADER="$(XEN_BOOTLOADER)" \ |
1802 |
-DXEN_CONFIG_DIR="$(XEN_CONFIG_DIR)" \ |
1803 |
-DXEN_KERNEL="$(XEN_KERNEL)" \ |
1804 |
-DXEN_INITRD="$(XEN_INITRD)" \ |
1805 |
-DKVM_KERNEL="$(KVM_KERNEL)" \ |
1806 |
-DSHARED_FILE_STORAGE_DIR="$(SHARED_FILE_STORAGE_DIR)" \ |
1807 |
-DIALLOCATOR_SEARCH_PATH="\"$(IALLOCATOR_SEARCH_PATH)\"" \ |
1808 |
-DKVM_PATH="$(KVM_PATH)" \ |
1809 |
-DIP_PATH="$(IP_PATH)" \ |
1810 |
-DSOCAT_PATH="$(SOCAT)" \ |
1811 |
-DSOCAT_USE_ESCAPE="$(SOCAT_USE_ESCAPE)" \ |
1812 |
-DSOCAT_USE_COMPRESS="$(SOCAT_USE_COMPRESS)" \ |
1813 |
-DLVM_STRIPECOUNT="$(LVM_STRIPECOUNT)" \ |
1814 |
-DTOOLSDIR="$(libdir)/ganeti/tools" \ |
1815 |
-DGNT_SCRIPTS="$(foreach i,$(notdir $(gnt_scripts)),\"$(i)\":)" \ |
1816 |
-DHS_HTOOLS_PROGS="$(foreach i,$(HS_HTOOLS_PROGS),\"$(i)\":)" \ |
1817 |
-DPKGLIBDIR="$(libdir)/ganeti" \ |
1818 |
-DSHAREDIR="$(prefix)/share/ganeti" \ |
1819 |
-DVERSIONEDSHAREDIR="$(versionedsharedir)" \ |
1820 |
-DDRBD_BARRIERS="$(DRBD_BARRIERS)" \ |
1821 |
-DDRBD_NO_META_FLUSH="$(DRBD_NO_META_FLUSH)" \ |
1822 |
-DSYSLOG_USAGE="$(SYSLOG_USAGE)" \ |
1823 |
-DDAEMONS_GROUP="$(DAEMONS_GROUP)" \ |
1824 |
-DADMIN_GROUP="$(ADMIN_GROUP)" \ |
1825 |
-DMASTERD_USER="$(MASTERD_USER)" \ |
1826 |
-DMASTERD_GROUP="$(MASTERD_GROUP)" \ |
1827 |
-DRAPI_USER="$(RAPI_USER)" \ |
1828 |
-DRAPI_GROUP="$(RAPI_GROUP)" \ |
1829 |
-DCONFD_USER="$(CONFD_USER)" \ |
1830 |
-DCONFD_GROUP="$(CONFD_GROUP)" \ |
1831 |
-DLUXID_USER="$(LUXID_USER)" \ |
1832 |
-DLUXID_GROUP="$(LUXID_GROUP)" \ |
1833 |
-DNODED_USER="$(NODED_USER)" \ |
1834 |
-DNODED_GROUP="$(NODED_GROUP)" \ |
1835 |
-DMOND_USER="$(MOND_USER)" \ |
1836 |
-DMOND_GROUP="$(MOND_GROUP)" \ |
1837 |
-DDISK_SEPARATOR="$(DISK_SEPARATOR)" \ |
1838 |
-DQEMUIMG_PATH="$(QEMUIMG_PATH)" \ |
1839 |
-DHTOOLS="True" \ |
1840 |
-DENABLE_CONFD="$(ENABLE_CONFD)" \ |
1841 |
-DXEN_CMD="$(XEN_CMD)" \ |
1842 |
-DENABLE_SPLIT_QUERY="$(ENABLE_SPLIT_QUERY)" \ |
1843 |
-DENABLE_RESTRICTED_COMMANDS="$(ENABLE_RESTRICTED_COMMANDS)" \ |
1844 |
-DENABLE_MOND="$(ENABLE_MOND)" \ |
1845 |
-DHAS_GNU_LN="$(HAS_GNU_LN)" \ |
1846 |
-DMAN_PAGES="$$(for i in $(notdir $(man_MANS)); do \ |
1847 |
echo -n "$$i" | sed -re 's/^(.*)\.([0-9]+)$$/("\1",\2):/g'; \ |
1848 |
done)" \ |
1849 |
$(abs_top_srcdir)/src/AutoConf.hs.in > $@ |
1850 |
|
1851 |
lib/_vcsversion.py: Makefile vcs-version | stamp-directories |
1852 |
set -e; \ |
1853 |
VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \ |
1854 |
{ echo '# This file is automatically generated, do not edit!'; \ |
1855 |
echo '#'; \ |
1856 |
echo ''; \ |
1857 |
echo '"""Build-time VCS version number for Ganeti.'; \ |
1858 |
echo '';\ |
1859 |
echo 'This file is autogenerated by the build process.'; \ |
1860 |
echo 'For any changes you need to re-run ./configure (and'; \ |
1861 |
echo 'not edit by hand).'; \ |
1862 |
echo ''; \ |
1863 |
echo '"""'; \ |
1864 |
echo ''; \ |
1865 |
echo '# pylint: disable=C0301,C0324'; \ |
1866 |
echo '# because this is autogenerated, we do not want'; \ |
1867 |
echo '# style warnings' ; \ |
1868 |
echo ''; \ |
1869 |
echo "VCS_VERSION = '$$VCSVER'"; \ |
1870 |
} > $@ |
1871 |
|
1872 |
lib/opcodes.py: Makefile src/hs2py src/Ganeti/PyConstants.hs \ |
1873 |
lib/opcodes.py.in_before lib/opcodes.py.in_after \ |
1874 |
| stamp-directories |
1875 |
cat $(abs_top_srcdir)/lib/opcodes.py.in_before > $@ |
1876 |
src/hs2py >> $@ |
1877 |
cat $(abs_top_srcdir)/lib/opcodes.py.in_after >> $@ |
1878 |
|
1879 |
lib/_generated_rpc.py: lib/rpc_defs.py $(BUILD_RPC) |
1880 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(BUILD_RPC) lib/rpc_defs.py > $@ |
1881 |
|
1882 |
$(SHELL_ENV_INIT): Makefile stamp-directories |
1883 |
set -e; \ |
1884 |
{ echo '# Allow overriding for tests'; \ |
1885 |
echo 'readonly LOCALSTATEDIR=$${LOCALSTATEDIR:-$${GANETI_ROOTDIR:-}$(localstatedir)}'; \ |
1886 |
echo 'readonly SYSCONFDIR=$${SYSCONFDIR:-$${GANETI_ROOTDIR:-}$(sysconfdir)}'; \ |
1887 |
echo; \ |
1888 |
echo 'readonly PKGLIBDIR=$(libdir)/ganeti'; \ |
1889 |
echo 'readonly LOG_DIR="$$LOCALSTATEDIR/log/ganeti"'; \ |
1890 |
echo 'readonly RUN_DIR="$$LOCALSTATEDIR/run/ganeti"'; \ |
1891 |
echo 'readonly DATA_DIR="$$LOCALSTATEDIR/lib/ganeti"'; \ |
1892 |
echo 'readonly CONF_DIR="$$SYSCONFDIR/ganeti"'; \ |
1893 |
} > $@ |
1894 |
|
1895 |
## Writes sed script to replace placeholders with build-time values. The |
1896 |
## additional quotes after the first @ sign are necessary to stop configure |
1897 |
## from replacing those values as well. |
1898 |
$(REPLACE_VARS_SED): $(SHELL_ENV_INIT) Makefile stamp-directories |
1899 |
set -e; \ |
1900 |
{ echo 's#@''PREFIX@#$(prefix)#g'; \ |
1901 |
echo 's#@''SYSCONFDIR@#$(sysconfdir)#g'; \ |
1902 |
echo 's#@''LOCALSTATEDIR@#$(localstatedir)#g'; \ |
1903 |
echo 's#@''BINDIR@#$(execprefix)/bin#g'; \ |
1904 |
echo 's#@''SBINDIR@#$(execprefix)/sbin#g'; \ |
1905 |
echo 's#@''LIBDIR@#$(libdir)#g'; \ |
1906 |
echo 's#@''GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \ |
1907 |
echo 's#@''CUSTOM_XEN_BOOTLOADER@#$(XEN_BOOTLOADER)#g'; \ |
1908 |
echo 's#@''CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \ |
1909 |
echo 's#@''CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \ |
1910 |
echo 's#@''CUSTOM_IALLOCATOR_SEARCH_PATH@#$(IALLOCATOR_SEARCH_PATH)#g'; \ |
1911 |
echo 's#@''CUSTOM_EXPORT_DIR@#$(EXPORT_DIR)#g'; \ |
1912 |
echo 's#@''RPL_SSH_INITD_SCRIPT@#$(SSH_INITD_SCRIPT)#g'; \ |
1913 |
echo 's#@''PKGLIBDIR@#$(libdir)/ganeti#g'; \ |
1914 |
echo 's#@''GNTMASTERUSER@#$(MASTERD_USER)#g'; \ |
1915 |
echo 's#@''GNTRAPIUSER@#$(RAPI_USER)#g'; \ |
1916 |
echo 's#@''GNTCONFDUSER@#$(CONFD_USER)#g'; \ |
1917 |
echo 's#@''GNTLUXIDUSER@#$(LUXID_USER)#g'; \ |
1918 |
echo 's#@''GNTNODEDUSER@#$(NODED_USER)#g'; \ |
1919 |
echo 's#@''GNTMONDUSER@#$(MOND_USER)#g'; \ |
1920 |
echo 's#@''GNTRAPIGROUP@#$(RAPI_GROUP)#g'; \ |
1921 |
echo 's#@''GNTADMINGROUP@#$(ADMIN_GROUP)#g'; \ |
1922 |
echo 's#@''GNTCONFDGROUP@#$(CONFD_GROUP)#g'; \ |
1923 |
echo 's#@''GNTLUXIDGROUP@#$(LUXID_GROUP)#g'; \ |
1924 |
echo 's#@''GNTMASTERDGROUP@#$(MASTERD_GROUP)#g'; \ |
1925 |
echo 's#@''GNTMONDGROUP@#$(MOND_GROUP)#g'; \ |
1926 |
echo 's#@''GNTDAEMONSGROUP@#$(DAEMONS_GROUP)#g'; \ |
1927 |
echo 's#@''CUSTOM_ENABLE_CONFD@#$(ENABLE_CONFD)#g'; \ |
1928 |
echo 's#@''CUSTOM_ENABLE_MOND@#$(ENABLE_MOND)#g'; \ |
1929 |
echo 's#@''MODULES@#$(strip $(lint_python_code))#g'; \ |
1930 |
echo 's#@''XEN_CONFIG_DIR@#$(XEN_CONFIG_DIR)#g'; \ |
1931 |
echo; \ |
1932 |
echo '/^@SHELL_ENV_INIT@$$/ {'; \ |
1933 |
echo ' r $(SHELL_ENV_INIT)'; \ |
1934 |
echo ' d'; \ |
1935 |
echo '}'; \ |
1936 |
} > $@ |
1937 |
|
1938 |
# Using deferred evaluation |
1939 |
daemons/ganeti-%: MODULE = ganeti.server.$(patsubst ganeti-%,%,$(notdir $@)) |
1940 |
daemons/ganeti-watcher: MODULE = ganeti.watcher |
1941 |
scripts/%: MODULE = ganeti.client.$(subst -,_,$(notdir $@)) |
1942 |
tools/burnin: MODULE = ganeti.tools.burnin |
1943 |
tools/ensure-dirs: MODULE = ganeti.tools.ensure_dirs |
1944 |
tools/node-daemon-setup: MODULE = ganeti.tools.node_daemon_setup |
1945 |
tools/prepare-node-join: MODULE = ganeti.tools.prepare_node_join |
1946 |
tools/node-cleanup: MODULE = ganeti.tools.node_cleanup |
1947 |
$(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst test/hs/%,%,$@) |
1948 |
|
1949 |
$(PYTHON_BOOTSTRAP) $(gnt_scripts) $(gnt_python_sbin_SCRIPTS): Makefile | stamp-directories |
1950 |
test -n "$(MODULE)" || { echo Missing module; exit 1; } |
1951 |
set -e; \ |
1952 |
{ echo '#!/usr/bin/python'; \ |
1953 |
echo '# This file is automatically generated, do not edit!'; \ |
1954 |
echo "# Edit $(MODULE) instead."; \ |
1955 |
echo; \ |
1956 |
echo '"""Bootstrap script for L{$(MODULE)}"""'; \ |
1957 |
echo; \ |
1958 |
echo '# pylint: disable=C0103'; \ |
1959 |
echo '# C0103: Invalid name'; \ |
1960 |
echo; \ |
1961 |
echo 'import sys'; \ |
1962 |
echo 'import $(MODULE) as main'; \ |
1963 |
echo; \ |
1964 |
echo '# Temporarily alias commands until bash completion'; \ |
1965 |
echo '# generator is changed'; \ |
1966 |
echo 'if hasattr(main, "commands"):'; \ |
1967 |
echo ' commands = main.commands # pylint: disable=E1101'; \ |
1968 |
echo 'if hasattr(main, "aliases"):'; \ |
1969 |
echo ' aliases = main.aliases # pylint: disable=E1101'; \ |
1970 |
echo; \ |
1971 |
echo 'if __name__ == "__main__":'; \ |
1972 |
echo ' sys.exit(main.Main())'; \ |
1973 |
} > $@ |
1974 |
chmod u+x $@ |
1975 |
|
1976 |
$(HS_BUILT_TEST_HELPERS): Makefile |
1977 |
@test -n "$(TESTROLE)" || { echo Missing TESTROLE; exit 1; } |
1978 |
set -e; \ |
1979 |
{ echo '#!/bin/sh'; \ |
1980 |
echo '# This file is automatically generated, do not edit!'; \ |
1981 |
echo "# Edit Makefile.am instead."; \ |
1982 |
echo; \ |
1983 |
echo "HTOOLS=$(TESTROLE) exec ./test/hs/hpc-htools \"\$$@\""; \ |
1984 |
} > $@ |
1985 |
chmod u+x $@ |
1986 |
|
1987 |
stamp-directories: Makefile |
1988 |
$(MAKE) $(AM_MAKEFLAGS) ganeti |
1989 |
@mkdir_p@ $(DIRS) $(BUILDTIME_DIR_AUTOCREATE) |
1990 |
touch $@ |
1991 |
|
1992 |
# We need to create symlinks because "make distcheck" will not install Python |
1993 |
# files when building. |
1994 |
stamp-srclinks: Makefile | stamp-directories |
1995 |
set -e; \ |
1996 |
for i in $(srclink_files); do \ |
1997 |
if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \ |
1998 |
$(LN_S) $(abs_top_srcdir)/$$i $$i; \ |
1999 |
fi; \ |
2000 |
done |
2001 |
touch $@ |
2002 |
|
2003 |
.PHONY: ganeti |
2004 |
ganeti: |
2005 |
cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; } |
2006 |
|
2007 |
.PHONY: check-dirs |
2008 |
check-dirs: $(GENERATED_FILES) |
2009 |
@set -e; \ |
2010 |
find . -type d \( -name . -o -name .git -prune -o -print \) | { \ |
2011 |
error=; \ |
2012 |
while read dir; do \ |
2013 |
case "$$dir" in \ |
2014 |
$(strip $(patsubst %,(./%) ;;,$(DIRCHECK_EXCLUDE) $(DIRS))) \ |
2015 |
*) error=1; echo "Directory $$dir not listed in Makefile" >&2 ;; \ |
2016 |
esac; \ |
2017 |
done; \ |
2018 |
for dir in $(DIRS); do \ |
2019 |
if ! test -d "$$dir"; then \ |
2020 |
echo "Directory $$dir listed in DIRS does not exist" >&2; \ |
2021 |
error=1; \ |
2022 |
fi \ |
2023 |
done; \ |
2024 |
test -z "$$error"; \ |
2025 |
} |
2026 |
|
2027 |
.PHONY: check-local |
2028 |
check-local: check-dirs $(GENERATED_FILES) |
2029 |
$(CHECK_PYTHON_CODE) $(check_python_code) |
2030 |
PYTHONPATH=. $(CHECK_HEADER) $(check_python_code) |
2031 |
$(CHECK_VERSION) $(VERSION) $(top_srcdir)/NEWS |
2032 |
RELEASE=$(PACKAGE_VERSION) $(CHECK_NEWS) < $(top_srcdir)/NEWS |
2033 |
PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules) |
2034 |
error= ; \ |
2035 |
if [ "x`echo $(VERSION_SUFFIX)|grep 'alpha'`" == "x" ]; then \ |
2036 |
expver=$(VERSION_MAJOR).$(VERSION_MINOR); \ |
2037 |
if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \ |
2038 |
echo "Incorrect version in README, expected $$expver" >&2; \ |
2039 |
error=1; \ |
2040 |
fi; \ |
2041 |
for file in doc/iallocator.rst doc/hooks.rst doc/virtual-cluster.rst \ |
2042 |
doc/security.rst; do \ |
2043 |
if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \ |
2044 |
"Documents Ganeti version $$expver"; then \ |
2045 |
echo "Incorrect version in $$file, expected $$expver" >&2; \ |
2046 |
error=1; \ |
2047 |
fi; \ |
2048 |
done; \ |
2049 |
if ! test -f $(top_srcdir)/doc/design-$$expver.rst; then \ |
2050 |
echo "File $(top_srcdir)/doc/design-$$expver.rst not found" >&2; \ |
2051 |
error=1; \ |
2052 |
fi; \ |
2053 |
if test "`sed -ne '5 p' $(top_srcdir)/doc/design-draft.rst`" != \ |
2054 |
".. Last updated for Ganeti $$expver"; then \ |
2055 |
echo "doc/design-draft.rst was not updated for version $$expver" >&2; \ |
2056 |
error=1; \ |
2057 |
fi; \ |
2058 |
fi; \ |
2059 |
for file in configure.ac $(HS_LIBTEST_SRCS) $(HS_PROG_SRCS); do \ |
2060 |
if test $$(wc --max-line-length < $(top_srcdir)/$$file) -gt 80; then \ |
2061 |
echo "Longest line in $$file is longer than 80 characters" >&2; \ |
2062 |
error=1; \ |
2063 |
fi; \ |
2064 |
done; \ |
2065 |
test -z "$$error" |
2066 |
|
2067 |
.PHONY: hs-test-% |
2068 |
hs-test-%: test/hs/htest | $(BUILT_PYTHON_SOURCES) |
2069 |
@rm -f htest.tix |
2070 |
test/hs/htest -t $* |
2071 |
|
2072 |
.PHONY: hs-tests |
2073 |
hs-tests: test/hs/htest | $(BUILT_PYTHON_SOURCES) |
2074 |
@rm -f htest.tix |
2075 |
./test/hs/htest |
2076 |
|
2077 |
.PHONY: hs-shell-% |
2078 |
hs-shell-%: test/hs/hpc-htools test/hs/hpc-mon-collector \ |
2079 |
$(HS_BUILT_TEST_HELPERS) |
2080 |
@rm -f hpc-htools.tix hpc-mon-collector.tix |
2081 |
HBINARY="./test/hs/hpc-htools" \ |
2082 |
SHELLTESTARGS=$(SHELLTESTARGS) \ |
2083 |
./test/hs/offline-test.sh $* |
2084 |
|
2085 |
.PHONY: hs-shell |
2086 |
hs-shell: test/hs/hpc-htools test/hs/hpc-mon-collector $(HS_BUILT_TEST_HELPERS) |
2087 |
@rm -f hpc-htools.tix hpc-mon-collector.tix |
2088 |
HBINARY="./test/hs/hpc-htools" \ |
2089 |
SHELLTESTARGS=$(SHELLTESTARGS) \ |
2090 |
./test/hs/offline-test.sh |
2091 |
|
2092 |
.PHONY: hs-check |
2093 |
hs-check: hs-tests hs-shell |
2094 |
|
2095 |
# E111: indentation is not a multiple of four |
2096 |
# E121: continuation line indentation is not a multiple of four |
2097 |
# (since our indent level is not 4) |
2098 |
# E125: continuation line does not distinguish itself from next logical line |
2099 |
# (since our indent level is not 4) |
2100 |
# E123: closing bracket does not match indentation of opening bracket's line |
2101 |
# E127: continuation line over-indented for visual indent |
2102 |
# (since our indent level is not 4) |
2103 |
# note: do NOT add E128 here; it's a valid style error in most cases! |
2104 |
# I've seen real errors, but also some cases were we indent wrongly |
2105 |
# due to line length; try to rework the cases where it is triggered, |
2106 |
# instead of silencing it |
2107 |
# E261: at least two spaces before inline comment |
2108 |
# E501: line too long (80 characters) |
2109 |
PEP8_IGNORE = E111,E121,E123,E125,E127,E261,E501 |
2110 |
|
2111 |
# For excluding pep8 expects filenames only, not whole paths |
2112 |
PEP8_EXCLUDE = $(subst $(space),$(comma),$(strip $(notdir $(BUILT_PYTHON_SOURCES)))) |
2113 |
|
2114 |
LINT_TARGETS = pylint pylint-qa pylint-test |
2115 |
if HAS_PEP8 |
2116 |
LINT_TARGETS += pep8 |
2117 |
endif |
2118 |
if HAS_HLINT |
2119 |
LINT_TARGETS += hlint |
2120 |
endif |
2121 |
|
2122 |
.PHONY: lint |
2123 |
lint: $(LINT_TARGETS) |
2124 |
|
2125 |
.PHONY: pylint |
2126 |
pylint: $(GENERATED_FILES) |
2127 |
@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; } |
2128 |
$(PYLINT) $(LINT_OPTS) $(lint_python_code) |
2129 |
|
2130 |
.PHONY: pylint-qa |
2131 |
pylint-qa: $(GENERATED_FILES) |
2132 |
@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; } |
2133 |
cd $(top_srcdir)/qa && \ |
2134 |
PYTHONPATH=$(abs_top_srcdir) $(PYLINT) $(LINT_OPTS) \ |
2135 |
--rcfile ../pylintrc $(patsubst qa/%.py,%,$(qa_scripts)) |
2136 |
# FIXME: lint all test code, not just the newly added test support |
2137 |
pylint-test: $(GENERATED_FILES) |
2138 |
@test -n "$(PYLINT)" || { echo 'pylint' not found during configure; exit 1; } |
2139 |
cd $(top_srcdir) && \ |
2140 |
PYTHONPATH=.:./test/py $(PYLINT) $(LINT_OPTS) \ |
2141 |
--rcfile=pylintrc-test $(python_test_support) |
2142 |
|
2143 |
.PHONY: pep8 |
2144 |
pep8: $(GENERATED_FILES) |
2145 |
@test -n "$(PEP8)" || { echo 'pep8' not found during configure; exit 1; } |
2146 |
$(PEP8) --ignore='$(PEP8_IGNORE)' --exclude='$(PEP8_EXCLUDE)' \ |
2147 |
--repeat $(pep8_python_code) |
2148 |
|
2149 |
# FIXME: remove ignore "Use void" when GHC 6.x is deprecated |
2150 |
HLINT_EXCLUDES = src/Ganeti/THH.hs test/hs/hpc-htools.hs |
2151 |
.PHONY: hlint |
2152 |
hlint: $(HS_BUILT_SRCS) src/lint-hints.hs |
2153 |
@test -n "$(HLINT)" || { echo 'hlint' not found during configure; exit 1; } |
2154 |
@rm -f doc/hs-lint.html |
2155 |
if tty -s; then C="-c"; else C=""; fi; \ |
2156 |
$(HLINT) --utf8 --report=doc/hs-lint.html --cross $$C \ |
2157 |
--ignore "Use first" \ |
2158 |
--ignore "Use &&&" \ |
2159 |
--ignore "Use void" \ |
2160 |
--ignore "Reduce duplication" \ |
2161 |
--hint src/lint-hints \ |
2162 |
$(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS)) |
2163 |
@if [ ! -f doc/hs-lint.html ]; then \ |
2164 |
echo "All good" > doc/hs-lint.html; \ |
2165 |
fi |
2166 |
|
2167 |
# a dist hook rule for updating the vcs-version file; this is |
2168 |
# hardcoded due to where it needs to build the file... |
2169 |
dist-hook: |
2170 |
$(MAKE) $(AM_MAKEFLAGS) regen-vcs-version |
2171 |
rm -f $(top_distdir)/vcs-version |
2172 |
cp -p $(srcdir)/vcs-version $(top_distdir) |
2173 |
|
2174 |
# a distcheck hook rule for catching revision control directories |
2175 |
distcheck-hook: |
2176 |
if find $(top_distdir) -name .svn -or -name .git | grep .; then \ |
2177 |
echo "Found revision control files in final archive." 1>&2; \ |
2178 |
exit 1; \ |
2179 |
fi |
2180 |
if find $(top_distdir) -name '*.py[co]' | grep .; then \ |
2181 |
echo "Found Python byte code in final archive." 1>&2; \ |
2182 |
exit 1; \ |
2183 |
fi |
2184 |
if find $(top_distdir) -name '*~' | grep .; then \ |
2185 |
echo "Found backup files in final archive." 1>&2; \ |
2186 |
exit 1; \ |
2187 |
fi |
2188 |
# Empty files or directories should not be distributed. They can cause |
2189 |
# unnecessary warnings for packagers. Directories used by automake during |
2190 |
# distcheck must be excluded. |
2191 |
if find $(top_distdir) -empty -and -not \( \ |
2192 |
-path $(top_distdir)/_build -or \ |
2193 |
-path $(top_distdir)/_inst \) | grep .; then \ |
2194 |
echo "Found empty files or directories in final archive." 1>&2; \ |
2195 |
exit 1; \ |
2196 |
fi |
2197 |
if test -e $(top_distdir)/doc/man-html; then \ |
2198 |
echo "Found documentation including man pages in final archive" >&2; \ |
2199 |
exit 1; \ |
2200 |
fi |
2201 |
|
2202 |
# Backwards compatible distcheck-release target |
2203 |
distcheck-release: distcheck |
2204 |
|
2205 |
distrebuildcheck: dist |
2206 |
set -e; \ |
2207 |
builddir=$$(mktemp -d $(abs_srcdir)/distrebuildcheck.XXXXXXX); \ |
2208 |
trap "echo Removing $$builddir; cd $(abs_srcdir); rm -rf $$builddir" EXIT; \ |
2209 |
cd $$builddir; \ |
2210 |
tar xzf $(abs_srcdir)/$(distdir).tar.gz; \ |
2211 |
cd $(distdir); \ |
2212 |
./configure; \ |
2213 |
$(MAKE) maintainer-clean; \ |
2214 |
cp $(abs_srcdir)/vcs-version .; \ |
2215 |
./configure; \ |
2216 |
$(MAKE) $(AM_MAKEFLAGS) |
2217 |
|
2218 |
dist-release: dist |
2219 |
set -e; \ |
2220 |
for i in $(DIST_ARCHIVES); do \ |
2221 |
echo -n "Checking $$i ... "; \ |
2222 |
autotools/check-tar < $$i; \ |
2223 |
echo OK; \ |
2224 |
done |
2225 |
|
2226 |
install-exec-local: |
2227 |
@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \ |
2228 |
"$(DESTDIR)${localstatedir}/log/ganeti" \ |
2229 |
"$(DESTDIR)${localstatedir}/run/ganeti" |
2230 |
for dir in $(SYMLINK_TARGET_DIRS); do \ |
2231 |
@mkdir_p@ $(DESTDIR)$$dir; \ |
2232 |
done |
2233 |
$(LN_S) -f $(sysconfdir)/ganeti/lib $(DESTDIR)$(defaultversiondir) |
2234 |
$(LN_S) -f $(sysconfdir)/ganeti/share $(DESTDIR)$(defaultversionedsharedir) |
2235 |
for prog in $(HS_BIN_ROLES); do \ |
2236 |
$(LN_S) -f $(defaultversiondir)$(exec_prefix)/bin/$$prog $(DESTDIR)$(exec_prefix)/bin/$$prog; \ |
2237 |
done |
2238 |
$(LN_S) -f $(defaultversiondir)$(libdir)/ganeti/iallocators/hail $(DESTDIR)$(libdir)/ganeti/iallocators/hail |
2239 |
for prog in $(all_sbin_scripts); do \ |
2240 |
$(LN_S) -f $(defaultversiondir)$(exec_prefix)/sbin/$$prog $(DESTDIR)$(exec_prefix)/sbin/$$prog; \ |
2241 |
done |
2242 |
for prog in $(gnt_scripts_basenames); do \ |
2243 |
$(LN_S) -f $(defaultversionedsharedir)/$$prog $(DESTDIR)$(exec_prefix)/sbin/$$prog; \ |
2244 |
done |
2245 |
for prog in $(pkglib_python_basenames); do \ |
2246 |
$(LN_S) -f $(defaultversionedsharedir)/$$prog $(DESTDIR)$(libdir)/ganeti/$$prog; \ |
2247 |
done |
2248 |
for prog in $(tools_python_basenames); do \ |
2249 |
$(LN_S) -f $(defaultversionedsharedir)/$$prog $(DESTDIR)$(libdir)/ganeti/tools/$$prog; \ |
2250 |
done |
2251 |
for prog in $(tools_basenames); do \ |
2252 |
$(LN_S) -f $(defaultversiondir)/$(libdir)/ganeti/tools/$$prog $(DESTDIR)$(libdir)/ganeti/tools/$$prog; \ |
2253 |
done |
2254 |
if ! test -n '$(ENABLE_MANPAGES)'; then \ |
2255 |
for man in $(manfullpath); do \ |
2256 |
$(LN_S) -f $(defaultversionedsharedir)$(datarootdir)/man/$$man $(DESTDIR)$(datarootdir)/man/$$man; \ |
2257 |
done; \ |
2258 |
fi |
2259 |
for prog in $(myexeclib_scripts_basenames); do \ |
2260 |
$(LN_S) -f $(defaultversiondir)$(libdir)/ganeti/$$prog $(DESTDIR)$(libdir)/ganeti/$$prog; \ |
2261 |
done |
2262 |
if INSTALL_SYMLINKS |
2263 |
$(LN_S) -f $(versionedsharedir) $(DESTDIR)$(sysconfdir)/ganeti/share |
2264 |
$(LN_S) -f $(versiondir) $(DESTDIR)$(sysconfdir)/ganeti/lib |
2265 |
endif |
2266 |
|
2267 |
.PHONY: apidoc |
2268 |
if WANT_HSAPIDOC |
2269 |
apidoc: py-apidoc hs-apidoc |
2270 |
else |
2271 |
apidoc: py-apidoc |
2272 |
endif |
2273 |
|
2274 |
.PHONY: py-apidoc |
2275 |
py-apidoc: epydoc.conf $(RUN_IN_TEMPDIR) $(GENERATED_FILES) |
2276 |
env - PATH="$$PATH" PYTHONPATH="$$PYTHONPATH" \ |
2277 |
$(RUN_IN_TEMPDIR) epydoc -v \ |
2278 |
--conf $(CURDIR)/epydoc.conf \ |
2279 |
--output $(CURDIR)/$(APIDOC_PY_DIR) |
2280 |
|
2281 |
.PHONY: hs-apidoc |
2282 |
hs-apidoc: $(APIDOC_HS_DIR)/index.html |
2283 |
|
2284 |
$(APIDOC_HS_DIR)/index.html: $(HS_LIBTESTBUILT_SRCS) Makefile |
2285 |
@test -n "$(HSCOLOUR)" || \ |
2286 |
{ echo 'HsColour' not found during configure; exit 1; } |
2287 |
@test -n "$(HADDOCK)" || \ |
2288 |
{ echo 'haddock' not found during configure; exit 1; } |
2289 |
rm -rf $(APIDOC_HS_DIR)/* |
2290 |
for i in $(ALL_APIDOC_HS_DIRS); do \ |
2291 |
@mkdir_p@ $$i; \ |
2292 |
$(HSCOLOUR) -print-css > $$i/hscolour.css; \ |
2293 |
done |
2294 |
set -e ; \ |
2295 |
export LC_ALL=en_US.UTF-8; \ |
2296 |
OPTGHC="--optghc=-isrc --optghc=-itest/hs"; \ |
2297 |
if [ "$(HS_PARALLEL3)" ]; \ |
2298 |
then OPTGHC="$$OPTGHC --optghc=$(HS_PARALLEL3)"; \ |
2299 |
fi; \ |
2300 |
if [ "$(HS_REGEX_PCRE)" ]; \ |
2301 |
then OPTGHC="$$OPTGHC --optghc=$(HS_REGEX_PCRE)"; \ |
2302 |
fi; \ |
2303 |
for file in $(HS_LIBTESTBUILT_SRCS); do \ |
2304 |
f_nosrc=$${file##src/}; \ |
2305 |
f_notst=$${f_nosrc##test/hs/}; \ |
2306 |
f_html=$${f_notst%%.hs}.html; \ |
2307 |
$(HSCOLOUR) -css -anchor $$file > $(APIDOC_HS_DIR)/$$f_html ; \ |
2308 |
done ; \ |
2309 |
$(HADDOCK) --odir $(APIDOC_HS_DIR) --html --ignore-all-exports -w \ |
2310 |
-t ganeti -p src/haddock-prologue \ |
2311 |
--source-module="%{MODULE/.//}.html" \ |
2312 |
--source-entity="%{MODULE/.//}.html#%{NAME}" \ |
2313 |
$$OPTGHC \ |
2314 |
$(HS_LIBTESTBUILT_SRCS) |
2315 |
|
2316 |
.PHONY: TAGS |
2317 |
TAGS: $(GENERATED_FILES) |
2318 |
rm -f TAGS |
2319 |
$(GHC) -e ":etags" -v0 \ |
2320 |
$(filter-out -O -Werror,$(HFLAGS)) \ |
2321 |
$(HS_PARALLEL3) $(HS_REGEX_PCRE) \ |
2322 |
$(HS_LIBTEST_SRCS) |
2323 |
find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \ |
2324 |
-path './daemons/ganeti-*' -o -path './tools/*' -o \ |
2325 |
-path './qa/*.py' | \ |
2326 |
etags -l python -a - |
2327 |
|
2328 |
.PHONY: coverage |
2329 |
|
2330 |
COVERAGE_TESTS= |
2331 |
if WANT_HTOOLS |
2332 |
COVERAGE_TESTS += hs-coverage |
2333 |
endif |
2334 |
if PY_UNIT |
2335 |
COVERAGE_TESTS += py-coverage |
2336 |
endif |
2337 |
|
2338 |
coverage: $(COVERAGE_TESTS) |
2339 |
|
2340 |
.PHONY: py-coverage |
2341 |
py-coverage: $(GENERATED_FILES) $(python_tests) |
2342 |
@test -n "$(PYCOVERAGE)" || \ |
2343 |
{ echo 'python-coverage' not found during configure; exit 1; } |
2344 |
set -e; \ |
2345 |
COVERAGE=$(PYCOVERAGE) \ |
2346 |
COVERAGE_FILE=$(CURDIR)/$(COVERAGE_PY_DIR)/data \ |
2347 |
TEXT_COVERAGE=$(CURDIR)/$(COVERAGE_PY_DIR)/report.txt \ |
2348 |
HTML_COVERAGE=$(CURDIR)/$(COVERAGE_PY_DIR) \ |
2349 |
$(PLAIN_TESTS_ENVIRONMENT) \ |
2350 |
$(abs_top_srcdir)/autotools/gen-py-coverage \ |
2351 |
$(python_tests) |
2352 |
|
2353 |
.PHONY: hs-coverage |
2354 |
hs-coverage: $(haskell_tests) test/hs/hpc-htools test/hs/hpc-mon-collector |
2355 |
rm -f *.tix |
2356 |
$(MAKE) $(AM_MAKEFLAGS) hs-check |
2357 |
@mkdir_p@ $(COVERAGE_HS_DIR) |
2358 |
hpc sum --union $(HPCEXCL) \ |
2359 |
htest.tix hpc-htools.tix hpc-mon-collector.tix > coverage-hs.tix |
2360 |
hpc markup --destdir=$(COVERAGE_HS_DIR) coverage-hs.tix |
2361 |
hpc report coverage-hs.tix | tee $(COVERAGE_HS_DIR)/report.txt |
2362 |
$(LN_S) -f hpc_index.html $(COVERAGE_HS_DIR)/index.html |
2363 |
|
2364 |
# Special "kind-of-QA" target for htools, needs special setup (all |
2365 |
# tools compiled with -fhpc) |
2366 |
.PHONY: live-test |
2367 |
live-test: all |
2368 |
set -e ; \ |
2369 |
cd src; \ |
2370 |
rm -f .hpc; $(LN_S) ../.hpc .hpc; \ |
2371 |
rm -f *.tix *.mix; \ |
2372 |
./live-test.sh; \ |
2373 |
hpc sum --union $(HPCEXCL) $(addsuffix .tix,$(HS_PROGS:src/%=%)) \ |
2374 |
--output=live-test.tix ; \ |
2375 |
@mkdir_p@ ../$(COVERAGE_HS_DIR) ; \ |
2376 |
hpc markup --destdir=../$(COVERAGE_HS_DIR) live-test \ |
2377 |
--srcdir=.. $(HPCEXCL) ; \ |
2378 |
hpc report --srcdir=.. live-test $(HPCEXCL) |
2379 |
|
2380 |
commit-check: autotools-check distcheck lint apidoc |
2381 |
|
2382 |
autotools-check: |
2383 |
TESTDATA_DIR=./test/data shelltest $(SHELLTESTARGS) \ |
2384 |
$(abs_top_srcdir)/test/autotools/*-*.test \ |
2385 |
-- --hide-successes |
2386 |
|
2387 |
.PHONY: gitignore-check |
2388 |
gitignore-check: |
2389 |
@if [ -n "`git status --short`" ]; then \ |
2390 |
echo "Git status is not clean!" 1>&2 ; \ |
2391 |
git status --short; \ |
2392 |
exit 1; \ |
2393 |
fi |
2394 |
|
2395 |
# target to rebuild all man pages (both groff and html output) |
2396 |
.PHONY: man |
2397 |
man: $(man_MANS) $(manhtml) |
2398 |
|
2399 |
# Target that builds all binaries (including those that are not |
2400 |
# rebuilt except when running the tests) |
2401 |
.PHONY: really-all |
2402 |
really-all: all $(check_SCRIPTS) $(haskell_tests) $(HS_ALL_PROGS) |
2403 |
|
2404 |
# we don't need the ancient implicit rules: |
2405 |
%: %,v |
2406 |
%: RCS/%,v |
2407 |
%: RCS/% |
2408 |
%: s.% |
2409 |
%: SCCS/s.% |
2410 |
|
2411 |
-include ./Makefile.local |
2412 |
|
2413 |
# vim: set noet : |