1 PACKAGE = @PACKAGE_NAME@
2 VERSION = @PACKAGE_VERSION@
6 pkg_lablgtk2 = @pkg_lablgtk2@
7 pkg_curses = @pkg_curses@
8 pkg_xml_light = @pkg_xml_light@
10 OCAMLDOCFLAGS := -html -sort
12 SUBDIRS := libvirt examples mlvirsh
14 ifeq ($(pkg_lablgtk2),yes)
15 SUBDIRS += mlvirtmanager
18 ifeq ($(pkg_curses),yes)
22 ifeq ($(pkg_xml_light),yes)
26 all opt depend install:
27 for d in $(SUBDIRS); do \
29 if [ $$? -ne 0 ]; then exit 1; fi; \
33 for d in . $(SUBDIRS); do \
34 (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ core); \
36 rm -f examples/list_domains
38 rm -f mlvirtmanager/mlvirtmanager
39 rm -f virt-top/virt-top
42 rm -f config.h config.log config.status configure
45 rm -f libvirt/libvirt_version.ml
47 rm -f libvirt/Makefile
48 rm -f examples/Makefile
49 rm -f mlvirsh/Makefile
50 rm -f mlvirtmanager/Makefile
51 rm -f virt-top/Makefile
52 rm -f virt-df/Makefile
54 # Developer documentation (in html/ subdirectory).
60 ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d ../html \
61 libvirt.{ml,mli} libvirt_version.{ml,mli}
63 # Update configure and rerun.
69 --enable-debug=yes --with-libvirt=/home/rjones/local
74 $(MAKE) check-manifest
75 rm -rf $(PACKAGE)-$(VERSION)
76 mkdir $(PACKAGE)-$(VERSION)
77 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
78 $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
79 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
80 rm -rf $(PACKAGE)-$(VERSION)
81 ls -l $(PACKAGE)-$(VERSION).tar.gz
84 hg manifest | sort > .check-manifest; \
85 sort MANIFEST > .orig-manifest; \
86 diff -u .orig-manifest .check-manifest; rv=$$?; \
87 rm -f .orig-manifest .check-manifest; \
90 # Do a release (update the website).
93 $(MAKE) release_stage_2
95 release_stage_2: clean all opt doc dist
96 $(MAKE) release_stage_3
98 WEBSITE = ../redhat/et-website
101 rm -f $(WEBSITE)/ocaml-libvirt/html/*.{html,css}
102 cp html/*.{html,css} $(WEBSITE)/ocaml-libvirt/html/
103 cp $(PACKAGE)-$(VERSION).tar.gz $(WEBSITE)/ocaml-libvirt/
104 cp README $(WEBSITE)/ocaml-libvirt/README.txt
105 cp ChangeLog $(WEBSITE)/ocaml-libvirt/ChangeLog.txt
106 cp virt-top/virt-top.txt $(WEBSITE)/virt-top/
107 cp ChangeLog $(WEBSITE)/virt-top/ChangeLog.txt
111 .PHONY: all opt depend install clean distclean configure dist check-manifest \
112 release release_stage_2 release_stage_3 force