configure: Fix info about virt-resize when OCaml bindings are disabled.
[libguestfs.git] / cat / Makefile.am
1 # libguestfs virt-cat, virt-filesystems and virt-ls.
2 # Copyright (C) 2010-2011 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         test-virt-cat.sh \
22         virt-cat.pod \
23         test-virt-filesystems.sh \
24         virt-filesystems.pod \
25         test-virt-ls.sh \
26         virt-ls.pod
27
28 CLEANFILES = stamp-virt-cat.pod stamp-virt-ls.pod stamp-virt-filesystems.pod
29
30 bin_PROGRAMS = virt-cat virt-filesystems virt-ls
31
32 SHARED_SOURCE_FILES = \
33         ../fish/config.c \
34         ../fish/inspect.c \
35         ../fish/keys.c \
36         ../fish/options.h \
37         ../fish/options.c \
38         ../fish/virt.c
39
40 virt_cat_SOURCES = \
41         $(SHARED_SOURCE_FILES) \
42         virt-cat.c
43
44 virt_cat_CFLAGS = \
45         -I$(top_srcdir)/src -I$(top_builddir)/src \
46         -I$(top_srcdir)/fish \
47         -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
48         -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
49         $(WARN_CFLAGS) $(WERROR_CFLAGS) \
50         $(LIBCONFIG_CFLAGS)
51
52 virt_cat_LDADD = \
53         $(LIBCONFIG_LIBS) \
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         $(LIBCONFIG_CFLAGS)
68
69 virt_filesystems_LDADD = \
70         $(LIBCONFIG_LIBS) \
71         $(top_builddir)/src/libguestfs.la \
72         ../gnulib/lib/libgnu.la
73
74 virt_ls_SOURCES = \
75         $(SHARED_SOURCE_FILES) \
76         virt-ls.c
77
78 virt_ls_CFLAGS = \
79         -I$(top_srcdir)/src -I$(top_builddir)/src \
80         -I$(top_srcdir)/fish \
81         -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
82         -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
83         $(WARN_CFLAGS) $(WERROR_CFLAGS) \
84         $(LIBCONFIG_CFLAGS)
85
86 virt_ls_LDADD = \
87         $(LIBCONFIG_LIBS) \
88         $(top_builddir)/src/libguestfs.la \
89         ../gnulib/lib/libgnu.la
90
91 # Manual pages and HTML files for the website.
92 man_MANS = virt-cat.1 virt-filesystems.1 virt-ls.1
93
94 noinst_DATA = \
95         $(top_builddir)/html/virt-cat.1.html \
96         $(top_builddir)/html/virt-filesystems.1.html \
97         $(top_builddir)/html/virt-ls.1.html
98
99 virt-cat.1 $(top_builddir)/html/virt-cat.1.html: stamp-virt-cat.pod
100
101 stamp-virt-cat.pod: virt-cat.pod
102         $(top_srcdir)/podwrapper.sh \
103           --man virt-cat.1 \
104           --html $(top_builddir)/html/virt-cat.1.html \
105           $<
106         touch $@
107
108 virt-ls.1 $(top_builddir)/html/virt-ls.1.html: stamp-virt-ls.pod
109
110 stamp-virt-ls.pod: virt-ls.pod
111         $(top_srcdir)/podwrapper.sh \
112           --man virt-ls.1 \
113           --html $(top_builddir)/html/virt-ls.1.html \
114           $<
115         touch $@
116
117 virt-filesystems.1 $(top_builddir)/html/virt-filesystems.1.html: stamp-virt-filesystems.pod
118
119 stamp-virt-filesystems.pod: virt-filesystems.pod
120         $(top_srcdir)/podwrapper.sh \
121           --man virt-filesystems.1 \
122           --html $(top_builddir)/html/virt-filesystems.1.html \
123           $<
124         touch $@
125
126 # Tests.
127
128 random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
129
130 TESTS_ENVIRONMENT = \
131         MALLOC_PERTURB_=$(random_val) \
132         LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
133         LIBGUESTFS_PATH=$(top_builddir)/appliance
134
135 TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh