Fix parsing error with ~ versus -
[virt-df.git] / Makefile.in
1 # virt-df
2 # @configure_input@
3 # Copyright (C) 2007-2008 Red Hat Inc., Richard W.M. Jones
4 #
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.
9 #
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.
14 #
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
18
19 PACKAGE         = @PACKAGE_NAME@
20 VERSION         = @PACKAGE_VERSION@
21
22 INSTALL         = @INSTALL@
23
24 OCAMLDOC        = @OCAMLDOC@
25 OCAMLDOCFLAGS   += -html -sort -package bitstring -I lib
26 OCAMLDOCFILES   := $(wildcard lib/diskimage*.mli) lib/int63.mli
27
28 SUBDIRS         = lib virt-df diskzip
29
30 all opt depend install:
31         for d in $(SUBDIRS); do \
32           $(MAKE) -C $$d $@; \
33           if [ $$? -ne 0 ]; then exit 1; fi; \
34         done
35
36 clean:
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); \
40         done
41         rm -f virt-df/virt-df
42         rm -f diskzip/diskzip
43
44 distclean: clean
45         rm -f config.h config.log config.status configure
46         rm -rf autom4te.cache
47         rm -f Makefile
48         rm -f virt-df/Makefile
49
50 # Distribution.
51
52 dist: ChangeLog
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
61
62 check-manifest:
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; \
67         exit $$rv
68
69 ChangeLog:
70         hg log --style changelog > $@.new
71         mv $@.new $@
72
73 # Developer documentation (in html/ subdirectory).
74
75 ifneq ($(OCAMLDOC),)
76 ifneq ($(OCAMLDOCFILES),)
77 doc:
78         rm -rf html
79         mkdir html
80         -ocamlfind ocamldoc $(OCAMLDOCFLAGS) -d html $(OCAMLDOCFILES)
81 endif
82 endif
83
84 .PHONY: all opt depend install clean distclean dist check-manifest doc force