configure: Allow the default qemu list to be overridden by the packager.
[qemu-sanity-check.git] / Makefile.am
1 # Makefile for qemu-sanity-check
2 # Copyright (C) 2013 Red Hat Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18 EXTRA_DIST = \
19         .gitignore \
20         qemu-sanity-check.1 \
21         qemu-sanity-check.in \
22         qemu-sanity-check.pod \
23         qemu-sanity-check.pod.in \
24         qemu-sanity-check.spec \
25         sleeper \
26         $(TESTS)
27
28 CLEANFILES = qemu-sanity-check
29
30 bin_SCRIPTS = qemu-sanity-check
31 initrddir = $(libdir)/qemu-sanity-check
32 initrd_DATA = initrd
33
34 # Build the initramfs.
35 initrd: init
36         echo $< | cpio --quiet -o -H newc > $@-t
37         mv $@-t $@
38
39 noinst_PROGRAMS = init
40 init_SOURCES = init.c
41 init_CFLAGS = -static
42 init_LDFLAGS = -static
43
44 # Build the man pages.
45 qemu-sanity-check.pod: qemu-sanity-check.pod.in Makefile
46         rm -f $@ $@-t
47         $(SED) -e 's,@libdir\@,$(libdir),g' < $< > $@-t
48         mv $@-t $@
49         chmod 0555 $@
50
51 if HAVE_POD2MAN
52
53 CLEANFILES += qemu-sanity-check.1
54 man_MANS = qemu-sanity-check.1
55
56 qemu-sanity-check.1: qemu-sanity-check.pod
57         $(POD2MAN) -c "Virtualization Support" \
58           --release "$(PACKAGE)-$(VERSION)" \
59           $< > $@
60
61 endif
62
63 # Tests.
64 TESTS = \
65         run-qemu-sanity-check \
66         test-timeout \
67         test-bad-options \
68         test-bad-kernel \
69         test-bad-qemu \
70         test-bad-userspace
71
72 # Tag HEAD with current version (maintainer only).
73
74 maintainer-tag:
75         git tag -a v$(VERSION) -m "Version $(VERSION)" -f