# virt-v2v test cases (not redistributable) # Copyright (C) 2014-2015 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. CLEANFILES = *~ *.cmi *.cmo *.cmx *.cmxa *.o *.a *.so OCAMLFLAGS = -g -warn-error CDEFLMPSUVYZX-3-24 if INSTALLED_TEST_HARNESS OCAMLLINKPKG = else OCAMLLINKPKG = mllib.cmxa v2v_test_harness.cmxa -cclib '-lutils -lgnu' endif OCAMLPACKAGES = -package str,unix,gettext-stub,libvirt,guestfs OCAMLLINKPKG += -linkpkg if INSTALLED_TEST_HARNESS OCAMLPACKAGES += -package v2v_test_harness else OCAMLPACKAGES += \ -I $(TEST_HARNESS_DIR)/../../common/utils/.libs \ -I $(TEST_HARNESS_DIR)/../../src/.libs \ -I $(TEST_HARNESS_DIR)/../../gnulib/lib/.libs \ -I $(TEST_HARNESS_DIR)/../../mllib \ -I $(TEST_HARNESS_DIR) endif # XXX FIXME # We don't distribute the xml.* files with the test harness. OCAMLFLAGS += -I $(top_srcdir)/../libguestfs/v2v ocamllib := $(shell ocamlc -where) # Dependencies. %.cmi: %.mli $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ %.cmo: %.ml $(OCAMLFIND) ocamlc $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ %.cmx: %.ml $(OCAMLFIND) ocamlopt $(OCAMLFLAGS) $(OCAMLPACKAGES) -c $< -o $@ depend: .depend .depend: $(wildcard $(srcdir)/*.mli $(srcdir)/*.ml) rm -f $@ $@-t $(OCAMLFIND) ocamldep -I . -I $(srcdir) $^ | \ $(SED) 's/ *$$//' | \ $(SED) -e :a -e '/ *\\$$/N; s/ *\\\n */ /; ta' | \ sort > $@-t mv $@-t $@ -include .depend SUFFIXES = .cmo .cmi .cmx .ml .mli