2 # Copyright (C) 2007 Red Hat Inc., Richard W.M. Jones
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
9 # This library 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 GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 PACKAGE = @PACKAGE_NAME@
19 VERSION = @PACKAGE_VERSION@
23 pkg_lablgtk2 = @pkg_lablgtk2@
24 pkg_curses = @pkg_curses@
25 pkg_xml_light = @pkg_xml_light@
27 OCAMLDOCFLAGS := -html -sort
29 SUBDIRS := libvirt examples mlvirsh
31 ifeq ($(pkg_lablgtk2),yes)
32 SUBDIRS += mlvirtmanager
35 ifeq ($(pkg_curses),yes)
39 ifeq ($(pkg_xml_light),yes)
43 all opt depend install:
44 for d in $(SUBDIRS); do \
46 if [ $$? -ne 0 ]; then exit 1; fi; \
50 for d in . $(SUBDIRS); do \
51 (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ core); \
53 rm -f examples/list_domains
55 rm -f mlvirtmanager/mlvirtmanager
56 rm -f virt-top/virt-top
59 rm -f config.h config.log config.status configure
62 rm -f libvirt/libvirt_version.ml
64 rm -f libvirt/Makefile
65 rm -f examples/Makefile
66 rm -f mlvirsh/Makefile
67 rm -f mlvirtmanager/Makefile
68 rm -f virt-top/Makefile
69 rm -f virt-df/Makefile
71 # Developer documentation (in html/ subdirectory).
77 ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d ../html \
78 libvirt.{ml,mli} libvirt_version.{ml,mli}
80 # Update configure and rerun.
86 --enable-debug=yes --with-libvirt=/home/rjones/local
91 $(MAKE) check-manifest
92 rm -rf $(PACKAGE)-$(VERSION)
93 mkdir $(PACKAGE)-$(VERSION)
94 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
95 $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
96 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
97 rm -rf $(PACKAGE)-$(VERSION)
98 ls -l $(PACKAGE)-$(VERSION).tar.gz
101 hg manifest | sort > .check-manifest; \
102 sort MANIFEST > .orig-manifest; \
103 diff -u .orig-manifest .check-manifest; rv=$$?; \
104 rm -f .orig-manifest .check-manifest; \
107 # Do a release (update the website).
110 $(MAKE) release_stage_2
112 release_stage_2: clean all opt doc dist
113 $(MAKE) release_stage_3
115 WEBSITE = ../redhat/websites
118 rm -f $(WEBSITE)/ocaml-libvirt/html/*.{html,css}
119 cp html/*.{html,css} $(WEBSITE)/ocaml-libvirt/html/
120 cp README $(WEBSITE)/ocaml-libvirt/README.txt
121 cp ChangeLog $(WEBSITE)/ocaml-libvirt/ChangeLog.txt
122 # cp virt-top/virt-top.txt $(WEBSITE)/virt-top/
123 # cp ChangeLog $(WEBSITE)/virt-top/ChangeLog.txt
125 # Upload to main website.
128 cd $(WEBSITE)/ocaml-libvirt && \
129 scp ChangeLog.txt index.html README.txt Screenshot*.png \
130 libvirt.org:/data/www/libvirt.org/ocaml && \
132 libvirt.org:/data/www/libvirt.org/ocaml/css/ && \
133 scp html/*.html html/*.css \
134 libvirt.org:/data/www/libvirt.org/ocaml/html/
135 scp $(PACKAGE)-$(VERSION).tar.gz libvirt.org:/data/ftp/libvirt/ocaml/
139 .PHONY: all opt depend install clean distclean configure dist check-manifest \
140 release release_stage_2 release_stage_3 force