Missing \n character in Ruby bindings.
[libguestfs.git] / Makefile.am
1 # libguestfs
2 # Copyright (C) 2009 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 ACLOCAL_AMFLAGS = -I m4
19
20 SUBDIRS = src daemon appliance fish po examples images \
21         capitests regressions
22
23 if HAVE_OCAML
24 SUBDIRS += ocaml
25 endif
26 if HAVE_PERL
27 SUBDIRS += perl
28 endif
29 if HAVE_PYTHON
30 SUBDIRS += python
31 endif
32 if HAVE_RUBY
33 SUBDIRS += ruby
34 endif
35 if HAVE_JAVA
36 SUBDIRS += java
37 endif
38 if HAVE_HASKELL
39 SUBDIRS += haskell
40 endif
41 if HAVE_INSPECTOR
42 SUBDIRS += inspector
43 endif
44
45 EXTRA_DIST = \
46         config.rpath \
47         guestfs.pod guestfs-actions.pod guestfs-structs.pod \
48         guestfish.pod guestfish-actions.pod \
49         html/pod.css \
50         HACKING TODO \
51         libguestfs.pc libguestfs.pc.in \
52         gitlog-to-changelog \
53         recipes/LICENSE \
54         recipes/README \
55         recipes/*.html \
56         recipes/*.sh \
57         recipes/*.example \
58         html/recipes.css \
59         make-recipes.sh \
60         contrib/README \
61         contrib/febootstrap/install.title \
62         contrib/febootstrap/install.html \
63         contrib/febootstrap/install.sh \
64         bindtests
65
66 # Manual pages.
67 # guestfs-actions.pod and guestfs-structs are autogenerated.  There is
68 # no include mechanism for POD, so we have to do it by hand.
69
70 man_MANS = guestfs.3 guestfish.1
71
72 guestfs.3: guestfs.pod guestfs-actions.pod guestfs-structs.pod
73         sed \
74           -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
75           -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
76           < $< | \
77         $(POD2MAN) \
78           --section 3 \
79           -c "Virtualization Support" \
80           --name "guestfs" \
81           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
82           > $@
83
84 guestfish.1: guestfish.pod guestfish-actions.pod
85         sed \
86           -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
87           < $< | \
88         $(POD2MAN) \
89           --section 1 \
90           -c "Virtualization Support" \
91           --name "guestfish" \
92           --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
93           > $@
94
95 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
96
97 html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod
98         sed \
99           -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
100           -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
101           < $< | \
102         pod2html \
103           --css 'pod.css' \
104           --title "libguestfs API documentation" \
105           --htmldir html \
106           --outfile $@
107
108 html/guestfish.1.html: guestfish.pod guestfish-actions.pod
109         sed \
110           -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
111           < $< | \
112         pod2html \
113           --css 'pod.css' \
114           --title "guestfish, libguestfs filesystem interactive shell" \
115           --htmldir html \
116           --outfile $@
117
118 # Recipes web page.
119 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
120         rm -f $@ $@-t
121         sh make-recipes.sh recipes/*.sh > $@-t
122         mv $@-t $@
123
124 HTMLFILES = html/guestfs.3.html html/guestfish.1.html \
125         html/virt-inspector.1.html \
126         html/recipes.html \
127         html/pod.css html/recipes.css
128
129 TEXTFILES = README TODO HACKING
130
131 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
132
133 website: $(HTMLFILES) $(TEXTFILES)
134         cp $(HTMLFILES) $(WEBSITEDIR)
135         for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
136
137 # Generate the ChangeLog automatically from the gitlog.
138
139 dist-hook:
140         ./gitlog-to-changelog > ChangeLog
141         cp ChangeLog $(distdir)/ChangeLog
142
143 # Pkgconfig.
144
145 pkgconfigdir = $(libdir)/pkgconfig
146 pkgconfig_DATA = libguestfs.pc
147
148 # Make clean.
149
150 CLEANFILES = $(fs_DATA) emptydisk pod2htm?.tmp
151
152 clean-local:
153         rm -rf initramfs