X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=Makefile.am;h=7bae6e6396c3574e1251b19c71df56788efa1407;hb=8260bc1fce6ab92b77dbe87b8eccd2b415a95ec3;hp=9e02e880cd15eaf6a73125b4749be41e2d23905e;hpb=bbfe03c47f1d7f03c3e6c0cab9e4f500f588c80a;p=guestfs-browser.git diff --git a/Makefile.am b/Makefile.am index 9e02e88..7bae6e6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -17,39 +17,149 @@ ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = HACKING Throbber.png Throbber.gif +EXTRA_DIST = \ + $(SOURCES) \ + HACKING \ + Throbber.png Throbber.gif \ + .gitignore guestfs-browser.spec \ + guestfs-browser.pod \ + guestfs-browser.1 \ + html/pod.css -CLEANFILES = *.cmi *.cmo *.cmx *.o guestfs-browser throbber.ml +CLEANFILES = *.cmi *.cmo *.cmx *.o guestfs-browser +# These are listed here in alphabetical order. SOURCES = \ + cmdline.mli \ + cmdline.ml \ + config.mli \ + config.ml \ + deviceSet.mli \ + deviceSet.ml \ + filetree.mli \ + filetree.ml \ + filetree_markup.mli \ + filetree_markup.ml \ + filetree_ops.mli \ + filetree_ops.ml \ + filetree_type.mli \ + filetree_type.ml \ main.ml \ slave.mli \ slave.ml \ throbber.ml \ utils.mli \ - utils.ml + utils.ml \ + window.mli \ + window.ml +# Note this list must be in dependency order. OBJECTS = \ - main.cmx \ - slave.cmx \ + config.cmx \ throbber.cmx \ - utils.cmx + utils.cmx \ + cmdline.cmx \ + deviceSet.cmx \ + slave.cmx \ + filetree_type.cmx \ + filetree_markup.cmx \ + filetree_ops.cmx \ + filetree.cmx \ + window.cmx \ + main.cmx bin_SCRIPTS = guestfs-browser -OCAMLOPTFLAGS = \ - -warn-error A \ +OCAMLPACKAGES = \ + -package libvirt,guestfs,hivex,lablgtk2,extlib,xml-light,camomile,threads,bitstring,bitstring.syntax -syntax bitstring +OCAMLCFLAGS = \ + -g \ + -warn-error CDEFLMPSUVYZX \ -thread \ - -package libvirt,guestfs,lablgtk2,extlib,xml-light,threads + $(OCAMLPACKAGES) \ + -predicates threads +OCAMLOPTFLAGS = $(OCAMLCFLAGS) +OCAMLDOCFLAGS = \ + $(OCAMLPACKAGES) \ + -predicates threads \ + -I +threads \ + -sort -html guestfs-browser: $(OBJECTS) - ocamlfind ocamlopt $(OCAMLOPTFLAGS) \ + $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \ -predicates init,threads \ -linkpkg gtkThread.cmx \ $^ -o $@ +# This file is built. However gdk_pixbuf_mlsource requires X11 to +# run, which prevents this from being built in places where an X +# display is not available, such as on automated builders. So we'll +# bundle this file in with the tarball anyway. throbber.ml: Throbber.png Throbber.gif - gdk_pixbuf_mlsource --build-list \ + $(GDK_PIXBUF_MLSOURCE) --build-list \ static Throbber.png \ animation Throbber.gif \ > $@-t && mv $@-t $@ + +.mli.cmi: + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@ +.ml.cmo: + $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) -c $< -o $@ +.ml.cmx: + $(OCAMLFIND) ocamlopt $(OCAMLCFLAGS) -c $< -o $@ + +# Man page. +man_MANS = guestfs-browser.1 + +if HAVE_PERLDOC + +guestfs-browser.1: guestfs-browser.pod + pod2man \ + --section 1 \ + -c "Virtualization Support" \ + --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ + $< > $@ + +noinst_DATA = \ + html/guestfs-browser.1.html + +html/guestfs-browser.1.html: guestfs-browser.pod + mkdir -p html + pod2html \ + --css 'pod.css' \ + --htmldir html \ + --outfile html/guestfs-browser.1.html \ + guestfs-browser.pod + +endif + +# Maintainer website update. +HTMLFILES = \ + html/guestfs-browser.1.html + +WEBSITEDIR = $(HOME)/d/redhat/websites/libguestfs + +website: $(HTMLFILES) + cp $(HTMLFILES) $(WEBSITEDIR) + +CLEANFILES += $(HTMLFILES) pod2*.tmp + +# Convert internal documentation to HTML. +docs: + rm -rf doc + mkdir -p doc + $(OCAMLFIND) ocamldoc -d doc $(OCAMLDOCFLAGS) $(SOURCES) + +# Dependencies. +depend: .depend + +.depend: $(wildcard *.mli) $(wildcard *.ml) + rm -f $@ $@-t + $(OCAMLFIND) ocamldep $(OCAMLPACKAGES) $^ | \ + $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ + sort > $@-t + mv $@-t $@ + +include .depend + +.PHONY: depend docs