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@
26 OCAMLDOCFLAGS := -html -sort
30 all opt depend install:
31 for d in $(SUBDIRS); do \
33 if [ $$? -ne 0 ]; then exit 1; fi; \
37 for d in . $(SUBDIRS); do \
38 (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ *.dll core); \
40 rm -f examples/list_domains
42 rm -f virt-ctrl/virt-ctrl
43 rm -f virt-top/virt-top
47 rm -f config.h config.log config.status configure
50 rm -f libvirt/libvirt_version.ml
52 rm -f libvirt/Makefile
53 rm -f examples/Makefile
54 rm -f mlvirsh/Makefile
55 rm -f virt-ctrl/Makefile
56 rm -f virt-top/Makefile
57 rm -f virt-df/Makefile
59 # Developer documentation (in html/ subdirectory).
66 $(OCAMLDOC) $(OCAMLDOCFLAGS) -d ../html \
67 libvirt.{ml,mli} libvirt_version.{ml,mli}
70 # Windows installer (requires NSIS).
73 wininstaller: $(PACKAGE)-$(VERSION).exe
75 $(PACKAGE)-$(VERSION).exe: wininstaller.nsis all opt
77 //DPACKAGE=$(PACKAGE) //DVERSION=$(VERSION) \
82 # Update configure and rerun.
88 --enable-debug=yes --with-libvirt=/home/rjones/local
93 $(MAKE) check-manifest
94 rm -rf $(PACKAGE)-$(VERSION)
95 mkdir $(PACKAGE)-$(VERSION)
96 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
97 $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
98 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
99 rm -rf $(PACKAGE)-$(VERSION)
100 ls -l $(PACKAGE)-$(VERSION).tar.gz
103 hg manifest | sort > .check-manifest; \
104 sort MANIFEST > .orig-manifest; \
105 diff -u .orig-manifest .check-manifest; rv=$$?; \
106 rm -f .orig-manifest .check-manifest; \
109 # Do a release (update the website).
112 $(MAKE) release_stage_2
114 release_stage_2: clean all opt doc dist
115 $(MAKE) release_stage_3
117 WEBSITE = ../redhat/websites
120 rm -f $(WEBSITE)/ocaml-libvirt/html/*.{html,css}
121 cp html/*.{html,css} $(WEBSITE)/ocaml-libvirt/html/
122 cp README $(WEBSITE)/ocaml-libvirt/README.txt
123 cp ChangeLog $(WEBSITE)/ocaml-libvirt/ChangeLog.txt
124 # cp virt-top/virt-top.txt $(WEBSITE)/virt-top/
125 # cp ChangeLog $(WEBSITE)/virt-top/ChangeLog.txt
127 # Upload to main website.
130 cd $(WEBSITE)/ocaml-libvirt && \
131 scp ChangeLog.txt index.html README.txt Screenshot*.png \
132 libvirt.org:/data/www/libvirt.org/ocaml && \
134 libvirt.org:/data/www/libvirt.org/ocaml/css/ && \
135 scp html/*.html html/*.css \
136 libvirt.org:/data/www/libvirt.org/ocaml/html/
137 scp $(PACKAGE)-$(VERSION).tar.gz libvirt.org:/data/ftp/libvirt/ocaml/
141 .PHONY: all opt depend install clean distclean configure dist check-manifest \
142 release release_stage_2 release_stage_3 force