File: Makefile.am

package info (click to toggle)
libvirt 0.4.6-10%2Blenny2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 29,084 kB
  • ctags: 8,508
  • sloc: ansic: 75,483; xml: 11,901; sh: 10,518; python: 4,309; makefile: 863; perl: 356; awk: 48; sed: 16
file content (198 lines) | stat: -rw-r--r-- 5,793 bytes parent folder | download
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
## Process this file with automake to produce Makefile.in

INCLUDES = $(LIBVIRT_FEATURES)

DAEMON_SOURCES =					\
		event.c event.h				\
		qemud.c qemud.h				\
		remote.c				\
		remote_dispatch_prototypes.h		\
		remote_dispatch_localvars.h		\
		remote_dispatch_proc_switch.h		\
		remote_protocol.h remote_protocol.c	\
		$(srcdir)/../src/util-lib.c

AVAHI_SOURCES =						\
		mdns.c mdns.h

EXTRA_DIST =						\
	default-network.xml				\
	remote_generate_stubs.pl rpcgen_fix.pl		\
	remote_protocol.x				\
	libvirtd.conf					\
	libvirtd.init.in				\
	libvirtd.policy					\
	libvirtd.sasl					\
	libvirtd.sysconf				\
	libvirtd.aug                                    \
	libvirtd_qemu.aug                               \
	test_libvirtd.aug                               \
	test_libvirtd_qemu.aug                          \
	$(AVAHI_SOURCES)				\
	$(DAEMON_SOURCES)

if RPCGEN
SUFFIXES = .x
.x.c:
	rm -f $@
	rpcgen -c -o $@ $<
if GLIBC_RPCGEN
	mv $@ $@.bak
	perl -w rpcgen_fix.pl < $@.bak > $@
endif

.x.h:
	rm -f $@
	rpcgen -h -o $@ $<
if GLIBC_RPCGEN
	perl -i -p -e 's/\t/        /g' $@
endif
endif

remote_protocol.c: remote_protocol.h

if WITH_LIBVIRTD

UUID=$(shell uuidgen)

sbin_PROGRAMS = libvirtd

confdir = $(sysconfdir)/libvirt/
conf_DATA = libvirtd.conf

augeasdir = $(datadir)/augeas/lenses
augeas_DATA = libvirtd.aug libvirtd_qemu.aug

augeastestsdir = $(datadir)/augeas/lenses/tests
augeastests_DATA = test_libvirtd.aug test_libvirtd_qemu.aug

libvirtd_SOURCES = $(DAEMON_SOURCES)

