Added configure_input headers to generated files.
[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
26
27 SUBDIRS         = lib virt-df diskzip
28
29 all opt depend install:
30         for d in $(SUBDIRS); do \
31           $(MAKE) -C $$d $@; \
32           if [ $$? -ne 0 ]; then exit 1; fi; \
33         done
34
35 clean:
36         for d in . $(SUBDIRS); do \
37           (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
38             *.so *.opt *~ *.dll *.exe *.annot core); \
39         done
40         rm -f virt-df/virt-df
41
42 distclean: clean
43         rm -f config.h config.log config.status configure
44         rm -rf autom4te.cache
45         rm -f Makefile
46         rm -f virt-df/Makefile
47
48 # Developer documentation (in html/ subdirectory).
49
50 ifneq ($(OCAMLDOC),)
51 doc:
52         rm -rf html
53         mkdir html
54         -cd lib; \
55         $(OCAMLDOC) $(OCAMLDOCFLAGS) -d ../html \
56           -I +extlib -I +bitmatch \
57           int63.mli diskimage.mli diskimage.ml
58 endif
59
60 # Distribution.
61
62 dist:
63         $(MAKE) check-manifest
64         rm -rf $(PACKAGE)-$(VERSION)
65         mkdir $(PACKAGE)-$(VERSION)
66         tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
67         $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
68         tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
69         rm -rf $(PACKAGE)-$(VERSION)
70         ls -l $(PACKAGE)-$(VERSION).tar.gz
71
72 check-manifest:
73         hg manifest | sort > .check-manifest; \
74         sort MANIFEST > .orig-manifest; \
75         diff -u .orig-manifest .check-manifest; rv=$$?; \
76         rm -f .orig-manifest .check-manifest; \
77         exit $$rv
78
79 .PHONY: all opt depend install clean distclean configure dist check-manifest \
80         release release_stage_2 release_stage_3 force