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 hivex 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 \
74 # HTML versions of manual pages.
76 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
78 html/guestfs.3.html: src/guestfs.pod \
79 src/guestfs-actions.pod \
80 src/guestfs-availability.pod \
81 src/guestfs-structs.pod
84 -e '/@ACTIONS@/rsrc/guestfs-actions.pod' \
86 -e '/@AVAILABILITY@/rsrc/guestfs-availability.pod' \
87 -e 's/@AVAILABILITY@//' \
88 -e '/@STRUCTS@/rsrc/guestfs-structs.pod' \
93 --title "libguestfs API documentation" \
97 html/guestfish.1.html: fish/guestfish.pod fish/guestfish-actions.pod
100 -e '/@ACTIONS@/rfish/guestfish-actions.pod' -e 's/@ACTIONS@//' \
104 --title "guestfish, libguestfs filesystem interactive shell" \
109 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
112 sh make-recipes.sh recipes/*.sh > $@-t
116 html/guestfs.3.html \
117 html/guestfish.1.html \
118 html/guestmount.1.html \
120 html/hivexget.1.html \
121 html/hivexml.1.html \
122 html/virt-cat.1.html \
123 html/virt-df.1.html \
124 html/virt-edit.1.html \
125 html/virt-inspector.1.html \
126 html/virt-list-filesystems.1.html \
127 html/virt-ls.1.html \
128 html/virt-rescue.1.html \
129 html/virt-tar.1.html \
130 html/virt-win-reg.1.html \
132 html/pod.css html/recipes.css
134 TEXTFILES = README TODO HACKING
136 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
138 website: $(HTMLFILES) $(TEXTFILES)
139 cp $(HTMLFILES) $(WEBSITEDIR)
140 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
141 cd $(WEBSITEDIR) && \
143 sed -e "s/SUBST_VERSION/$(VERSION)/" \
144 -e "s/SUBST_DATE/$$date/" \
145 < index.html.in > index.html
147 # Generate the ChangeLog automatically from the gitlog.
150 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
151 cp ChangeLog $(distdir)/ChangeLog
153 # Update the list of translatable files in po/POTFILES.in.
156 find $(DIST_SUBDIRS) \
157 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
158 -name 'virt-cat' -o \
160 -name 'virt-edit' -o \
161 -name 'virt-inspector' -o \
162 -name 'virt-list-filesystems' -o \
164 -name 'virt-rescue' -o \
165 -name 'virt-tar' -o \
166 -name 'virt-win-reg' | \
167 grep -v '^perl/blib/' | \
168 grep -v '^capitests/' | \
169 grep -v '^daemon/lib/' | \
170 grep -v '^daemon/tests/' | \
171 grep -v '^examples/' | \
172 grep -v '^gnulib/' | \
173 grep -v '^perl/examples/' | \
174 grep -v '/guestfs_protocol.c' | \
175 grep -v '/rc_protocol.c' | \
176 grep -v 'appliance/debian/root' | \
178 sed 's,^\./,,' > po/POTFILES.in
182 pkgconfigdir = $(libdir)/pkgconfig
183 pkgconfig_DATA = libguestfs.pc
187 CLEANFILES = $(fs_DATA) \
191 guestfs.3 guestfish.1