2 # Copyright (C) 2009 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 SUBDIRS = gnulib/lib hivex src daemon appliance fish po examples images \
23 gnulib/tests capitests regressions test-tool
25 # NB: Must build inspector directory after perl and before ocaml.
26 # We could relax this if we combined the inspector_generator with
27 # the ordinary generator, but that brings other problems.
44 SUBDIRS += ocaml ocaml/examples
61 guestfs-availability.pod \
71 libguestfs.pc libguestfs.pc.in \
80 contrib/febootstrap/install.title \
81 contrib/febootstrap/install.html \
82 contrib/febootstrap/install.sh \
87 # guestfs-actions.pod, guestfs-availability.pod and guestfs-structs
88 # are autogenerated. There is no include mechanism for POD, so we
89 # have to do it by hand.
91 man_MANS = guestfs.3 libguestfs.3 guestfish.1
93 guestfs.3: guestfs.pod \
95 guestfs-availability.pod \
98 -e '/@ACTIONS@/rguestfs-actions.pod' \
100 -e '/@AVAILABILITY@/rguestfs-availability.pod' \
101 -e 's/@AVAILABILITY@//' \
102 -e '/@STRUCTS@/rguestfs-structs.pod' \
107 -c "Virtualization Support" \
109 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
112 guestfish.1: guestfish.pod guestfish-actions.pod
114 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
118 -c "Virtualization Support" \
120 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
123 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
125 html/guestfs.3.html: guestfs.pod \
126 guestfs-actions.pod \
127 guestfs-availability.pod \
131 -e '/@ACTIONS@/rguestfs-actions.pod' \
133 -e '/@AVAILABILITY@/rguestfs-availability.pod' \
134 -e 's/@AVAILABILITY@//' \
135 -e '/@STRUCTS@/rguestfs-structs.pod' \
140 --title "libguestfs API documentation" \
144 html/guestfish.1.html: guestfish.pod guestfish-actions.pod
147 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
151 --title "guestfish, libguestfs filesystem interactive shell" \
156 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
159 sh make-recipes.sh recipes/*.sh > $@-t
163 html/guestfs.3.html \
164 html/guestfish.1.html \
165 html/guestmount.1.html \
167 html/hivexget.1.html \
168 html/hivexml.1.html \
169 html/virt-cat.1.html \
170 html/virt-df.1.html \
171 html/virt-edit.1.html \
172 html/virt-inspector.1.html \
173 html/virt-list-filesystems.1.html \
174 html/virt-ls.1.html \
175 html/virt-rescue.1.html \
176 html/virt-tar.1.html \
177 html/virt-win-reg.1.html \
179 html/pod.css html/recipes.css
181 TEXTFILES = README TODO HACKING
183 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
185 website: $(HTMLFILES) $(TEXTFILES)
186 cp $(HTMLFILES) $(WEBSITEDIR)
187 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
188 cd $(WEBSITEDIR) && \
190 sed -e "s/SUBST_VERSION/$(VERSION)/" \
191 -e "s/SUBST_DATE/$$date/" \
192 < index.html.in > index.html
194 # Generate the ChangeLog automatically from the gitlog.
197 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
198 cp ChangeLog $(distdir)/ChangeLog
200 # Update the list of translatable files in po/POTFILES.in.
203 find $(DIST_SUBDIRS) \
204 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
205 -name 'virt-cat' -o \
207 -name 'virt-edit' -o \
208 -name 'virt-inspector' -o \
209 -name 'virt-list-filesystems' -o \
211 -name 'virt-rescue' -o \
212 -name 'virt-tar' -o \
213 -name 'virt-win-reg' | \
214 grep -v '^perl/blib/' | \
215 grep -v '^capitests/' | \
216 grep -v '^daemon/lib/' | \
217 grep -v '^daemon/tests/' | \
218 grep -v '^examples/' | \
219 grep -v '^gnulib/' | \
220 grep -v '^perl/examples/' | \
221 grep -v '/guestfs_protocol.c' | \
222 grep -v '/rc_protocol.c' | \
223 grep -v 'appliance/debian/root' | \
225 sed 's,^\./,,' > po/POTFILES.in
229 pkgconfigdir = $(libdir)/pkgconfig
230 pkgconfig_DATA = libguestfs.pc
234 CLEANFILES = $(fs_DATA) \
238 guestfs.3 guestfish.1