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 hivex 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.
38 SUBDIRS += ocaml ocaml/examples
54 guestfs.pod guestfs-actions.pod guestfs-structs.pod \
55 guestfish.pod guestfish-actions.pod \
58 libguestfs.pc libguestfs.pc.in \
67 contrib/febootstrap/install.title \
68 contrib/febootstrap/install.html \
69 contrib/febootstrap/install.sh \
74 # guestfs-actions.pod and guestfs-structs are autogenerated. There is
75 # no include mechanism for POD, so we have to do it by hand.
77 man_MANS = guestfs.3 libguestfs.3 guestfish.1
79 guestfs.3: guestfs.pod guestfs-actions.pod guestfs-structs.pod
81 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
82 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
86 -c "Virtualization Support" \
88 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
91 guestfish.1: guestfish.pod guestfish-actions.pod
93 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
97 -c "Virtualization Support" \
99 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
102 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
104 html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod
107 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
108 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
112 --title "libguestfs API documentation" \
116 html/guestfish.1.html: guestfish.pod guestfish-actions.pod
119 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
123 --title "guestfish, libguestfs filesystem interactive shell" \
128 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
131 sh make-recipes.sh recipes/*.sh > $@-t
134 HTMLFILES = html/guestfs.3.html html/guestfish.1.html \
135 html/virt-cat.1.html \
136 html/virt-df.1.html \
137 html/virt-edit.1.html \
138 html/virt-inspector.1.html \
139 html/virt-ls.1.html \
140 html/virt-rescue.1.html \
141 html/virt-tar.1.html \
142 html/virt-win-reg.1.html \
144 html/pod.css html/recipes.css
146 TEXTFILES = README TODO HACKING
148 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
150 website: $(HTMLFILES) $(TEXTFILES)
151 cp $(HTMLFILES) $(WEBSITEDIR)
152 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
153 cd $(WEBSITEDIR) && \
155 sed -e "s/SUBST_VERSION/$(VERSION)/" \
156 -e "s/SUBST_DATE/$$date/" \
157 < index.html.in > index.html
159 # Generate the ChangeLog automatically from the gitlog.
162 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
163 cp ChangeLog $(distdir)/ChangeLog
165 # Update the list of translatable files in po/POTFILES.in.
168 find $(DIST_SUBDIRS) \
169 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
170 -name 'virt-cat' -o \
172 -name 'virt-edit' -o \
173 -name 'virt-inspector' -o \
175 -name 'virt-rescue' -o \
176 -name 'virt-tar' -o \
177 -name 'virt-win-reg' | \
178 grep -v '^perl/blib/' | \
179 grep -v '^capitests/' | \
180 grep -v '^daemon/lib/' | \
181 grep -v '^daemon/tests/' | \
182 grep -v '^examples/' | \
183 grep -v '^gnulib/' | \
184 grep -v '^perl/examples/' | \
185 grep -v '/guestfs_protocol.c' | \
186 grep -v '/rc_protocol.c' | \
188 sed 's,^\./,,' > po/POTFILES.in
192 pkgconfigdir = $(libdir)/pkgconfig
193 pkgconfig_DATA = libguestfs.pc
197 CLEANFILES = $(fs_DATA) \
201 guestfs.3 guestfish.1