#-D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED=1 -D_POSIX_C_SOURCE=199506L
libvirtd_CFLAGS = \
	-I$(top_srcdir)/gnulib/lib -I../gnulib/lib \
	-I$(top_srcdir)/include -I$(top_builddir)/include \
	-I$(top_srcdir)/src \
	$(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \
	$(POLKIT_CFLAGS) \
	$(WARN_CFLAGS) -DLOCAL_STATE_DIR="\"$(localstatedir)\"" \
	$(COVERAGE_CFLAGS) \
	-DSYSCONF_DIR="\"$(sysconfdir)\"" \
	-DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \
	-DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\"" \
	-DGETTEXT_PACKAGE=\"$(PACKAGE)\"

libvirtd_LDFLAGS = \
	$(WARN_CFLAGS) $(LIBXML_LIBS) $(GNUTLS_LIBS) $(SASL_LIBS) \
	$(COVERAGE_LDFLAGS) \
	$(POLKIT_LIBS)

libvirtd_DEPENDENCIES = ../src/libvirt.la
libvirtd_LDADD = ../src/libvirt.la ../gnulib/lib/libgnu.la

if HAVE_POLKIT
policydir = $(datadir)/PolicyKit/policy
endif

if HAVE_AVAHI
libvirtd_SOURCES += $(AVAHI_SOURCES)
libvirtd_CFLAGS += $(AVAHI_CFLAGS)
libvirtd_LDADD += $(AVAHI_LIBS)
endif

default_xml_dest = libvirt/qemu/networks/default.xml
install-data-local: install-init install-data-sasl install-data-polkit
	mkdir -p $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart
	$(INSTALL_DATA) $(srcdir)/default-network.xml \
	  $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
	sed -i -e "s,</name>,</name>\n  <uuid>$(UUID)</uuid>," \
	  $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
	test -e $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml || \
           ln -s ../default.xml \
	    $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
	mkdir -p $(DESTDIR)$(localstatedir)/log/libvirt/qemu
	mkdir -p $(DESTDIR)$(localstatedir)/run/libvirt
	mkdir -p $(DESTDIR)$(localstatedir)/lib/libvirt

uninstall-local:: uninstall-init uninstall-data-sasl install-data-polkit
	rm -f $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart/default.xml
	rm -f $(DESTDIR)$(sysconfdir)/$(default_xml_dest)
	rmdir $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/autostart || :
	rmdir $(DESTDIR)$(localstatedir)/log/libvirt/qemu || :
	rmdir $(DESTDIR)$(localstatedir)/run/libvirt || :
	rmdir $(DESTDIR)$(localstatedir)/lib/libvirt || :

if HAVE_SASL
install-data-sasl:: install-init
	mkdir -p $(DESTDIR)$(sysconfdir)/sasl2/
	$(INSTALL_DATA) $(srcdir)/libvirtd.sasl $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf

uninstall-data-sasl:: install-init
	rm -f $(DESTDIR)$(sysconfdir)/sasl2/libvirt.conf
	rmdir $(DESTDIR)$(sysconfdir)/sasl2/
else
install-data-sasl:
uninstall-data-sasl:
endif

if HAVE_POLKIT
install-data-polkit:: install-init
	mkdir -p $(DESTDIR)$(policydir)
	$(INSTALL_DATA) libvirtd.policy $(DESTDIR)$(policydir)/org.libvirt.unix.policy
uninstall-data-polkit:: install-init
	rm -f $(DESTDIR)$(policydir)/org.libvirt.unix.policy
else
install-data-polkit::
uninstall-data-polkit::
endif


remote.c: remote_dispatch_prototypes.h \
	  remote_dispatch_localvars.h \
	  remote_dispatch_proc_switch.h

remote_dispatch_prototypes.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x
	perl -w $(srcdir)/remote_generate_stubs.pl -i $(srcdir)/remote_protocol.x > $@

remote_dispatch_localvars.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x
	perl -w $(srcdir)/remote_generate_stubs.pl -v $(srcdir)/remote_protocol.x > $@

remote_dispatch_proc_switch.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x
	perl -w $(srcdir)/remote_generate_stubs.pl -w $(srcdir)/remote_protocol.x > $@

if LIBVIRT_INIT_SCRIPTS_RED_HAT
install-init: libvirtd.init
	mkdir -p $(DESTDIR)$(sysconfdir)/rc.d/init.d
	$(INSTALL_SCRIPT) libvirtd.init \
	  $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd
	mkdir -p $(DESTDIR)$(sysconfdir)/sysconfig
	$(INSTALL_SCRIPT) $(srcdir)/libvirtd.sysconf \
	  $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd

uninstall-init:
	rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirtd \
		$(DESTDIR)$(sysconfdir)/sysconfig/libvirtd

libvirtd.init: libvirtd.init.in
	sed						\
	    -e s!\@localstatedir\@!@localstatedir@!g	\
	    -e s!\@sbindir\@!@sbindir@!g		\
	    -e s!\@sysconfdir\@!@sysconfdir@!g		\
	    < $< > $@-t
	chmod a+x $@-t
	mv $@-t $@

check-local:
	if [ -x $(AUGPARSE) ]; then $(AUGPARSE) -I $(srcdir) test_libvirtd.aug ; fi

else

install-init:
uninstall-init:

endif # DBUS_INIT_SCRIPTS_RED_HAT

endif # WITH_LIBVIRTD

CLEANFILES = libvirtd.init
CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda