657b6dc5cb6c9d9cfbfec629dcac847cdfb5d63d
[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 SUBDIRS = . tests
19
20 EXTRA_DIST = \
21         .gitignore \
22         qemu-sanity-check.1 \
23         qemu-sanity-check.in \
24         qemu-sanity-check.pod \
25         qemu-sanity-check.pod.in
26
27 CLEANFILES = \
28         *~ \
29         qemu-sanity-check
30
31 bin_SCRIPTS = qemu-sanity-check
32 initrddir = $(libdir)/qemu-sanity-check
33 initrd_DATA = initrd
34
35 # Build the initramfs.
36 initrd: init
37         echo $< | cpio --quiet -o -H newc > $@-t
38         mv $@-t $@
39
40 noinst_PROGRAMS = init
41 init_SOURCES = init.c
42 init_CFLAGS = -static
43 init_LDFLAGS = -static
44
45 # Build the man pages.
46 qemu-sanity-check.pod: qemu-sanity-check.pod.in Makefile
47         rm -f $@ $@-t
48         $(SED) -e 's,@libdir\@,$(libdir),g' < $< > $@-t
49         mv $@-t $@
50         chmod 0555 $@
51
52 if HAVE_POD2MAN
53
54 CLEANFILES += qemu-sanity-check.1
55 man_MANS = qemu-sanity-check.1
56
57 qemu-sanity-check.1: qemu-sanity-check.pod
58         $(POD2MAN) -c "Virtualization Support" \
59           --release "$(PACKAGE)-$(VERSION)" \
60           $< > $@
61
62 endif
63
64 # Tag HEAD with current version (maintainer only).
65
66 maintainer-tag:
67         git tag -a v$(VERSION) -m "Version $(VERSION)" -f