1 # Makefile for virt-what
3 # Copyright (C) 2008-2009 Red Hat Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program 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
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 bindir = $(prefix)/bin
24 mandir = $(prefix)/share/man
26 all: virt-what.1 virt-what.txt virt-what
28 virt-what: virt-what.sh
29 sed -e 's/@VERSION@/$(VERSION)/g' < $< > $@
32 virt-what.1: virt-what.pod
33 pod2man -c "Virtualization Support" --release "$(PACKAGE)-$(VERSION)" \
36 virt-what.txt: virt-what.pod
40 rm -f virt-what virt-what.1 virt-what.txt
46 mkdir -p $(DESTDIR)$(bindir)
47 mkdir -p $(DESTDIR)$(mandir)/man1
48 install -m 0755 virt-what $(DESTDIR)$(bindir)/
49 install -m 0644 virt-what.1 $(DESTDIR)$(mandir)/man1/
54 $(MAKE) check-manifest
55 rm -rf $(PACKAGE)-$(VERSION)
56 mkdir $(PACKAGE)-$(VERSION)
57 tar -cf - -T MANIFEST | tar -C $(PACKAGE)-$(VERSION) -xf -
58 tar zcf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
59 rm -rf $(PACKAGE)-$(VERSION)
60 ls -l $(PACKAGE)-$(VERSION).tar.gz
63 @for d in `find -type d -name CVS | grep -v '^\./debian/'`; \
66 awk -F/ '$$1 != "D" {print $$2}' $$d/Entries | \
67 sed -e "s|^|$$b|" -e "s|^\./||"; \
68 done | sort > .check-manifest; \
69 sort MANIFEST > .orig-manifest; \
70 diff -u .orig-manifest .check-manifest; rv=$$?; \
71 rm -f .orig-manifest .check-manifest; \