3 # Copyright (C) 2007-2008 Red Hat Inc., Richard W.M. Jones
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2 of the License, or (at your option) any later version.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 PACKAGE = @PACKAGE_NAME@
20 VERSION = @PACKAGE_VERSION@
25 OCAMLDOCFLAGS += -html -sort -package bitmatch.syntax -syntax bitmatch.syntax -I lib
26 OCAMLDOCFILES := $(wildcard lib/*.mli)
28 SUBDIRS = lib virt-df diskzip
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 \
39 *.so *.opt *~ *.dll *.exe *.annot core); \
45 rm -f config.h config.log config.status configure
48 rm -f virt-df/Makefile
53 $(MAKE) check-manifest
54 rm -rf $(PACKAGE)-$(VERSION)
55 mkdir $(PACKAGE)-$(VERSION)
56 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
57 $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
58 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
59 rm -rf $(PACKAGE)-$(VERSION)
60 ls -l $(PACKAGE)-$(VERSION).tar.gz
63 hg manifest | sort > .check-manifest; \
64 sort MANIFEST > .orig-manifest; \
65 diff -u .orig-manifest .check-manifest; rv=$$?; \
66 rm -f .orig-manifest .check-manifest; \
70 hg log --style changelog > $@.new
73 # Developer documentation (in html/ subdirectory).
76 ifneq ($(OCAMLDOCFILES),)
80 -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html $(OCAMLDOCFILES)
84 .PHONY: all opt depend install clean distclean dist check-manifest doc force