Backed out changeset b6f239031d2f
[virt-mem.git] / Makefile.in
1 # virt-mem
2 # @configure_input@
3 # Copyright (C) 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 SUBDIRS         = lib uname dmesg
25
26 all install:
27         for d in $(SUBDIRS) po; do \
28           $(MAKE) -C $$d $@; \
29           if [ $$? -ne 0 ]; then exit 1; fi; \
30         done
31
32 depend doc:
33         for d in $(SUBDIRS); do \
34           $(MAKE) -C $$d $@; \
35           if [ $$? -ne 0 ]; then exit 1; fi; \
36         done
37
38 clean:
39         for d in . $(SUBDIRS); do \
40           (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
41             *.so *.opt *~ *.dll *.exe *.annot core); \
42         done
43         for d in po; do \
44           (cd $$d; rm -f *~); \
45         done
46         rm -f uname/virt-uname
47         rm -f dmesg/virt-dmesg
48
49 distclean: clean
50         rm -f config.h config.log config.status configure
51         rm -rf autom4te.cache
52         rm -f Makefile
53         rm -f virt-df/Makefile
54
55 # Distribution.
56
57 dist:
58         $(MAKE) check-manifest
59         rm -rf $(PACKAGE)-$(VERSION)
60         mkdir $(PACKAGE)-$(VERSION)
61         tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
62         $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
63         tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
64         rm -rf $(PACKAGE)-$(VERSION)
65         ls -l $(PACKAGE)-$(VERSION).tar.gz
66
67 check-manifest:
68         hg manifest | sort > .check-manifest; \
69         sort MANIFEST > .orig-manifest; \
70         diff -u .orig-manifest .check-manifest; rv=$$?; \
71         rm -f .orig-manifest .check-manifest; \
72         exit $$rv
73
74 .PHONY: all opt depend install clean distclean configure dist check-manifest \
75         release release_stage_2 release_stage_3 force