1 # libguestfs virt-cat, virt-filesystems and virt-ls.
2 # Copyright (C) 2010-2011 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
23 test-virt-filesystems.sh \
24 virt-filesystems.pod \
28 CLEANFILES = stamp-virt-cat.pod stamp-virt-ls.pod stamp-virt-filesystems.pod
30 bin_PROGRAMS = virt-cat virt-filesystems virt-ls
32 SHARED_SOURCE_FILES = \
41 $(SHARED_SOURCE_FILES) \
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) \
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) \
69 virt_filesystems_LDADD = \
71 $(top_builddir)/src/libguestfs.la \
72 ../gnulib/lib/libgnu.la
75 $(SHARED_SOURCE_FILES) \
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) \
88 $(top_builddir)/src/libguestfs.la \
89 ../gnulib/lib/libgnu.la
91 # Manual pages and HTML files for the website.
92 man_MANS = virt-cat.1 virt-filesystems.1 virt-ls.1
95 $(top_builddir)/html/virt-cat.1.html \
96 $(top_builddir)/html/virt-filesystems.1.html \
97 $(top_builddir)/html/virt-ls.1.html
99 virt-cat.1 $(top_builddir)/html/virt-cat.1.html: stamp-virt-cat.pod
101 stamp-virt-cat.pod: virt-cat.pod
102 $(top_srcdir)/podwrapper.sh \
104 --html $(top_builddir)/html/virt-cat.1.html \
108 virt-ls.1 $(top_builddir)/html/virt-ls.1.html: stamp-virt-ls.pod
110 stamp-virt-ls.pod: virt-ls.pod
111 $(top_srcdir)/podwrapper.sh \
113 --html $(top_builddir)/html/virt-ls.1.html \
117 virt-filesystems.1 $(top_builddir)/html/virt-filesystems.1.html: stamp-virt-filesystems.pod
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 \
128 random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
130 TESTS_ENVIRONMENT = \
131 MALLOC_PERTURB_=$(random_val) \
132 LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
133 LIBGUESTFS_PATH=$(top_builddir)/appliance
135 TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh