Statistics
| Branch: | Tag: | Revision:

root / Makefile.am @ 6d81475c

History | View | Annotate | Download (9.1 kB)

1 e8230860 Michael Hanselmann
# Ganeti makefile
2 e8230860 Michael Hanselmann
# - Indent with tabs only.
3 e8230860 Michael Hanselmann
# - Keep files sorted; one line per file.
4 e8230860 Michael Hanselmann
# - Directories in lib/ must have their own *dir variable (see hypervisor).
5 e8230860 Michael Hanselmann
# - All directories must be listed DIRS.
6 0a7bed64 Michael Hanselmann
# - Use autogen.sh to generate Makefile.in and configure script.
7 e8230860 Michael Hanselmann
8 e8230860 Michael Hanselmann
# Automake doesn't export these variables before version 1.10.
9 e8230860 Michael Hanselmann
abs_top_builddir = @abs_top_builddir@
10 e8230860 Michael Hanselmann
abs_top_srcdir = @abs_top_srcdir@
11 e8230860 Michael Hanselmann
12 6e06b36c Iustin Pop
ACLOCAL_AMFLAGS = -I autotools
13 e8230860 Michael Hanselmann
DOCBOOK_WRAPPER = $(top_srcdir)/autotools/docbook-wrapper
14 e8230860 Michael Hanselmann
REPLACE_VARS_SED = autotools/replace_vars.sed
15 e8230860 Michael Hanselmann
16 e8230860 Michael Hanselmann
hypervisordir = $(pkgpythondir)/hypervisor
17 ff9efc03 Michael Hanselmann
httpdir = $(pkgpythondir)/http
18 8c229cc7 Oleksiy Mishchenko
rapidir = $(pkgpythondir)/rapi
19 e8230860 Michael Hanselmann
toolsdir = $(pkglibdir)/tools
20 e8230860 Michael Hanselmann
docdir = $(datadir)/doc/$(PACKAGE)
21 e8230860 Michael Hanselmann
22 e8230860 Michael Hanselmann
DIRS = \
23 e8230860 Michael Hanselmann
	autotools \
24 e8230860 Michael Hanselmann
	daemons \
25 e8230860 Michael Hanselmann
	devel \
26 e8230860 Michael Hanselmann
	doc \
27 e8230860 Michael Hanselmann
	doc/examples \
28 e8230860 Michael Hanselmann
	lib \
29 ff9efc03 Michael Hanselmann
	lib/http \
30 e8230860 Michael Hanselmann
	lib/hypervisor \
31 8c229cc7 Oleksiy Mishchenko
	lib/rapi \
32 e8230860 Michael Hanselmann
	man \
33 e8230860 Michael Hanselmann
	qa \
34 e8230860 Michael Hanselmann
	scripts \
35 e8230860 Michael Hanselmann
	test \
36 e8230860 Michael Hanselmann
	test/data \
37 e8230860 Michael Hanselmann
	tools
38 e8230860 Michael Hanselmann
39 2ab2b9f5 Iustin Pop
MAINTAINERCLEANFILES = \
40 2ab2b9f5 Iustin Pop
	$(dochtml) \
41 2ab2b9f5 Iustin Pop
	$(patsubst %.dot,%.png,$(docdot)) \
42 2ab2b9f5 Iustin Pop
	$(maninput)
43 2ab2b9f5 Iustin Pop
44 e8230860 Michael Hanselmann
CLEANFILES = \
45 e8230860 Michael Hanselmann
	autotools/replace_vars.sed \
46 e8230860 Michael Hanselmann
	devel/upload \
47 f72f8622 Iustin Pop
	doc/examples/bash_completion \
48 e8230860 Michael Hanselmann
	doc/examples/ganeti.initd \
49 e8230860 Michael Hanselmann
	doc/examples/ganeti.cron \
