2 # Copyright (C) 2009-2011 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 # Basic source for the library.
23 SUBDIRS = gnulib/lib images generator src examples po
32 # Tests and the test-tool.
33 SUBDIRS += gnulib/tests capitests caution regressions test-tool
39 SUBDIRS += align cat df edit inspector rescue
43 SUBDIRS += perl perl/examples
46 SUBDIRS += ocaml ocaml/examples
49 SUBDIRS += python python/examples
52 SUBDIRS += ruby ruby/examples
55 SUBDIRS += java java/examples
64 SUBDIRS += erlang erlang/examples
67 # Unconditional because nothing is built yet.
70 # virt-resize (new version) and virt-sparsify are written in OCaml.
88 # virt-tools in shell. This uses guestmount and virt-inspector.
93 # po-docs must come after tools, inspector.
100 BUGS HACKING RELEASE-NOTES ROADMAP TODO \
102 bugs-in-changelog.sh \
112 debian/guestfish.dirs \
113 debian/guestfish.install \
114 debian/guestfsd.dirs \
115 debian/guestfsd.install \
116 debian/guestmount.dirs \
117 debian/guestmount.install \
118 debian/libguestfs-dev.dirs \
119 debian/libguestfs-dev.install \
120 debian/libguestfs-doc.docs \
121 debian/libguestfs-perl.examples \
122 debian/libguestfs-perl.install \
123 debian/libguestfs-tools.dirs \
124 debian/libguestfs-tools.install \
125 debian/libguestfs0.dirs \
126 debian/libguestfs0.install \
127 debian/patches/series \
128 debian/python-guestfs.install \
131 debian/shlibs.local \
134 libguestfs.pc libguestfs.pc.in \
135 libtool-kill-dependency_libs.sh \
136 logo/fish.svg logo/fish.png \
142 html/guestfs.3.html \
143 html/guestfs-examples.3.html \
144 html/guestfs-erlang.3.html \
145 html/guestfs-java.3.html \
146 html/guestfs-ocaml.3.html \
147 html/guestfs-perl.3.html \
148 html/guestfs-python.3.html \
149 html/guestfs-recipes.1.html \
150 html/guestfs-ruby.3.html \
151 html/guestfish.1.html \
152 html/guestmount.1.html \
153 html/virt-alignment-scan.1.html \
154 html/virt-cat.1.html \
155 html/virt-copy-in.1.html \
156 html/virt-copy-out.1.html \
157 html/virt-df.1.html \
158 html/virt-edit.1.html \
159 html/virt-filesystems.1.html \
160 html/virt-inspector.1.html \
161 html/virt-list-filesystems.1.html \
162 html/virt-list-partitions.1.html \
163 html/virt-ls.1.html \
164 html/virt-make-fs.1.html \
165 html/virt-rescue.1.html \
166 html/virt-resize.1.html \
167 html/virt-sparsify.1.html \
168 html/virt-sysprep.1.html \
169 html/virt-tar.1.html \
170 html/virt-tar-in.1.html \
171 html/virt-tar-out.1.html \
172 html/virt-win-reg.1.html
174 TEXTFILES = BUGS README RELEASE-NOTES ROADMAP TODO
176 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
178 website: $(HTMLFILES) $(TEXTFILES)
179 cp $(HTMLFILES) $(WEBSITEDIR)
180 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
181 cd $(WEBSITEDIR) && \
183 sed -e "s/SUBST_VERSION/$(VERSION)/" \
184 -e "s/SUBST_DATE/$$date/" \
185 < index.html.in > index.html
187 # When doing 'make dist' update a few files automatically.
189 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
190 cp ChangeLog $(distdir)/ChangeLog
191 $(top_srcdir)/update-bugs.sh > BUGS-t
193 cp BUGS $(distdir)/BUGS
194 git log --pretty="format:%an" | sort -u | \
196 grep -v "Richard Jones" \
199 cp AUTHORS $(distdir)/AUTHORS
201 # Update the list of translatable files in po/POTFILES.in.
204 find $(DIST_SUBDIRS) \
205 -name '*.c' -o -name '*.pl' -o -name '*.pm' | \
206 grep -v '^perl/blib/' | \
207 grep -v '^capitests/' | \
208 grep -v '^daemon/lib/' | \
209 grep -v '^daemon/tests/' | \
210 grep -v '^examples/' | \
211 grep -v '^gnulib/' | \
212 grep -v '^perl/examples/' | \
213 grep -v '/guestfs_protocol.c' | \
214 grep -v '/rc_protocol.c' | \
215 grep -v 'appliance/debian/root' | \
216 grep -v '^po-docs/' | \
218 sed 's,^\./,,' > po/POTFILES.in
222 pkgconfigdir = $(libdir)/pkgconfig
223 pkgconfig_DATA = libguestfs.pc
231 # If you don't want to run all of the tests ('make check') then this
232 # will just run libguestfs-test-tool for a quick check. Note this
233 # is NOT a substitute for proper testing!
236 ./run test-tool/libguestfs-test-tool $(QUICKCHECK_TEST_TOOL_ARGS)
238 # Make binary distribution.
240 BINTMPDIR = /tmp/libguestfs-bin
245 $(MAKE) DESTDIR=$(BINTMPDIR) install
246 -find $(BINTMPDIR) -type d -exec rmdir --ignore-fail-on-non-empty {} \;
247 (cd $(BINTMPDIR) && tar cf - .) | \
248 gzip -c -9 > libguestfs-$(VERSION)-$(DISTRO)-$(host_cpu).tar.gz