regressions: Enable both tests for bug 576879 (not fixed).
[libguestfs.git] / cat / Makefile.am
1 # libguestfs virt-cat, virt-filesystems and virt-ls.
2 # Copyright (C) 2010 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
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 include $(top_srcdir)/subdir-rules.mk
19
20 EXTRA_DIST = \
21         run-cat-locally \
22         test-virt-cat.sh \
23         virt-cat.pod \
24         run-filesystems-locally \
25         test-virt-filesystems.sh \
26         virt-filesystems.pod \
27         run-ls-locally \
28         test-virt-ls.sh \
29         virt-ls.pod
30
31 CLEANFILES = stamp-virt-cat.pod stamp-virt-ls.pod stamp-virt-filesystems.pod
32
33 bin_PROGRAMS = virt-cat virt-filesystems virt-ls
34
35 SHARED_SOURCE_FILES = \
36         ../fish/inspect.c \
37         ../fish/keys.c \
38         ../fish/options.h \
39         ../fish/options.c \
40         ../fish/virt.c
41
42 virt_cat_SOURCES = \
43         $(SHARED_SOURCE_FILES) \
44         virt-cat.c
45
46 virt_cat_CFLAGS = \
47         -I$(top_srcdir)/src -I$(top_builddir)/src \
48         -I$(top_srcdir)/fish \
49         -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
50         -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
51         $(WARN_CFLAGS) $(WERROR_CFLAGS)
52
53 virt_cat_LDADD = \
54         $(top_builddir)/src/libguestfs.la \
55         ../gnulib/lib/libgnu.la
56
57 virt_filesystems_SOURCES = \
58         $(SHARED_SOURCE_FILES) \
59         virt-filesystems.c
60
61 virt_filesystems_CFLAGS = \
62         -I$(top_srcdir)/src -I$(top_builddir)/src \
63         -I$(top_srcdir)/fish \
64         -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
65         -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
66         $(WARN_CFLAGS) $(WERROR_CFLAGS)
67
68 virt_filesystems_LDADD = \
69         $(top_builddir)/src/libguestfs.la \
70         ../gnulib/lib/libgnu.la
71
72 virt_ls_SOURCES = \
73         $(SHARED_SOURCE_FILES) \
74         virt-ls.c
75
76 virt_ls_CFLAGS = \
77         -I$(top_srcdir)/src -I$(top_builddir)/src \
78         -I$(top_srcdir)/fish \
79         -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
80         -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
81         $(WARN_CFLAGS) $(WERROR_CFLAGS)
82
83 virt_ls_LDADD = \
84         $(top_builddir)/src/libguestfs.la \
85         ../gnulib/lib/libgnu.la
86
87 # Manual pages and HTML files for the website.
88 man_MANS = virt-cat.1 virt-filesystems.1 virt-ls.1
89
90 noinst_DATA = \
91         $(top_builddir)/html/virt-cat.1.html \
92         $(top_builddir)/html/virt-filesystems.1.html \
93         $(top_builddir)/html/virt-ls.1.html
94
95 virt-cat.1 $(top_builddir)/html/virt-cat.1.html: stamp-virt-cat.pod
96
97 stamp-virt-cat.pod: virt-cat.pod
98         $(top_srcdir)/podwrapper.sh \
99           --man virt-cat.1 \
100           --html $(top_builddir)/html/virt-cat.1.html \
101           $<
102         touch $@
103
104 virt-ls.1 $(top_builddir)/html/virt-ls.1.html: stamp-virt-ls.pod
105
106 stamp-virt-ls.pod: virt-ls.pod
107         $(top_srcdir)/podwrapper.sh \
108           --man virt-ls.1 \
109           --html $(top_builddir)/html/virt-ls.1.html \
110           $<
111         touch $@
112
113 virt-filesystems.1 $(top_builddir)/html/virt-filesystems.1.html: stamp-virt-filesystems.pod
114
115 stamp-virt-filesystems.pod: virt-filesystems.pod
116         $(top_srcdir)/podwrapper.sh \
117           --man virt-filesystems.1 \
118           --html $(top_builddir)/html/virt-filesystems.1.html \
119           $<
120         touch $@
121
122 # Tests.
123
124 random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
125
126 TESTS_ENVIRONMENT = \
127         MALLOC_PERTURB_=$(random_val) \
128         LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
129         LIBGUESTFS_PATH=$(top_builddir)/appliance
130
131 TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh