Finalize release notes for 1.12 release.
[libguestfs.git] / Makefile.am
1 # libguestfs
2 # Copyright (C) 2009-2011 Red Hat Inc.
3 #
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.
8 #
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.
13 #
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.
17
18 include $(top_srcdir)/subdir-rules.mk
19
20 ACLOCAL_AMFLAGS = -I m4
21
22 # Basic source for the library.
23 SUBDIRS = gnulib/lib images generator src examples po
24
25 if ENABLE_DAEMON
26 SUBDIRS += daemon
27 endif
28 if ENABLE_APPLIANCE
29 SUBDIRS += appliance
30 endif
31
32 # Tests and the test-tool.
33 SUBDIRS += gnulib/tests capitests caution regressions test-tool
34
35 # Guestfish.
36 SUBDIRS += fish
37
38 # virt-tools in C.
39 SUBDIRS += cat df edit inspector rescue
40
41 # Language bindings.
42 if HAVE_PERL
43 SUBDIRS += perl perl/examples
44 endif
45 if HAVE_OCAML
46 SUBDIRS += ocaml ocaml/examples
47 endif
48 if HAVE_PYTHON
49 SUBDIRS += python python/examples
50 endif
51 if HAVE_RUBY
52 SUBDIRS += ruby ruby/examples
53 endif
54 if HAVE_JAVA
55 SUBDIRS += java java/examples
56 endif
57 if HAVE_HASKELL
58 SUBDIRS += haskell
59 endif
60 if HAVE_PHP
61 SUBDIRS += php
62 endif
63
64 # Unconditional because nothing is built yet.
65 SUBDIRS += csharp
66
67 # virt-resize 2.0 is written in OCaml.
68 if HAVE_OCAML
69 if HAVE_OCAML_PCRE
70 SUBDIRS += resize
71 endif
72 endif
73
74 # Perl tools and guestmount.
75 if HAVE_TOOLS
76 SUBDIRS += tools
77 endif
78
79 if HAVE_FUSE
80 SUBDIRS += fuse
81 endif
82
83 # po-docs must come after tools, inspector.
84 if HAVE_PO4A
85 SUBDIRS += po-docs
86 endif
87
88 EXTRA_DIST = \
89         $(generator_built) \
90         BUGS HACKING RELEASE-NOTES ROADMAP TODO \
91         .gitignore \
92         bugs-in-changelog.sh \
93         autogen.sh \
94         bindtests \
95         contrib/README \
96         debian/.gitignore \
97         debian/changelog \
98         debian/compat \
99         debian/control \
100         debian/copyright \
101         debian/docs \
102         debian/guestfish.dirs \
103         debian/guestfish.install \
104         debian/guestfsd.dirs \
105         debian/guestfsd.install \
106         debian/guestmount.dirs \
107         debian/guestmount.install \
108         debian/libguestfs-dev.dirs \
109         debian/libguestfs-dev.install \
110         debian/libguestfs-doc.docs \
111         debian/libguestfs-perl.examples \
112         debian/libguestfs-perl.install \
113         debian/libguestfs-tools.dirs \
114         debian/libguestfs-tools.install \
115         debian/libguestfs0.dirs \
116         debian/libguestfs0.install \
117         debian/patches/series \
118         debian/python-guestfs.install \
119         debian/pyversions \
120         debian/rules \
121         debian/shlibs.local \
122         debian/watch \
123         html/pod.css \
124         libguestfs.pc libguestfs.pc.in \
125         libtool-kill-dependency_libs.sh \
126         logo/fish.svg logo/fish.png \
127         m4/.gitignore \
128         run \
129         update-bugs.sh
130
131 HTMLFILES = \
132         html/guestfs.3.html \
133         html/guestfs-examples.3.html \
134         html/guestfs-java.3.html \
135         html/guestfs-ocaml.3.html \
136         html/guestfs-perl.3.html \
137         html/guestfs-python.3.html \
138         html/guestfs-recipes.1.html \
139         html/guestfs-ruby.3.html \
140         html/guestfish.1.html \
141         html/guestmount.1.html \
142         html/virt-cat.1.html \
143         html/virt-copy-in.1.html \
144         html/virt-copy-out.1.html \
145         html/virt-df.1.html \
146         html/virt-edit.1.html \
147         html/virt-filesystems.1.html \
148         html/virt-inspector.1.html \
149         html/virt-list-filesystems.1.html \
150         html/virt-list-partitions.1.html \
151         html/virt-ls.1.html \
152         html/virt-make-fs.1.html \
153         html/virt-rescue.1.html \
154         html/virt-resize.1.html \
155         html/virt-tar.1.html \
156         html/virt-tar-in.1.html \
157         html/virt-tar-out.1.html \
158         html/virt-win-reg.1.html
159
160 TEXTFILES = BUGS README RELEASE-NOTES ROADMAP TODO
161
162 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
163
164 website: $(HTMLFILES) $(TEXTFILES)
165         cp $(HTMLFILES) $(WEBSITEDIR)
166         for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
167         cd $(WEBSITEDIR) && \
168         date=`date +%F`; \
169         sed -e "s/SUBST_VERSION/$(VERSION)/" \
170             -e "s/SUBST_DATE/$$date/" \
171         < index.html.in > index.html
172
173 # When doing 'make dist' update a few files automatically.
174 dist-hook:
175         $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
176         cp ChangeLog $(distdir)/ChangeLog
177         $(top_srcdir)/update-bugs.sh > BUGS-t
178         mv BUGS-t BUGS
179         cp BUGS $(distdir)/BUGS
180         git log --pretty="format:%an" | sort -u | \
181                 grep -v rjones | \
182                 grep -v "Richard Jones" \
183                 > AUTHORS-t
184         mv AUTHORS-t AUTHORS
185         cp AUTHORS $(distdir)/AUTHORS
186
187 # Update the list of translatable files in po/POTFILES.in.
188 all-local:
189         cd $(srcdir); \
190         find $(DIST_SUBDIRS) \
191             -name '*.c' -o -name '*.pl' -o -name '*.pm' | \
192         grep -v '^perl/blib/' | \
193         grep -v '^capitests/' | \
194         grep -v '^daemon/lib/' | \
195         grep -v '^daemon/tests/' | \
196         grep -v '^examples/' | \
197         grep -v '^gnulib/' | \
198         grep -v '^perl/examples/' | \
199         grep -v '/guestfs_protocol.c' | \
200         grep -v '/rc_protocol.c' | \
201         grep -v 'appliance/debian/root' | \
202         grep -v '^po-docs/' | \
203         LC_ALL=C sort | \
204         sed 's,^\./,,' > po/POTFILES.in
205
206 # Pkgconfig.
207
208 pkgconfigdir = $(libdir)/pkgconfig
209 pkgconfig_DATA = libguestfs.pc
210
211 # Make clean.
212
213 CLEANFILES = \
214         pod2htm?.tmp \
215         html/*.html
216
217 # If you don't want to run all of the tests ('make check') then this
218 # will just run libguestfs-test-tool for a quick check.  Note this
219 # is NOT a substitute for proper testing!
220
221 quickcheck:
222         ./run test-tool/libguestfs-test-tool
223
224 # Make binary distribution.
225
226 BINTMPDIR = /tmp/libguestfs-bin
227 bindist:
228         rm -rf $(BINTMPDIR)
229         mkdir $(BINTMPDIR)
230         $(MAKE)
231         $(MAKE) DESTDIR=$(BINTMPDIR) install
232         -find $(BINTMPDIR) -type d -exec rmdir --ignore-fail-on-non-empty {} \;
233         (cd $(BINTMPDIR) && tar cf - .) | \
234           gzip -c -9 > libguestfs-$(VERSION)-$(DISTRO)-$(host_cpu).tar.gz