# Virt resize UI. # Copyright (C) 2011 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ $(SOURCES) \ config.ml.in \ .gitignore \ virt-resize-ui.pod \ virt-resize-ui.1 \ html/pod.css CLEANFILES = *.cmi *.cmo *.cmx *.cmxa *.o virt-resize-ui *~ # These are listed here in alphabetical order. SOURCES = \ config.mli \ destination_tab.mli \ destination_tab.ml \ logvols_tab.mli \ logvols_tab.ml \ main.ml \ partitions_tab.mli \ partitions_tab.ml \ slave.mli \ slave.ml \ slave_types.mli \ slave_types.ml \ source_tab.mli \ source_tab.ml \ utils.mli \ utils.ml \ window.ml \ window.mli BUILT_SOURCES = \ config.ml # Note this list must be in dependency order. OBJECTS = \ config.cmo \ utils.cmo \ slave_types.cmo \ slave.cmo \ source_tab.cmo \ destination_tab.cmo \ partitions_tab.cmo \ logvols_tab.cmo \ window.cmo \ main.cmo XOBJECTS = $(OBJECTS:.cmo=.cmx) bin_SCRIPTS = virt-resize-ui OCAMLPACKAGES = \ -package threads,libvirt,guestfs,lablgtk2,extlib OCAMLCFLAGS = \ -g \ -warn-error CDEFLMPSUVYZX \ -thread \ $(OCAMLPACKAGES) \ -predicates threads OCAMLOPTFLAGS = \ -ccopt -g \ $(OCAMLCFLAGS) OCAMLDOCFLAGS = \ $(OCAMLPACKAGES) \ -predicates threads \ -I +threads \ -sort -html if HAVE_OCAMLOPT virt-resize-ui: $(XOBJECTS) $(OCAMLFIND) ocamlopt $(OCAMLOPTFLAGS) \ -predicates init,threads \ -linkpkg gtkThread.cmx \ $^ -o $@ else virt-resize-ui: $(OBJECTS) $(OCAMLFIND) ocamlc $(OCAMLCFLAGS) \ -predicates init,threads \ -linkpkg gtkThread.cmo \ $^ -o $@ endif .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 = virt-resize-ui.1 if HAVE_PERLDOC virt-resize-ui.1: virt-resize-ui.pod pod2man \ --section 1 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@ noinst_DATA = \ html/virt-resize-ui.1.html html/virt-resize-ui.1.html: virt-resize-ui.pod mkdir -p html pod2html \ --css 'pod.css' \ --htmldir html \ --outfile html/virt-resize-ui.1.html \ virt-resize-ui.pod endif # Maintainer website update. HTMLFILES = \ html/virt-resize-ui.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) $(OCAMLFIND) ocamldep $(OCAMLPACKAGES) $^ | \ $(SED) -e 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ LANG=C sort > $@-t mv $@-t $@ include .depend .PHONY: depend docs