2 # Copyright (C) 2010-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 along
15 # with this program; if not, write to the Free Software Foundation, Inc.,
16 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 ACLOCAL_AMFLAGS = -I m4
23 Throbber.png Throbber.gif \
28 guestfs-browser.desktop.in \
30 guestfs-browser-large.png \
32 test-desktop-file-validate.sh \
35 CLEANFILES = *.cmi *.cmo *.cmx *.cmxa *.o guestfs-browser *~
39 # These are listed here in alphabetical order.
57 op_checksum_file.mli \
59 op_copy_regvalue.mli \
63 op_download_as_reg.mli \
64 op_download_as_reg.ml \
65 op_download_dir_find0.mli \
66 op_download_dir_find0.ml \
67 op_download_dir_tarball.mli \
68 op_download_dir_tarball.ml \
69 op_download_file.mli \
71 op_file_information.mli \
72 op_file_information.ml \
73 op_file_properties.mli \
74 op_file_properties.ml \
75 op_inspection_dialog.mli \
76 op_inspection_dialog.ml \
94 # Note this list must be in dependency order.
104 filetree_markup.cmo \
106 op_checksum_file.cmo \
107 op_copy_regvalue.cmo \
109 op_download_as_reg.cmo \
110 op_download_dir_find0.cmo \
111 op_download_dir_tarball.cmo \
112 op_download_file.cmo \
113 op_file_information.cmo \
114 op_file_properties.cmo \
115 op_inspection_dialog.cmo \
123 XOBJECTS = $(OBJECTS:.cmo=.cmx)
125 bin_SCRIPTS = guestfs-browser
128 -package libvirt,guestfs,hivex,lablgtk2,lablgtk2.auto-init,extlib,xml-light,calendar,camomile,threads,bitstring,bitstring.syntax -syntax bitstring
131 -warn-error CDEFLMPSUVYZX-3 \
140 -predicates threads \
145 guestfs-browser: $(XOBJECTS)
146 $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \
150 guestfs-browser: $(OBJECTS)
151 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \
156 # This file is built. However gdk_pixbuf_mlsource requires X11 to
157 # run, which prevents this from being built in places where an X
158 # display is not available, such as on automated builders. So we'll
159 # bundle this file in with the tarball anyway.
160 throbber.ml: Throbber.png Throbber.gif
161 $(GDK_PIXBUF_MLSOURCE) --build-list \
162 static Throbber.png \
163 animation Throbber.gif \
167 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
169 $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@
171 $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@
174 icondir = $(datadir)/$(PACKAGE_NAME)/pixmaps
175 icon_DATA = guestfs-browser.svg guestfs-browser-large.png guestfs-browser.png
178 desktopdir = $(datadir)/applications
179 desktop_DATA = guestfs-browser.desktop
181 guestfs-browser.desktop: guestfs-browser.desktop.in Makefile
182 $(SED) "s,\@icondir\@,$(icondir),g" < $< > $@-t
185 TESTS += test-desktop-file-validate.sh
187 # Config. Can't use autoconf to build this because we want
188 # to embed the true icondir path.
189 config.ml: config.ml.in Makefile
192 -e "s,\@PACKAGE_NAME\@,$(PACKAGE_NAME),g" \
193 -e "s,\@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g" \
194 -e "s,\@HIVEXREGEDIT\@,$(HIVEXREGEDIT),g" \
195 -e "s,\@OPENER\@,$(OPENER),g" \
196 -e "s,\@icondir\@,$(icondir),g" \
201 man_MANS = guestfs-browser.1
205 guestfs-browser.1: guestfs-browser.pod
208 -c "Virtualization Support" \
209 --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
213 html/guestfs-browser.1.html
215 html/guestfs-browser.1.html: guestfs-browser.pod
220 --outfile html/guestfs-browser.1.html \
225 # Maintainer website update.
227 html/guestfs-browser.1.html
229 WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs
231 website: $(HTMLFILES)
232 cp $(HTMLFILES) $(WEBSITEDIR)
234 CLEANFILES += $(HTMLFILES) pod2*.tmp
236 # Convert internal documentation to HTML.
240 $(OCAMLFIND) ocamldoc -d doc $(OCAMLDOCFLAGS) $(SOURCES)
245 .depend: $(wildcard *.mli) $(wildcard *.ml)
246 $(OCAMLFIND) ocamldep $(OCAMLPACKAGES) $^ | \
247 $(SED) -e 's/ *$$//' | \
248 $(SED) -e 's/[ \t]:/:/' | \
249 $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \
257 # The dependencies aren't safe for parallel make (XXX fixme).