1 # libguestfs virt-cat, virt-filesystems and virt-ls.
2 # Copyright (C) 2010 Red Hat Inc.
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.
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.
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.
18 include $(top_srcdir)/subdir-rules.mk
24 run-filesystems-locally \
25 test-virt-filesystems.sh \
26 virt-filesystems.pod \
31 CLEANFILES = stamp-virt-cat.pod stamp-virt-ls.pod stamp-virt-filesystems.pod
33 bin_PROGRAMS = virt-cat virt-filesystems virt-ls
35 SHARED_SOURCE_FILES = \
43 $(SHARED_SOURCE_FILES) \
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)
54 $(top_builddir)/src/libguestfs.la \
55 ../gnulib/lib/libgnu.la
57 virt_filesystems_SOURCES = \
58 $(SHARED_SOURCE_FILES) \
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)
68 virt_filesystems_LDADD = \
69 $(top_builddir)/src/libguestfs.la \
70 ../gnulib/lib/libgnu.la
73 $(SHARED_SOURCE_FILES) \
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)
84 $(top_builddir)/src/libguestfs.la \
85 ../gnulib/lib/libgnu.la
87 # Manual pages and HTML files for the website.
88 man_MANS = virt-cat.1 virt-filesystems.1 virt-ls.1
91 $(top_builddir)/html/virt-cat.1.html \
92 $(top_builddir)/html/virt-filesystems.1.html \
93 $(top_builddir)/html/virt-ls.1.html
95 virt-cat.1 $(top_builddir)/html/virt-cat.1.html: stamp-virt-cat.pod
97 stamp-virt-cat.pod: virt-cat.pod
98 $(top_srcdir)/podwrapper.sh \
100 --html $(top_builddir)/html/virt-cat.1.html \
104 virt-ls.1 $(top_builddir)/html/virt-ls.1.html: stamp-virt-ls.pod
106 stamp-virt-ls.pod: virt-ls.pod
107 $(top_srcdir)/podwrapper.sh \
109 --html $(top_builddir)/html/virt-ls.1.html \
113 virt-filesystems.1 $(top_builddir)/html/virt-filesystems.1.html: stamp-virt-filesystems.pod
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 \
124 random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
126 TESTS_ENVIRONMENT = \
127 MALLOC_PERTURB_=$(random_val) \
128 LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
129 LIBGUESTFS_PATH=$(top_builddir)/appliance
131 TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh