2 # Copyright (C) 2009-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
20 ACLOCAL_AMFLAGS = -I m4
22 # Basic source for the library.
23 SUBDIRS = gnulib/lib images src examples po
32 # Tests and the test-tool.
33 SUBDIRS += gnulib/tests capitests regressions test-tool
43 SUBDIRS += ocaml ocaml/examples
58 # Virt-inspector, tools and guestmount.
75 libguestfs.pc libguestfs.pc.in \
88 # HTML versions of manual pages.
90 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
92 html/guestfs.3.html: src/guestfs.pod \
93 src/guestfs-actions.pod \
94 src/guestfs-availability.pod \
95 src/guestfs-structs.pod
98 -e '/@ACTIONS@/rsrc/guestfs-actions.pod' \
100 -e '/@AVAILABILITY@/rsrc/guestfs-availability.pod' \
101 -e 's/@AVAILABILITY@//' \
102 -e '/@STRUCTS@/rsrc/guestfs-structs.pod' \
107 --title "libguestfs API documentation" \
111 html/guestfish.1.html: fish/guestfish.pod fish/guestfish-actions.pod
114 -e '/@ACTIONS@/rfish/guestfish-actions.pod' -e 's/@ACTIONS@//' \
118 --title "guestfish, libguestfs filesystem interactive shell" \
123 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
126 sh make-recipes.sh recipes/*.sh > $@-t
130 html/guestfs.3.html \
131 html/guestfish.1.html \
132 html/guestmount.1.html \
133 html/virt-cat.1.html \
134 html/virt-df.1.html \
135 html/virt-edit.1.html \
136 html/virt-inspector.1.html \
137 html/virt-list-filesystems.1.html \
138 html/virt-list-partitions.1.html \
139 html/virt-ls.1.html \
140 html/virt-rescue.1.html \
141 html/virt-resize.1.html \
142 html/virt-tar.1.html \
143 html/virt-win-reg.1.html \
145 html/pod.css html/recipes.css
147 TEXTFILES = README TODO HACKING
149 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
151 website: $(HTMLFILES) $(TEXTFILES)
152 cp $(HTMLFILES) $(WEBSITEDIR)
153 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
154 cd $(WEBSITEDIR) && \
156 sed -e "s/SUBST_VERSION/$(VERSION)/" \
157 -e "s/SUBST_DATE/$$date/" \
158 < index.html.in > index.html
160 # Generate the ChangeLog automatically from the gitlog.
163 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
164 cp ChangeLog $(distdir)/ChangeLog
166 # Update the list of translatable files in po/POTFILES.in.
169 find $(DIST_SUBDIRS) \
170 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
171 -name 'virt-cat' -o \
173 -name 'virt-edit' -o \
174 -name 'virt-inspector' -o \
175 -name 'virt-list-filesystems' -o \
176 -name 'virt-list-partitions' -o \
178 -name 'virt-rescue' -o \
179 -name 'virt-resize' -o \
180 -name 'virt-tar' -o \
181 -name 'virt-win-reg' | \
182 grep -v '^perl/blib/' | \
183 grep -v '^capitests/' | \
184 grep -v '^daemon/lib/' | \
185 grep -v '^daemon/tests/' | \
186 grep -v '^examples/' | \
187 grep -v '^gnulib/' | \
188 grep -v '^perl/examples/' | \
189 grep -v '/guestfs_protocol.c' | \
190 grep -v '/rc_protocol.c' | \
191 grep -v 'appliance/debian/root' | \
193 sed 's,^\./,,' > po/POTFILES.in
197 pkgconfigdir = $(libdir)/pkgconfig
198 pkgconfig_DATA = libguestfs.pc
202 CLEANFILES = $(fs_DATA) \
206 guestfs.3 guestfish.1
211 # If you don't want to run all of the tests ('make check') then this
212 # will just run libguestfs-test-tool for a quick check. Note this
213 # is NOT a substitute for proper testing!
216 LIBGUESTFS_PATH=appliance \
217 test-tool/libguestfs-test-tool \
218 --helper test-tool/libguestfs-test-tool-helper