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
70 libguestfs.pc libguestfs.pc.in \
79 contrib/febootstrap/install.title \
80 contrib/febootstrap/install.html \
81 contrib/febootstrap/install.sh \
86 # guestfs-actions.pod and guestfs-structs are autogenerated. There is
87 # no include mechanism for POD, so we have to do it by hand.
89 man_MANS = guestfs.3 libguestfs.3 guestfish.1
91 guestfs.3: guestfs.pod guestfs-actions.pod guestfs-structs.pod
93 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
94 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
98 -c "Virtualization Support" \
100 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
103 guestfish.1: guestfish.pod guestfish-actions.pod
105 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
109 -c "Virtualization Support" \
111 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
114 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
116 html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod
119 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
120 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
124 --title "libguestfs API documentation" \
128 html/guestfish.1.html: guestfish.pod guestfish-actions.pod
131 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
135 --title "guestfish, libguestfs filesystem interactive shell" \
140 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
143 sh make-recipes.sh recipes/*.sh > $@-t
147 html/guestfs.3.html \
148 html/guestfish.1.html \
149 html/guestmount.1.html \
151 html/hivexget.1.html \
152 html/hivexml.1.html \
153 html/virt-cat.1.html \
154 html/virt-df.1.html \
155 html/virt-edit.1.html \
156 html/virt-inspector.1.html \
157 html/virt-ls.1.html \
158 html/virt-rescue.1.html \
159 html/virt-tar.1.html \
160 html/virt-win-reg.1.html \
162 html/pod.css html/recipes.css
164 TEXTFILES = README TODO HACKING
166 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
168 website: $(HTMLFILES) $(TEXTFILES)
169 cp $(HTMLFILES) $(WEBSITEDIR)
170 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
171 cd $(WEBSITEDIR) && \
173 sed -e "s/SUBST_VERSION/$(VERSION)/" \
174 -e "s/SUBST_DATE/$$date/" \
175 < index.html.in > index.html
177 # Generate the ChangeLog automatically from the gitlog.
180 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
181 cp ChangeLog $(distdir)/ChangeLog
183 # Update the list of translatable files in po/POTFILES.in.
186 find $(DIST_SUBDIRS) \
187 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
188 -name 'virt-cat' -o \
190 -name 'virt-edit' -o \
191 -name 'virt-inspector' -o \
193 -name 'virt-rescue' -o \
194 -name 'virt-tar' -o \
195 -name 'virt-win-reg' | \
196 grep -v '^perl/blib/' | \
197 grep -v '^capitests/' | \
198 grep -v '^daemon/lib/' | \
199 grep -v '^daemon/tests/' | \
200 grep -v '^examples/' | \
201 grep -v '^gnulib/' | \
202 grep -v '^perl/examples/' | \
203 grep -v '/guestfs_protocol.c' | \
204 grep -v '/rc_protocol.c' | \
205 grep -v 'appliance/debian/root' | \
207 sed 's,^\./,,' > po/POTFILES.in
211 pkgconfigdir = $(libdir)/pkgconfig
212 pkgconfig_DATA = libguestfs.pc
216 CLEANFILES = $(fs_DATA) \
220 guestfs.3 guestfish.1