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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 -DGUESTFS_WARN_DEPRECATED=1 \
46 -I$(top_srcdir)/src -I$(top_builddir)/src \
47 -I$(top_srcdir)/fish \
48 -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
49 -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
50 $(WARN_CFLAGS) $(WERROR_CFLAGS) \
55 $(top_builddir)/src/libguestfs.la \
56 ../gnulib/lib/libgnu.la
58 virt_filesystems_SOURCES = \
59 $(SHARED_SOURCE_FILES) \
62 virt_filesystems_CFLAGS = \
63 -DGUESTFS_WARN_DEPRECATED=1 \
64 -I$(top_srcdir)/src -I$(top_builddir)/src \
65 -I$(top_srcdir)/fish \
66 -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
67 -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
68 $(WARN_CFLAGS) $(WERROR_CFLAGS) \
71 virt_filesystems_LDADD = \
73 $(top_builddir)/src/libguestfs.la \
74 ../gnulib/lib/libgnu.la
77 $(SHARED_SOURCE_FILES) \
81 -DGUESTFS_WARN_DEPRECATED=1 \
82 -I$(top_srcdir)/src -I$(top_builddir)/src \
83 -I$(top_srcdir)/fish \
84 -I$(srcdir)/../gnulib/lib -I../gnulib/lib \
85 -DLOCALEBASEDIR=\""$(datadir)/locale"\" \
86 $(WARN_CFLAGS) $(WERROR_CFLAGS) \
91 $(top_builddir)/src/libguestfs.la \
92 ../gnulib/lib/libgnu.la
94 # Manual pages and HTML files for the website.
95 man_MANS = virt-cat.1 virt-filesystems.1 virt-ls.1
98 $(top_builddir)/html/virt-cat.1.html \
99 $(top_builddir)/html/virt-filesystems.1.html \
100 $(top_builddir)/html/virt-ls.1.html
102 virt-cat.1 $(top_builddir)/html/virt-cat.1.html: stamp-virt-cat.pod
104 stamp-virt-cat.pod: virt-cat.pod
105 $(top_builddir)/podwrapper.sh \
107 --html $(top_builddir)/html/virt-cat.1.html \
111 virt-ls.1 $(top_builddir)/html/virt-ls.1.html: stamp-virt-ls.pod
113 stamp-virt-ls.pod: virt-ls.pod
114 $(top_builddir)/podwrapper.sh \
116 --html $(top_builddir)/html/virt-ls.1.html \
120 virt-filesystems.1 $(top_builddir)/html/virt-filesystems.1.html: stamp-virt-filesystems.pod
122 stamp-virt-filesystems.pod: virt-filesystems.pod
123 $(top_builddir)/podwrapper.sh \
124 --man virt-filesystems.1 \
125 --html $(top_builddir)/html/virt-filesystems.1.html \
131 random_val := $(shell awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)
133 TESTS_ENVIRONMENT = \
134 MALLOC_PERTURB_=$(random_val) \
135 LD_LIBRARY_PATH=$(top_builddir)/src/.libs \
136 LIBGUESTFS_PATH=$(top_builddir)/appliance \
137 TMPDIR=$(top_builddir)
139 TESTS = test-virt-cat.sh test-virt-filesystems.sh test-virt-ls.sh