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_extlib = @pkg_extlib@
24 pkg_lablgtk2 = @pkg_lablgtk2@
25 pkg_curses = @pkg_curses@
26 pkg_xml_light = @pkg_xml_light@
28 OCAMLDOCFLAGS := -html -sort
30 SUBDIRS := libvirt examples
32 ifeq ($(pkg_extlib),yes)
36 ifeq ($(pkg_lablgtk2),yes)
37 SUBDIRS += mlvirtmanager
40 ifeq ($(pkg_extlib)$(pkg_curses),yesyes)
44 ifeq ($(pkg_extlib)$(pkg_xml_light),yesyes)
48 all opt depend install:
49 for d in $(SUBDIRS); do \
51 if [ $$? -ne 0 ]; then exit 1; fi; \
55 for d in . $(SUBDIRS); do \
56 (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ core); \
58 rm -f examples/list_domains
60 rm -f mlvirtmanager/mlvirtmanager
61 rm -f virt-top/virt-top
65 rm -f config.h config.log config.status configure
68 rm -f libvirt/libvirt_version.ml
70 rm -f libvirt/Makefile
71 rm -f examples/Makefile
72 rm -f mlvirsh/Makefile
73 rm -f mlvirtmanager/Makefile
74 rm -f virt-top/Makefile
75 rm -f virt-df/Makefile
77 # Developer documentation (in html/ subdirectory).
83 ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d ../html \
84 libvirt.{ml,mli} libvirt_version.{ml,mli}
86 # Update configure and rerun.
92 --enable-debug=yes --with-libvirt=/home/rjones/local
97 $(MAKE) check-manifest
98 rm -rf $(PACKAGE)-$(VERSION)
99 mkdir $(PACKAGE)-$(VERSION)
100 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
101 $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
102 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
103 rm -rf $(PACKAGE)-$(VERSION)
104 ls -l $(PACKAGE)-$(VERSION).tar.gz
107 hg manifest | sort > .check-manifest; \
108 sort MANIFEST > .orig-manifest; \
109 diff -u .orig-manifest .check-manifest; rv=$$?; \
110 rm -f .orig-manifest .check-manifest; \
113 # Do a release (update the website).
116 $(MAKE) release_stage_2
118 release_stage_2: clean all opt doc dist
119 $(MAKE) release_stage_3
121 WEBSITE = ../redhat/websites
124 rm -f $(WEBSITE)/ocaml-libvirt/html/*.{html,css}
125 cp html/*.{html,css} $(WEBSITE)/ocaml-libvirt/html/
126 cp README $(WEBSITE)/ocaml-libvirt/README.txt
127 cp ChangeLog $(WEBSITE)/ocaml-libvirt/ChangeLog.txt
128 # cp virt-top/virt-top.txt $(WEBSITE)/virt-top/
129 # cp ChangeLog $(WEBSITE)/virt-top/ChangeLog.txt
131 # Upload to main website.
134 cd $(WEBSITE)/ocaml-libvirt && \
135 scp ChangeLog.txt index.html README.txt Screenshot*.png \
136 libvirt.org:/data/www/libvirt.org/ocaml && \
138 libvirt.org:/data/www/libvirt.org/ocaml/css/ && \
139 scp html/*.html html/*.css \
140 libvirt.org:/data/www/libvirt.org/ocaml/html/
141 scp $(PACKAGE)-$(VERSION).tar.gz libvirt.org:/data/ftp/libvirt/ocaml/
145 .PHONY: all opt depend install clean distclean configure dist check-manifest \
146 release release_stage_2 release_stage_3 force