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 ACLOCAL_AMFLAGS = -I m4
20 SUBDIRS = gnulib/lib src daemon appliance fish po examples images \
21 gnulib/tests capitests regressions test-tool
23 # NB: Must build inspector directory after perl and before ocaml.
24 # We could relax this if we combined the inspector_generator with
25 # the ordinary generator, but that brings other problems.
33 SUBDIRS += ocaml ocaml/examples
61 guestfs.pod guestfs-actions.pod guestfs-structs.pod \
62 guestfish.pod guestfish-actions.pod \
65 libguestfs.pc libguestfs.pc.in \
74 contrib/febootstrap/install.title \
75 contrib/febootstrap/install.html \
76 contrib/febootstrap/install.sh \
81 # guestfs-actions.pod and guestfs-structs are autogenerated. There is
82 # no include mechanism for POD, so we have to do it by hand.
84 man_MANS = guestfs.3 libguestfs.3 guestfish.1
86 guestfs.3: guestfs.pod guestfs-actions.pod guestfs-structs.pod
88 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
89 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
93 -c "Virtualization Support" \
95 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
98 guestfish.1: guestfish.pod guestfish-actions.pod
100 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
104 -c "Virtualization Support" \
106 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
109 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
111 html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod
114 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
115 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
119 --title "libguestfs API documentation" \
123 html/guestfish.1.html: guestfish.pod guestfish-actions.pod
126 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
130 --title "guestfish, libguestfs filesystem interactive shell" \
135 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
138 sh make-recipes.sh recipes/*.sh > $@-t
141 HTMLFILES = html/guestfs.3.html html/guestfish.1.html \
142 html/virt-cat.1.html \
143 html/virt-df.1.html \
144 html/virt-edit.1.html \
145 html/virt-inspector.1.html \
146 html/virt-rescue.1.html \
148 html/pod.css html/recipes.css
150 TEXTFILES = README TODO HACKING
152 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
154 website: $(HTMLFILES) $(TEXTFILES)
155 cp $(HTMLFILES) $(WEBSITEDIR)
156 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
157 cd $(WEBSITEDIR) && \
159 sed -e "s/SUBST_VERSION/$(VERSION)/" \
160 -e "s/SUBST_DATE/$$date/" \
161 < index.html.in > index.html
163 # Generate the ChangeLog automatically from the gitlog.
166 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
167 cp ChangeLog $(distdir)/ChangeLog
169 # Update the list of translatable files in po/POTFILES.in.
172 find $(DIST_SUBDIRS) \
173 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
174 -name 'virt-cat' -o \
176 -name 'virt-edit' -o \
177 -name 'virt-inspector' -o \
178 -name 'virt-rescue' | \
179 grep -v '^perl/blib/' | \
180 grep -v '^capitests/' | \
181 grep -v '^daemon/lib/' | \
182 grep -v '^daemon/tests/' | \
183 grep -v '^examples/' | \
184 grep -v '^gnulib/' | \
185 grep -v '^perl/examples/' | \
186 grep -v '/guestfs_protocol.c' | \
187 grep -v '/rc_protocol.c' | \
189 sed 's,^\./,,' > po/POTFILES.in
193 pkgconfigdir = $(libdir)/pkgconfig
194 pkgconfig_DATA = libguestfs.pc
198 CLEANFILES = $(fs_DATA) \
202 guestfs.3 guestfish.1