Updated ChangeLog.
[virt-top.git] / Makefile.in
1 # $Id: Makefile.in,v 1.7 2007/08/23 09:36:04 rjones Exp $
2
3 PACKAGE         = @PACKAGE_NAME@
4 VERSION         = @PACKAGE_VERSION@
5
6 INSTALL         = @INSTALL@
7
8 pkg_lablgtk2    = @pkg_lablgtk2@
9 pkg_curses      = @pkg_curses@
10 pkg_xml_light   = @pkg_xml_light@
11
12 OCAMLDOCFLAGS   := -html -sort
13
14 SUBDIRS         := libvirt examples mlvirsh
15
16 ifeq ($(pkg_lablgtk2),yes)
17 SUBDIRS         += mlvirtmanager
18 endif
19
20 ifeq ($(pkg_curses),yes)
21 SUBDIRS         += virt-top
22 endif
23
24 #ifeq ($(pkg_xml_light),yes)
25 #SUBDIRS                += virt-df
26 #endif
27
28 all opt depend install:
29         for d in $(SUBDIRS); do \
30           $(MAKE) -C $$d $@; \
31           if [ $$? -ne 0 ]; then exit 1; fi; \
32         done
33
34 clean:
35         for d in . $(SUBDIRS); do \
36           (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ core); \
37         done
38         rm -f examples/list_domains
39         rm -f mlvirsh/mlvirsh
40         rm -f mlvirtmanager/mlvirtmanager
41         rm -f virt-top/virt-top
42
43 distclean:
44         rm -f config.h config.log config.status configure META
45         rm -rf autom4te.cache
46         rm -f Makefile
47
48 # Developer documentation (in html/ subdirectory).
49
50 doc:
51         rm -rf html
52         mkdir html
53         -cd libvirt; \
54         ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d ../html \
55           libvirt.{ml,mli} libvirt_version.{ml,mli}
56
57 # Update configure and rerun.
58
59 configure: force
60         autoreconf
61         CFLAGS=-g \
62           ./configure \
63           --enable-debug=yes --with-libvirt=/home/rjones/local
64
65 # Distribution.
66
67 dist:
68         $(MAKE) check-manifest
69         rm -rf $(PACKAGE)-$(VERSION)
70         mkdir $(PACKAGE)-$(VERSION)
71         tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
72         $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
73         tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
74         rm -rf $(PACKAGE)-$(VERSION)
75         ls -l $(PACKAGE)-$(VERSION).tar.gz
76
77 check-manifest:
78         hg manifest | sort > .check-manifest; \
79         sort MANIFEST > .orig-manifest; \
80         diff -u .orig-manifest .check-manifest; rv=$$?; \
81         rm -f .orig-manifest .check-manifest; \
82         exit $$rv
83
84 # Do a release (update the website).
85
86 release: configure
87         $(MAKE) release_stage_2
88
89 release_stage_2: clean all opt doc dist
90         $(MAKE) release_stage_3
91
92 WEBSITE = ../redhat/et-website
93
94 release_stage_3:
95         rm -f $(WEBSITE)/ocaml-libvirt/html/*.{html,css}
96         cp html/*.{html,css} $(WEBSITE)/ocaml-libvirt/html/
97         cp $(PACKAGE)-$(VERSION).tar.gz $(WEBSITE)/ocaml-libvirt/
98         cp README $(WEBSITE)/ocaml-libvirt/README.txt
99         cp ChangeLog $(WEBSITE)/ocaml-libvirt/ChangeLog.txt
100         cp virt-top/virt-top.txt $(WEBSITE)/virt-top/
101         cp ChangeLog $(WEBSITE)/virt-top/ChangeLog.txt
102
103 force:
104
105 .PHONY: all opt depend install clean distclean configure dist check-manifest \
106         release release_stage_2 release_stage_3 force