This repository has been archived by the owner on Aug 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile.in
75 lines (61 loc) · 1.87 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
CPUS ?= 1
MEMORY ?= 1024
DISK ?= 2
distdir = @PACKAGE_TARNAME@-@PACKAGE_VERSION@
prefix = @prefix@
datarootdir = @datarootdir@
datadir = @datadir@
imagedir = @datadir@/eucalyptus/service-images
define destroyvm
virsh undefine $<; virsh destroy $<; true
endef
.PHONY: all build build-py clean dist distclean distdir image install install-py
all: build
build: build/image/eucalyptus-service-image.raw build-py
build-py: setup.py $(wildcard bin/*) $(wildcard esitoolsupport/*)
@PYTHON@ setup.py build
build/image/eucalyptus-service-image.raw: eucalyptus-service-image.ks
mkdir -p build/image
$(destroyvm)
@PYTHON@ -c 'import pty, sys; pty.spawn(sys.argv[1:])' \
@VIRT_INSTALL@ --name $< \
--initrd-inject $< \
--extra-args ks="file:/$< console=tty0 console=ttyS0,115200 serial" \
--location @INSTALL_TREE@ \
--disk $@,format=raw,size=$(DISK) \
--vcpus $(CPUS) --ram $(MEMORY) \
--graphics none \
--hvm --accelerate --noreboot \
; STATUS=$$?; $(destroyvm); exit $$STATUS
@VIRT_SYSPREP@ -a $@
@VIRT_SPARSIFY@ $@ [email protected]
mv [email protected] $@
%.tar.xz: %.raw
tar -cJS -C $$(dirname $<) -f $@ $$(basename $<)
install: build/image/eucalyptus-service-image.tar.xz install-py
install -D -m 0644 $< $(DESTDIR)$(imagedir)/@PACKAGE_TARNAME@-@[email protected]
ifdef DESTDIR
install-py: build-py
@PYTHON@ setup.py install -O1 --skip-build --root $(DESTDIR)
else
install-py: build-py
@PYTHON@ setup.py install -O1 --skip-build
endif
distdir: bin configure configure.ac esitoolsupport eucalyptus-service-image.ks.in IMAGE-LICENSE Makefile.in README.md setup.py
rm -rf $(distdir)
mkdir -p $(distdir)
cp -pR $^ $(distdir)
dist: distdir
mkdir -p dist
tar -cJ -f dist/$(distdir).tar.xz $(distdir)
rm -rf $(distdir)
clean:
rm -rf build
rm -rf dist
rm -rf $(distdir)
distclean: clean
rm -f Makefile
rm -rf autom4te.cache
rm -f config.log
rm -f config.status
rm -f *.ks