1
## Copyright (C) 2005-2012 Red Hat, Inc.
2
## See COPYING.LIB for the License of this software
5
-I$(top_builddir)/include -I$(top_srcdir)/include \
6
-I$(top_builddir)/gnulib/lib -I$(top_srcdir)/gnulib/lib \
7
-I$(top_builddir)/src -I$(top_srcdir)/src \
8
-I$(top_srcdir)/src/util \
12
POD2MAN = pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)"
15
libvirt_win_icon_16x16.ico \
16
libvirt_win_icon_32x32.ico \
17
libvirt_win_icon_48x48.ico \
18
libvirt_win_icon_64x64.ico \
23
virt-xml-validate.in \
24
virt-pki-validate.in \
25
virt-sanlock-cleanup.in \
26
virt-sanlock-cleanup.8 \
28
libvirt-guests.sysconf
32
bin_SCRIPTS = virt-xml-validate virt-pki-validate
33
bin_PROGRAMS = virsh virt-host-validate
36
sbin_SCRIPTS = virt-sanlock-cleanup
37
DISTCLEANFILES += virt-sanlock-cleanup
41
virt-host-validate.1 \
46
dist_man8_MANS = virt-sanlock-cleanup.8
49
virt-xml-validate: virt-xml-validate.in Makefile
50
$(AM_V_GEN)sed -e 's,[@]SCHEMADIR@,$(pkgdatadir)/schemas,' < $< > $@ \
51
|| (rm $@ && exit 1) && chmod +x $@
53
virt-xml-validate.1: virt-xml-validate.in
54
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
56
virt-pki-validate: virt-pki-validate.in Makefile
57
$(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' < $< > $@ \
58
|| (rm $@ && exit 1) && chmod +x $@
60
virt-pki-validate.1: virt-pki-validate.in
61
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
63
virt-host-validate.1: virt-host-validate.c
64
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
66
virt-sanlock-cleanup: virt-sanlock-cleanup.in Makefile
67
$(AM_V_GEN)sed -e 's,[@]SYSCONFDIR@,$(sysconfdir),' \
68
-e 's,[@]LOCALSTATEDIR@,$(localstatedir),' < $< > $@ \
69
|| (rm $@ && exit 1) && chmod +x $@
71
virt-sanlock-cleanup.8: virt-sanlock-cleanup.in
72
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
74
virt_host_validate_SOURCES = \
75
virt-host-validate.c \
76
virt-host-validate-common.c virt-host-validate-common.h \
77
virt-host-validate-qemu.c virt-host-validate-qemu.h \
78
virt-host-validate-lxc.c virt-host-validate-lxc.h \
81
virt_host_validate_LDFLAGS = \
86
virt_host_validate_LDADD = \
88
../gnulib/lib/libgnu.la \
91
virt_host_validate_CFLAGS = \
100
virsh_LDFLAGS = $(WARN_LDFLAGS) $(COVERAGE_LDFLAGS)
105
../src/libvirt-qemu.la \
106
../gnulib/lib/libgnu.la \
114
BUILT_SOURCES = virsh-net-edit.c virsh-pool-edit.c
116
virsh-net-edit.c: virsh.c Makefile.am
117
$(AM_V_GEN)rm -f $@-tmp && \
118
echo '/* Automatically generated from: $^ */' > $@-tmp && \
119
echo 'static bool' >> $@-tmp && \
120
awk '/^cmdEdit/, /^}/' $< \
121
| sed -e 's/domain/network/g' \
122
-e 's/Domain/Network/g' \
123
-e 's/cmdEdit/cmdNetworkEdit/g' \
124
-e 's/dom/network/g' \
125
-e 's/int flags.*/int flags = 0;/g' \
127
chmod a-w $@-tmp && \
131
virsh-pool-edit.c: virsh.c Makefile.am
132
$(AM_V_GEN)rm -f $@-tmp && \
133
echo '/* Automatically generated from: $^ */' > $@-tmp && \
134
echo 'static bool' >> $@-tmp && \
135
awk '/^cmdEdit/, /^}/' $< \
136
| sed -e 's/domain/pool/g' \
137
-e 's/vshCommandOptDomain/vshCommandOptPool/g' \
138
-e 's/Domain %s/Pool %s/g' \
139
-e 's/(ctl, cmd, NULL);/(ctl, cmd, "pool", NULL);/' \
140
-e 's/Domain/StoragePool/g' \
141
-e 's/cmdEdit/cmdPoolEdit/g' \
142
-e 's/\(virStoragePoolDefineXML.*\));/\1, 0);/' \
144
-e 's/int flags.*/int flags = 0;/g' \
146
chmod a-w $@-tmp && \
152
virsh_LDADD += virsh_win_icon.$(OBJEXT)
154
# Before you edit virsh_win_icon.rc, please note the following
155
# limitations of the resource file format:
157
# (1) '..' is not permitted in the icon filename field.
158
# (2) '-' is not permitted in the icon filename field.
159
# (3) Comments are not permitted in the file.
161
# Windows appears to choose the first <= 32x32 icon it finds
162
# in the resource file. Therefore you should list the available
163
# icons from largest to smallest, and make sure that the 32x32
164
# icon is the most legible.
166
# Windows .ICO is a special MS-only format. GIMP and other
167
# tools can write it. However there are several variations,
168
# and Windows seems to do its own colour quantization. More
169
# information is needed in this area.
171
virsh_win_icon.$(OBJEXT): virsh_win_icon.rc
172
$(AM_V_GEN)$(WINDRES) \
173
--input-format rc --input $< \
174
--output-format coff --output $@
178
$(AM_V_GEN)$(POD2MAN) $< $(srcdir)/$@
180
install-data-local: install-init install-systemd
182
uninstall-local: uninstall-init uninstall-systemd
185
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
186
$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
187
$(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
190
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
191
rmdir $(DESTDIR)$(sysconfdir)/sysconfig ||:
193
EXTRA_DIST += libvirt-guests.init.sh
195
install-initscript: libvirt-guests.init
196
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/rc.d/init.d
197
$(INSTALL_SCRIPT) libvirt-guests.init \
198
$(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
200
uninstall-initscript:
201
rm -f $(DESTDIR)$(sysconfdir)/rc.d/init.d/libvirt-guests
202
rmdir $(DESTDIR)$(sysconfdir)/rc.d/init.d ||:
205
if LIBVIRT_INIT_SCRIPT_RED_HAT
206
BUILT_SOURCES += libvirt-guests.init
207
install-init: install-sysconfig install-initscript
208
uninstall-init: uninstall-sysconfig uninstall-initscript
212
endif # LIBVIRT_INIT_SCRIPT_RED_HAT
214
libvirt-guests.init: libvirt-guests.init.sh $(top_builddir)/config.status
216
-e 's!\@PACKAGE\@!$(PACKAGE)!g' \
217
-e 's!\@bindir\@!$(bindir)!g' \
218
-e 's!\@localedir\@!$(localedir)!g' \
219
-e 's!\@localstatedir\@!$(localstatedir)!g' \
220
-e 's!\@sbindir\@!$(sbindir)!g' \
221
-e 's!\@sysconfdir\@!$(sysconfdir)!g' \
228
EXTRA_DIST += libvirt-guests.service.in
230
SYSTEMD_UNIT_DIR = /lib/systemd/system
232
if LIBVIRT_INIT_SCRIPT_SYSTEMD
233
install-systemd: libvirt-guests.service install-initscript install-sysconfig
234
$(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
235
$(INSTALL_SCRIPT) libvirt-guests.service \
236
$(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
238
uninstall-systemd: uninstall-initscript uninstall-sysconfig
239
rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/libvirt-guests.service
240
rmdir $(DESTDIR)$(SYSTEMD_UNIT_DIR) ||:
242
BUILT_SOURCES += libvirt-guests.service
247
endif # LIBVIRT_INIT_SCRIPT_SYSTEMD
249
libvirt-guests.service: libvirt-guests.service.in $(top_builddir)/config.status
251
-e 's!\@PACKAGE\@!$(PACKAGE)!g' \
252
-e 's!\@bindir\@!$(bindir)!g' \
253
-e 's!\@localedir\@!$(localedir)!g' \
254
-e 's!\@localstatedir\@!$(localstatedir)!g' \
255
-e 's!\@sbindir\@!$(sbindir)!g' \
256
-e 's!\@sysconfdir\@!$(sysconfdir)!g' \
262
CLEANFILES = $(bin_SCRIPTS)
263
CLEANFILES += *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda *.i *.s
264
MAINTAINERCLEANFILES = $(dist_man1_MANS)
266
DISTCLEANFILES += $(BUILT_SOURCES)