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 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
63 libguestfs.pc libguestfs.pc.in \
76 # HTML versions of manual pages.
78 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
80 html/guestfs.3.html: src/guestfs.pod \
81 src/guestfs-actions.pod \
82 src/guestfs-availability.pod \
83 src/guestfs-structs.pod
86 -e '/@ACTIONS@/rsrc/guestfs-actions.pod' \
88 -e '/@AVAILABILITY@/rsrc/guestfs-availability.pod' \
89 -e 's/@AVAILABILITY@//' \
90 -e '/@STRUCTS@/rsrc/guestfs-structs.pod' \
95 --title "libguestfs API documentation" \
99 html/guestfish.1.html: fish/guestfish.pod fish/guestfish-actions.pod
102 -e '/@ACTIONS@/rfish/guestfish-actions.pod' -e 's/@ACTIONS@//' \
106 --title "guestfish, libguestfs filesystem interactive shell" \
111 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
114 sh make-recipes.sh recipes/*.sh > $@-t
118 html/guestfs.3.html \
119 html/guestfish.1.html \
120 html/guestmount.1.html \
121 html/virt-cat.1.html \
122 html/virt-df.1.html \
123 html/virt-edit.1.html \
124 html/virt-inspector.1.html \
125 html/virt-list-filesystems.1.html \
126 html/virt-ls.1.html \
127 html/virt-rescue.1.html \
128 html/virt-tar.1.html \
129 html/virt-win-reg.1.html \
131 html/pod.css html/recipes.css
133 TEXTFILES = README TODO HACKING
135 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
137 website: $(HTMLFILES) $(TEXTFILES)
138 cp $(HTMLFILES) $(WEBSITEDIR)
139 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
140 cd $(WEBSITEDIR) && \
142 sed -e "s/SUBST_VERSION/$(VERSION)/" \
143 -e "s/SUBST_DATE/$$date/" \
144 < index.html.in > index.html
146 # Generate the ChangeLog automatically from the gitlog.
149 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
150 cp ChangeLog $(distdir)/ChangeLog
152 # Update the list of translatable files in po/POTFILES.in.
155 find $(DIST_SUBDIRS) \
156 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
157 -name 'virt-cat' -o \
159 -name 'virt-edit' -o \
160 -name 'virt-inspector' -o \
161 -name 'virt-list-filesystems' -o \
163 -name 'virt-rescue' -o \
164 -name 'virt-tar' -o \
165 -name 'virt-win-reg' | \
166 grep -v '^perl/blib/' | \
167 grep -v '^capitests/' | \
168 grep -v '^daemon/lib/' | \
169 grep -v '^daemon/tests/' | \
170 grep -v '^examples/' | \
171 grep -v '^gnulib/' | \
172 grep -v '^perl/examples/' | \
173 grep -v '/guestfs_protocol.c' | \
174 grep -v '/rc_protocol.c' | \
175 grep -v 'appliance/debian/root' | \
177 sed 's,^\./,,' > po/POTFILES.in
181 pkgconfigdir = $(libdir)/pkgconfig
182 pkgconfig_DATA = libguestfs.pc
186 CLEANFILES = $(fs_DATA) \
190 guestfs.3 guestfish.1
195 # If you don't want to run all of the tests ('make check') then this
196 # will just run libguestfs-test-tool for a quick check. Note this
197 # is NOT a substitute for proper testing!
200 LIBGUESTFS_PATH=appliance \
201 test-tool/libguestfs-test-tool \
202 --helper test-tool/libguestfs-test-tool-helper