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 ACLOCAL_AMFLAGS = -I m4
20 SUBDIRS = gnulib/lib src daemon appliance fish po examples images \
21 gnulib/tests capitests regressions test-tool
58 guestfs.pod guestfs-actions.pod guestfs-structs.pod \
59 guestfish.pod guestfish-actions.pod \
62 libguestfs.pc libguestfs.pc.in \
71 contrib/febootstrap/install.title \
72 contrib/febootstrap/install.html \
73 contrib/febootstrap/install.sh \
78 # guestfs-actions.pod and guestfs-structs are autogenerated. There is
79 # no include mechanism for POD, so we have to do it by hand.
81 man_MANS = guestfs.3 libguestfs.3 guestfish.1
83 guestfs.3: guestfs.pod guestfs-actions.pod guestfs-structs.pod
85 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
86 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
90 -c "Virtualization Support" \
92 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
95 guestfish.1: guestfish.pod guestfish-actions.pod
97 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
101 -c "Virtualization Support" \
103 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
106 noinst_DATA = html/guestfs.3.html html/guestfish.1.html
108 html/guestfs.3.html: guestfs.pod guestfs-actions.pod guestfs-structs.pod
111 -e '/@ACTIONS@/rguestfs-actions.pod' -e 's/@ACTIONS@//' \
112 -e '/@STRUCTS@/rguestfs-structs.pod' -e 's/@STRUCTS@//' \
116 --title "libguestfs API documentation" \
120 html/guestfish.1.html: guestfish.pod guestfish-actions.pod
123 -e '/@ACTIONS@/rguestfish-actions.pod' -e 's/@ACTIONS@//' \
127 --title "guestfish, libguestfs filesystem interactive shell" \
132 html/recipes.html: $(wildcard recipes/*.sh) $(wildcard recipes/*.html) $(wildcard recipes/*.example) Makefile make-recipes.sh
135 sh make-recipes.sh recipes/*.sh > $@-t
138 HTMLFILES = html/guestfs.3.html html/guestfish.1.html \
139 html/virt-cat.1.html \
140 html/virt-df.1.html \
141 html/virt-edit.1.html \
142 html/virt-inspector.1.html \
143 html/virt-rescue.1.html \
145 html/pod.css html/recipes.css
147 TEXTFILES = README TODO HACKING
149 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
151 website: $(HTMLFILES) $(TEXTFILES)
152 cp $(HTMLFILES) $(WEBSITEDIR)
153 for f in $(TEXTFILES); do cp $$f $(WEBSITEDIR)/$$f.txt; done
154 cd $(WEBSITEDIR) && \
156 sed -e "s/SUBST_VERSION/$(VERSION)/" \
157 -e "s/SUBST_DATE/$$date/" \
158 < index.html.in > index.html
160 # Generate the ChangeLog automatically from the gitlog.
163 $(top_srcdir)/build-aux/gitlog-to-changelog > ChangeLog
164 cp ChangeLog $(distdir)/ChangeLog
166 # Update the list of translatable files in po/POTFILES.in.
169 find $(DIST_SUBDIRS) \
170 -name '*.c' -o -name '*.pl' -o -name '*.pm' -o \
171 -name 'virt-cat' -o \
173 -name 'virt-edit' -o \
174 -name 'virt-inspector' -o \
175 -name 'virt-rescue' | \
176 grep -v '^perl/blib/' | \
177 grep -v '^capitests/' | \
178 grep -v '^daemon/lib/' | \
179 grep -v '^daemon/tests/' | \
180 grep -v '^examples/' | \
181 grep -v '^gnulib/' | \
182 grep -v '^perl/examples/' | \
183 grep -v '/guestfs_protocol.c' | \
184 grep -v '/rc_protocol.c' | \
186 sed 's,^\./,,' > po/POTFILES.in
190 pkgconfigdir = $(libdir)/pkgconfig
191 pkgconfig_DATA = libguestfs.pc
195 CLEANFILES = $(fs_DATA) \
199 guestfs.3 guestfish.1