ef2eadca10c1942947f55c6aa4dcbfb8499ed510
[virt-top.git] / Makefile.in
1 # virt-top
2 # Copyright (C) 2007-2009 Red Hat Inc., Richard W.M. Jones
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
17
18 PACKAGE         = @PACKAGE_NAME@
19 VERSION         = @PACKAGE_VERSION@
20
21 INSTALL         = @INSTALL@
22
23 MAKENSIS        = @MAKENSIS@
24
25 SUBDIRS         = virt-top
26
27 all opt depend install:
28         for d in $(SUBDIRS); do \
29           $(MAKE) -C $$d $@; \
30           if [ $$? -ne 0 ]; then exit 1; fi; \
31         done
32
33 clean:
34         for d in . $(SUBDIRS); do \
35           (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ *.dll *.exe core); \
36         done
37         rm -f virt-top/virt-top
38
39 distclean: clean
40         rm -f config.h config.log config.status configure
41         rm -rf autom4te.cache
42         rm -f Makefile
43         rm -f virt-top/Makefile
44
45 # Distribution.
46
47 dist: ChangeLog
48         $(MAKE) check-manifest
49         rm -rf $(PACKAGE)-$(VERSION)
50         mkdir $(PACKAGE)-$(VERSION)
51         tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
52         $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
53         tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
54         rm -rf $(PACKAGE)-$(VERSION)
55         ls -l $(PACKAGE)-$(VERSION).tar.gz
56
57 check-manifest:
58         git ls-files | sort > .check-manifest; \
59         sort MANIFEST > .orig-manifest; \
60         diff -u .orig-manifest .check-manifest; rv=$$?; \
61         rm -f .orig-manifest .check-manifest; \
62         exit $$rv
63
64 ChangeLog: $(shell find -type f)
65         ./gitlog-to-changelog > $@.new
66         mv $@.new $@
67
68 .PHONY: all opt depend install clean distclean force