3 # Copyright (C) 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@
24 datarootdir = @datarootdir@
27 HAVE_PERLDOC = @HAVE_PERLDOC@
29 TOOLS = uname dmesg ps
31 ifeq ($(HAVE_PERLDOC),perldoc)
32 MANPAGES = virt-mem.1 $(TOOLS:%=virt-%.1)
33 TEXTMANPAGES = virt-mem.txt
36 TARGETS = $(MANPAGES) $(TEXTMANPAGES)
39 for d in lib $(TOOLS) po; do \
41 if [ $$? -ne 0 ]; then exit 1; fi; \
45 for d in lib $(TOOLS) po; do \
47 if [ $$? -ne 0 ]; then exit 1; fi; \
51 for d in lib $(TOOLS); do \
53 if [ $$? -ne 0 ]; then exit 1; fi; \
57 for d in . lib $(TOOLS); do \
58 (cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a \
59 *.so *.opt *~ *.dll *.exe *.annot core); \
64 rm -f uname/virt-uname
65 rm -f dmesg/virt-dmesg
69 rm -f config.h config.log config.status configure
72 rm -f virt-df/Makefile
76 ifeq ($(HAVE_PERLDOC),perldoc)
77 virt-mem.1: virt-mem.pod
78 pod2man -c "Virtualization Support" --release "$(PACKAGE)-$(VERSION)" \
81 virt-mem.txt: virt-mem.pod
85 echo '.so man1/virt-mem.1' > $@
88 $(MKDIR_P) $(DESTDIR)$(mandir)/man1
89 $(INSTALL) -m 0644 $(MANPAGES) $(DESTDIR)$(mandir)/man1/
100 $(MAKE) check-manifest
101 rm -rf $(PACKAGE)-$(VERSION)
102 mkdir $(PACKAGE)-$(VERSION)
103 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
104 hg log --style changelog > $(PACKAGE)-$(VERSION)/ChangeLog
105 $(INSTALL) -m 0755 configure $(PACKAGE)-$(VERSION)/
106 $(INSTALL) -m 0644 config.h.in $(PACKAGE)-$(VERSION)/
107 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
108 rm -rf $(PACKAGE)-$(VERSION)
109 ls -l $(PACKAGE)-$(VERSION).tar.gz
112 hg manifest | sort > .check-manifest; \
113 sort MANIFEST > .orig-manifest; \
114 diff -u .orig-manifest .check-manifest; rv=$$?; \
115 rm -f .orig-manifest .check-manifest; \
118 .PHONY: all opt depend install clean distclean configure dist check-manifest \
119 release release_stage_2 release_stage_3 force