50 e8230860 Michael Hanselmann
	lib/*.py[co] \
51 ff9efc03 Michael Hanselmann
	lib/http/*.py[co] \
52 e8230860 Michael Hanselmann
	lib/hypervisor/*.py[co] \
53 8c229cc7 Oleksiy Mishchenko
	lib/rapi/*.py[co] \
54 2ab2b9f5 Iustin Pop
	$(man_MANS) \
55 2ab2b9f5 Iustin Pop
	$(manhtml) \
56 e8230860 Michael Hanselmann
	qa/*.py[co] \
57 e8230860 Michael Hanselmann
	test/*.py[co] \
58 e8230860 Michael Hanselmann
	stamp-directories \
59 e8230860 Michael Hanselmann
	$(nodist_pkgpython_PYTHON)
60 e8230860 Michael Hanselmann
61 e8230860 Michael Hanselmann
nodist_pkgpython_PYTHON = \
62 e8230860 Michael Hanselmann
	lib/_autoconf.py
63 e8230860 Michael Hanselmann
64 e8230860 Michael Hanselmann
pkgpython_PYTHON = \
65 e8230860 Michael Hanselmann
	lib/__init__.py \
66 e8230860 Michael Hanselmann
	lib/backend.py \
67 e8230860 Michael Hanselmann
	lib/bdev.py \
68 e8230860 Michael Hanselmann
	lib/bootstrap.py \
69 e8230860 Michael Hanselmann
	lib/cli.py \
70 e8230860 Michael Hanselmann
	lib/cmdlib.py \
71 e8230860 Michael Hanselmann
	lib/config.py \
72 e8230860 Michael Hanselmann
	lib/constants.py \
73 821d9e43 Michael Hanselmann
	lib/daemon.py \
74 e8230860 Michael Hanselmann
	lib/errors.py \
75 e8230860 Michael Hanselmann
	lib/jqueue.py \
76 8b537bb0 Michael Hanselmann
	lib/jstore.py \
77 e8230860 Michael Hanselmann
	lib/locking.py \
78 e8230860 Michael Hanselmann
	lib/luxi.py \
79 e8230860 Michael Hanselmann
	lib/mcpu.py \
80 e8230860 Michael Hanselmann
	lib/objects.py \
81 e8230860 Michael Hanselmann
	lib/opcodes.py \
82 e8230860 Michael Hanselmann
	lib/rpc.py \
83 e8230860 Michael Hanselmann
	lib/serializer.py \
84 e8230860 Michael Hanselmann
	lib/ssconf.py \
85 e8230860 Michael Hanselmann
	lib/ssh.py \
86 76094e37 Michael Hanselmann
	lib/utils.py \
87 76094e37 Michael Hanselmann
	lib/workerpool.py
88 e8230860 Michael Hanselmann
89 e8230860 Michael Hanselmann
hypervisor_PYTHON = \
90 e8230860 Michael Hanselmann
	lib/hypervisor/__init__.py \
91 e8230860 Michael Hanselmann
	lib/hypervisor/hv_base.py \
92 e8230860 Michael Hanselmann
	lib/hypervisor/hv_fake.py \
93 eb58f9b1 Guido Trotter
	lib/hypervisor/hv_kvm.py \
94 e8230860 Michael Hanselmann
	lib/hypervisor/hv_xen.py
95 e8230860 Michael Hanselmann
96 8c229cc7 Oleksiy Mishchenko
rapi_PYTHON = \
97 8c229cc7 Oleksiy Mishchenko
	lib/rapi/__init__.py \
98 10b207d4 Oleksiy Mishchenko
	lib/rapi/baserlib.py \
99 10b207d4 Oleksiy Mishchenko
	lib/rapi/connector.py \
100 10b207d4 Oleksiy Mishchenko
	lib/rapi/rlib2.py
101 8c229cc7 Oleksiy Mishchenko
102 ff9efc03 Michael Hanselmann
http_PYTHON = \
103 02cab3e7 Michael Hanselmann
	lib/http/__init__.py \
104 be500c29 Michael Hanselmann
	lib/http/auth.py \
105 02cab3e7 Michael Hanselmann
	lib/http/client.py \
106 02cab3e7 Michael Hanselmann
	lib/http/server.py
107 ff9efc03 Michael Hanselmann
108 8c229cc7 Oleksiy Mishchenko
109 f05c99f3 Michael Hanselmann
docrst = \
110 ffa6869f Iustin Pop
	doc/admin.rst \
111 5c0c1eeb Iustin Pop
	doc/design-2.0.rst \
112 4d6443f4 Iustin Pop
	doc/hooks.rst \
113 876860a3 Iustin Pop
	doc/iallocator.rst \
114 28e15341 Iustin Pop
	doc/install.rst \
115 6d81475c Iustin Pop
	doc/rapi.rst \
116 73100cf5 Iustin Pop
	doc/security.rst
117 f05c99f3 Michael Hanselmann
118 2ab2b9f5 Iustin Pop
dochtml = $(patsubst %.rst,%.html,$(docrst))
119 2ab2b9f5 Iustin Pop
120 b8195800 Iustin Pop
docdot = \
121 b8195800 Iustin Pop
	doc/arch-2.0.dot
122 b8195800 Iustin Pop
123 2ab2b9f5 Iustin Pop
doc_DATA = $(dochtml)
124 e8230860 Michael Hanselmann
125 f29266b4 Iustin Pop
noinst_DATA = $(manhtml)
126 f29266b4 Iustin Pop
127 e8230860 Michael Hanselmann
dist_sbin_SCRIPTS = \
128 e8230860 Michael Hanselmann
	daemons/ganeti-noded \
129 e8230860 Michael Hanselmann
	daemons/ganeti-watcher \
130 e8230860 Michael Hanselmann
	daemons/ganeti-masterd \
131 8c229cc7 Oleksiy Mishchenko
	daemons/ganeti-rapi \
132 e8230860 Michael Hanselmann
	scripts/gnt-backup \
133 e8230860 Michael Hanselmann
	scripts/gnt-cluster \
134 e8230860 Michael Hanselmann
	scripts/gnt-debug \
135 e8230860 Michael Hanselmann
	scripts/gnt-instance \
136 e8230860 Michael Hanselmann
	scripts/gnt-job \
137 e8230860 Michael Hanselmann
	scripts/gnt-node \
138 e8230860 Michael Hanselmann
	scripts/gnt-os
139 e8230860 Michael Hanselmann
140 e8230860 Michael Hanselmann
dist_tools_SCRIPTS = \
141 e8230860 Michael Hanselmann
	tools/burnin \
142 e8230860 Michael Hanselmann
	tools/cfgshell \
143 e8230860 Michael Hanselmann
	tools/cfgupgrade \
144 e8230860 Michael Hanselmann
	tools/lvmstrap
145 e8230860 Michael Hanselmann
146 e8230860 Michael Hanselmann
EXTRA_DIST = \
147 2ab2b9f5 Iustin Pop
	$(MAINTAINERCLEANFILES) \
148 e8230860 Michael Hanselmann
	NEWS \
149 e8230860 Michael Hanselmann
	DEVNOTES \
150 e8230860 Michael Hanselmann
	autotools/docbook-wrapper \
151 e8230860 Michael Hanselmann
	devel/upload.in \
152 f05c99f3 Michael Hanselmann
	$(docrst) \
153 b8195800 Iustin Pop
	$(docdot) \
154 f72f8622 Iustin Pop
	doc/examples/bash_completion.in \
155 e8230860 Michael Hanselmann
	doc/examples/ganeti.initd.in \
156 e8230860 Michael Hanselmann
	doc/examples/ganeti.cron.in \
157 e8230860 Michael Hanselmann
	doc/examples/dumb-allocator \
158 0f933d15 Guido Trotter
	doc/locking.txt \
159 e8230860 Michael Hanselmann
	test/testutils.py \
160 e8230860 Michael Hanselmann
	test/mocks.py \
161 e8230860 Michael Hanselmann
	$(dist_TESTS) \
162 e8230860 Michael Hanselmann
	$(TEST_FILES) \
163 e8230860 Michael Hanselmann
	man/footer.sgml \
164 2ab2b9f5 Iustin Pop
	$(mansgml) $(maninput) \
165 e8230860 Michael Hanselmann
	qa/ganeti-qa.py \
166 39e0d19e Michael Hanselmann
	qa/qa-sample.json \
167 e8230860 Michael Hanselmann
	qa/qa_cluster.py \
168 e8230860 Michael Hanselmann
	qa/qa_config.py \
169 e8230860 Michael Hanselmann
	qa/qa_daemon.py \
170 e8230860 Michael Hanselmann
	qa/qa_env.py \
171 e8230860 Michael Hanselmann
	qa/qa_error.py \
172 e8230860 Michael Hanselmann
	qa/qa_instance.py \
173 e8230860 Michael Hanselmann
	qa/qa_node.py \
174 e8230860 Michael Hanselmann
	qa/qa_os.py \
175 a47f574c Oleksiy Mishchenko
	qa/qa_rapi.py \
176 e8230860 Michael Hanselmann
	qa/qa_tags.py \
177 e8230860 Michael Hanselmann
	qa/qa_utils.py
178 e8230860 Michael Hanselmann
179 e8230860 Michael Hanselmann
man_MANS = \
180 e8230860 Michael Hanselmann
	man/ganeti.7 \
181 320d986d Iustin Pop
	man/ganeti-masterd.8 \
182 e8230860 Michael Hanselmann
	man/ganeti-noded.8 \
183 e8230860 Michael Hanselmann
	man/ganeti-os-interface.7 \
184 320d986d Iustin Pop
	man/ganeti-rapi.8 \
185 e8230860 Michael Hanselmann
	man/ganeti-watcher.8 \
186 e8230860 Michael Hanselmann
	man/gnt-backup.8 \
187 e8230860 Michael Hanselmann
	man/gnt-cluster.8 \
188 d3b4cf9f Iustin Pop
	man/gnt-debug.8 \
189 e8230860 Michael Hanselmann
	man/gnt-instance.8 \
190 d3b4cf9f Iustin Pop
	man/gnt-job.8 \
191 e8230860 Michael Hanselmann
	man/gnt-node.8 \
192 e8230860 Michael Hanselmann
	man/gnt-os.8
193 e8230860 Michael Hanselmann
194 2ab2b9f5 Iustin Pop
mansgml = $(patsubst %.7,%.sgml,$(patsubst %.8,%.sgml,$(man_MANS)))
195 2ab2b9f5 Iustin Pop
manhtml = $(patsubst %.sgml,%.html,$(mansgml))
196 2ab2b9f5 Iustin Pop
maninput = $(patsubst %.7,%.7.in,$(patsubst %.8,%.8.in,$(man_MANS))) $(patsubst %.html,%.html.in,$(manhtml))
197 e8230860 Michael Hanselmann
198 e8230860 Michael Hanselmann
TEST_FILES = \
199 e8230860 Michael Hanselmann
	test/data/bdev-both.txt \
200 e8230860 Michael Hanselmann
	test/data/bdev-disk.txt \
201 e8230860 Michael Hanselmann
	test/data/bdev-net.txt \
202 e8230860 Michael Hanselmann
	test/data/proc_drbd8.txt
203 e8230860 Michael Hanselmann
204 e8230860 Michael Hanselmann
dist_TESTS = \
205 6de7c41d Iustin Pop
	test/ganeti.bdev_unittest.py \
206 6de7c41d Iustin Pop
	test/ganeti.cli_unittest.py \
207 6de7c41d Iustin Pop
	test/ganeti.cmdlib_unittest.py \
208 e8230860 Michael Hanselmann
	test/ganeti.config_unittest.py \
209 6de7c41d Iustin Pop
	test/ganeti.constants_unittest.py \
210 e8230860 Michael Hanselmann
	test/ganeti.hooks_unittest.py \
211 6de7c41d Iustin Pop
	test/ganeti.http_unittest.py \
212 e8230860 Michael Hanselmann
	test/ganeti.locking_unittest.py \
213 4cbd4462 Oleksiy Mishchenko
	test/ganeti.rapi.resources_unittest.py \
214 6de7c41d Iustin Pop
	test/ganeti.serializer_unittest.py \
215 6de7c41d Iustin Pop
	test/ganeti.ssh_unittest.py \
216 6de7c41d Iustin Pop
	test/ganeti.utils_unittest.py \
217 6de7c41d Iustin Pop
	test/ganeti.workerpool_unittest.py
218 e8230860 Michael Hanselmann
219 e8230860 Michael Hanselmann
nodist_TESTS =
220 e8230860 Michael Hanselmann
221 e8230860 Michael Hanselmann
TESTS = $(dist_TESTS) $(nodist_TESTS)
222 e8230860 Michael Hanselmann
223 e8230860 Michael Hanselmann
TESTS_ENVIRONMENT = PYTHONPATH=.:$(top_builddir)
224 e8230860 Michael Hanselmann
225 e8230860 Michael Hanselmann
all-local: stamp-directories lib/_autoconf.py devel/upload \
226 e2a2a2eb Iustin Pop
	doc/examples/bash_completion \
227 e8230860 Michael Hanselmann
	doc/examples/ganeti.initd doc/examples/ganeti.cron
228 e8230860 Michael Hanselmann
229 e8230860 Michael Hanselmann
devel/upload: devel/upload.in stamp-directories $(REPLACE_VARS_SED)
230 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
231 e8230860 Michael Hanselmann
	chmod u+x $@
232 e8230860 Michael Hanselmann
233 e2a2a2eb Iustin Pop
doc/examples/%: doc/examples/%.in stamp-directories \
234 e8230860 Michael Hanselmann
		$(REPLACE_VARS_SED)
235 e8230860 Michael Hanselmann
	sed -f $(REPLACE_VARS_SED) < $< > $@
236 e8230860 Michael Hanselmann
237 f05c99f3 Michael Hanselmann
doc/%.html: doc/%.rst
238 2ab2b9f5 Iustin Pop
	@test -n "$(RST2HTML)" || { echo 'rst2html' not found during configure; exit 1; }
239 f05c99f3 Michael Hanselmann
	$(RST2HTML) $< $@
240 f05c99f3 Michael Hanselmann
241 f86e82ef Iustin Pop
doc/%.png: doc/%.dot
242 2ab2b9f5 Iustin Pop
	@test -n "$(DOT)" || { echo 'dot' not found during configure; exit 1; }
243 f86e82ef Iustin Pop
	$(DOT) -Tpng -o $@ $<
244 f86e82ef Iustin Pop
245 f86e82ef Iustin Pop
doc/design-2.0.html: doc/design-2.0.rst doc/arch-2.0.png
246 f86e82ef Iustin Pop
247 2ab2b9f5 Iustin Pop
man/%.7.in man/%.8.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
248 8c7aaa72 Alexander Schreiber
	@test -n "$(DOCBOOK2MAN)" || { echo 'docbook2html' not found during configure; exit 1; }
249 2ab2b9f5 Iustin Pop
	TMPDIR=`mktemp -d` && { \
250 2ab2b9f5 Iustin Pop
	$(DOCBOOK_WRAPPER) "$(DOCBOOK2MAN)" $< $$TMPDIR/$(patsubst man/%.in,%,$@) ; \
251 2ab2b9f5 Iustin Pop
	mv $$TMPDIR/$(patsubst man/%.in,%,$@) $@ ; \
252 2ab2b9f5 Iustin Pop
	rm -rf "$$TMPDIR" ; \
253 2ab2b9f5 Iustin Pop
	}
254 2ab2b9f5 Iustin Pop
255 2ab2b9f5 Iustin Pop
man/%.html.in: man/%.sgml man/footer.sgml $(DOCBOOK_WRAPPER)
256 8c7aaa72 Alexander Schreiber
	@test -n "$(DOCBOOK2HTML)" || { echo 'docbook2html' not found during configure; exit 1; }
257 2ab2b9f5 Iustin Pop
	TMPDIR=`mktemp -d` && { \
258 2ab2b9f5 Iustin Pop
	$(DOCBOOK_WRAPPER) "$(DOCBOOK2HTML) --nochunks" $< $$TMPDIR/$(patsubst man/%.in,%,$@) ; \
259 2ab2b9f5 Iustin Pop
	mv $$TMPDIR/$(patsubst man/%.in,%,$@) $@ ; \
260 2ab2b9f5 Iustin Pop
	rm -rf "$$TMPDIR" ; \
261 2ab2b9f5 Iustin Pop
	}
262 2ab2b9f5 Iustin Pop
263 2ab2b9f5 Iustin Pop
man/%.7: man/%.7.in stamp-directories $(REPLACE_VARS_SED)
264 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
265 e8230860 Michael Hanselmann
266 2ab2b9f5 Iustin Pop
man/%.8: man/%.8.in stamp-directories $(REPLACE_VARS_SED)
267 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
268 e8230860 Michael Hanselmann
269 2ab2b9f5 Iustin Pop
man/%.html: man/%.html.in stamp-directories $(REPLACE_VARS_SED)
270 2ab2b9f5 Iustin Pop
	sed -f $(REPLACE_VARS_SED) < $< > $@
271 f29266b4 Iustin Pop
272 e8230860 Michael Hanselmann
man/footer.sgml $(TESTS): srclinks
273 e8230860 Michael Hanselmann
274 6d81475c Iustin Pop
$(TESTS): ganeti lib/_autoconf.py
275 e8230860 Michael Hanselmann
276 e8230860 Michael Hanselmann
lib/_autoconf.py: Makefile stamp-directories
277 e8230860 Michael Hanselmann
	set -e; \
278 e8230860 Michael Hanselmann
	{ echo '# This file is automatically generated, do not edit!'; \
279 e8230860 Michael Hanselmann
	  echo '#'; \
280 67047322 Iustin Pop
	  echo ''; \
281 67047322 Iustin Pop
	  echo '"""Build-time configuration for Ganeti.'; \
282 67047322 Iustin Pop
	  echo '';\
283 67047322 Iustin Pop
	  echo 'This file is autogenerated by the build process.'; \
284 67047322 Iustin Pop
	  echo 'For any changes you need to re-run ./configure (and'; \
285 67047322 Iustin Pop
	  echo 'not edit by hand).'; \
286 67047322 Iustin Pop
	  echo ''; \
287 67047322 Iustin Pop
	  echo '"""'; \
288 67047322 Iustin Pop
	  echo ''; \
289 e8230860 Michael Hanselmann
	  echo "PACKAGE_VERSION = '$(PACKAGE_VERSION)'"; \
290 e8230860 Michael Hanselmann
	  echo "VERSION_MAJOR = '$(VERSION_MAJOR)'"; \
291 e8230860 Michael Hanselmann
	  echo "VERSION_MINOR = '$(VERSION_MINOR)'"; \
292 e8230860 Michael Hanselmann
	  echo "VERSION_REVISION = '$(VERSION_REVISION)'"; \
293 e8230860 Michael Hanselmann
	  echo "VERSION_SUFFIX = '$(VERSION_SUFFIX)'"; \
294 e8230860 Michael Hanselmann
	  echo "VERSION_FULL = '$(VERSION_FULL)'"; \
295 e8230860 Michael Hanselmann
	  echo "LOCALSTATEDIR = '$(localstatedir)'"; \
296 e8230860 Michael Hanselmann
	  echo "SYSCONFDIR = '$(sysconfdir)'"; \
297 e8230860 Michael Hanselmann
	  echo "SSH_INITD_SCRIPT = '$(SSH_INITD_SCRIPT)'"; \
298 e8230860 Michael Hanselmann
	  echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
299 e8230860 Michael Hanselmann
	  echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
300 e8230860 Michael Hanselmann
	  echo "XEN_KERNEL = '$(XEN_KERNEL)'"; \
301 e8230860 Michael Hanselmann
	  echo "XEN_INITRD = '$(XEN_INITRD)'"; \
302 e8230860 Michael Hanselmann
	  echo "FILE_STORAGE_DIR = '$(FILE_STORAGE_DIR)'"; \
303 e8230860 Michael Hanselmann
	  echo "IALLOCATOR_SEARCH_PATH = [$(IALLOCATOR_SEARCH_PATH)]"; \
304 7e2c5b9e Guido Trotter
	  echo "KVM_PATH = '$(KVM_PATH)'"; \
305 30e42c4e Guido Trotter
	  echo "KVM_MIGRATION_PORT = '$(KVM_MIGRATION_PORT)'"; \
306 14aa53cb Guido Trotter
	  echo "SOCAT_PATH = '$(SOCAT_PATH)'"; \
307 e8230860 Michael Hanselmann
	} > $@
308 e8230860 Michael Hanselmann
309 e8230860 Michael Hanselmann
$(REPLACE_VARS_SED): Makefile stamp-directories
310 e8230860 Michael Hanselmann
	set -e; \
311 e8230860 Michael Hanselmann
	{ echo 's#@PREFIX@#$(prefix)#g'; \
312 e8230860 Michael Hanselmann
	  echo 's#@SYSCONFDIR@#$(sysconfdir)#g'; \
313 e8230860 Michael Hanselmann
	  echo 's#@LOCALSTATEDIR@#$(localstatedir)#g'; \
314 e8230860 Michael Hanselmann
	  echo 's#@SBINDIR@#$(sbindir)#g'; \
315 e8230860 Michael Hanselmann
	  echo 's#@GANETI_VERSION@#$(PACKAGE_VERSION)#g'; \
316 e8230860 Michael Hanselmann
	  echo 's#@CUSTOM_XEN_KERNEL@#$(XEN_KERNEL)#g'; \
317 e8230860 Michael Hanselmann
	  echo 's#@CUSTOM_XEN_INITRD@#$(XEN_INITRD)#g'; \
318 d3b4cf9f Iustin Pop
	  echo 's#@RPL_FILE_STORAGE_DIR@#$(FILE_STORAGE_DIR)#g'; \
319 e8230860 Michael Hanselmann
	} > $@
320 e8230860 Michael Hanselmann
321 e8230860 Michael Hanselmann
# We need to create symlinks because "make distcheck" will not install Python
322 e8230860 Michael Hanselmann
# files when building.
323 e8230860 Michael Hanselmann
#.PHONY: srclinks
324 e8230860 Michael Hanselmann
srclinks: stamp-directories
325 e8230860 Michael Hanselmann
	set -e; \
326 ff9efc03 Michael Hanselmann
	for i in man/footer.sgml $(pkgpython_PYTHON) $(hypervisor_PYTHON) \
327 ff9efc03 Michael Hanselmann
			$(rapi_PYTHON) $(http_PYTHON); do \
328 e8230860 Michael Hanselmann
		if test ! -f $$i -a -f $(abs_top_srcdir)/$$i; then \
329 e8230860 Michael Hanselmann
			$(LN_S) $(abs_top_srcdir)/$$i $$i; \
330 e8230860 Michael Hanselmann
		fi; \
331 e8230860 Michael Hanselmann
	done
332 97a37b3f Michael Hanselmann
333 9ff7e35c Michael Hanselmann
.PHONY: ganeti
334 9ff7e35c Michael Hanselmann
ganeti:
335 01f3e7b1 Iustin Pop
	cd $(top_builddir) && test -h "$@" || { rm -f $@ && $(LN_S) lib $@; }
336 9ff7e35c Michael Hanselmann
337 b6f2e47f Iustin Pop
# a dist hook rule for catching revision control directories
338 b6f2e47f Iustin Pop
distcheck-hook:
339 b6f2e47f Iustin Pop
	if find $(top_distdir) | grep -F -e '.svn' -e '.git'; then \
340 b6f2e47f Iustin Pop
		echo "Found revision control files in final archive" 1>&2 ; \
341 b6f2e47f Iustin Pop
		exit 1; \
342 b6f2e47f Iustin Pop
	fi
343 b6f2e47f Iustin Pop
344 8925faaa Iustin Pop
install-exec-local:
345 0d93b082 Michael Hanselmann
	@mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \
346 2fa9f1dd Michael Hanselmann
	  "$(DESTDIR)${localstatedir}/log/ganeti" \
347 2fa9f1dd Michael Hanselmann
	  "$(DESTDIR)${localstatedir}/run/ganeti"
348 e8230860 Michael Hanselmann
349 e8230860 Michael Hanselmann
stamp-directories: Makefile
350 e8230860 Michael Hanselmann
	@mkdir_p@ $(DIRS)
351 e8230860 Michael Hanselmann
	touch $@
352 e8230860 Michael Hanselmann
353 d128fdb6 Iustin Pop
.PHONY: apidoc
354 d128fdb6 Iustin Pop
apidoc:
355 d128fdb6 Iustin Pop
	test -e doc/api || mkdir doc/api
356 975e07c6 Iustin Pop
	TMPDIR=`mktemp -d ` && { \
357 d128fdb6 Iustin Pop
		cp -r scripts daemons lib $$TMPDIR && \
358 d128fdb6 Iustin Pop
		( \
359 975e07c6 Iustin Pop
			CDIR=`pwd` && \
360 d128fdb6 Iustin Pop
			cd $$TMPDIR && \
361 d128fdb6 Iustin Pop
			mv lib ganeti && \
362 c41eea6e Iustin Pop
			epydoc -v --conf $$CDIR/epydoc.conf -o $$CDIR/doc/api \
363 d128fdb6 Iustin Pop
		) ; \
364 d128fdb6 Iustin Pop
		rm -rf $$TMPDIR ; \
365 d128fdb6 Iustin Pop
	}
366 d128fdb6 Iustin Pop
367 e8230860 Michael Hanselmann
# vim: set noet :