# virt-tools # Copyright (C) 2009 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. EXTRA_DIST = \ virt-tools-get-key.pl \ virt-tools-get-transport.pl \ virt-uname.pl \ virt-ifconfig.pl bin_SCRIPTS = \ virt-tools-get-key \ virt-tools-get-transport \ virt-uname \ virt-ifconfig # These programs are hard linked to virt-uname. The Perl script uses # the value of argv[0] to work out which tool to run. PROGS = \ virt-ping \ virt-ps \ virt-uptime all-local: for prog in $(PROGS); do \ ln -sf virt-uname $$prog; \ done install-exec-hook: for prog in $(PROGS); do \ ln $(DESTDIR)$(bindir)/virt-uname $(DESTDIR)$(bindir)/$$prog; \ done man_MANS = $(generated_mans) virt-tools.8 virt-ifconfig.8 generated_mans = virt-uname.8 $(PROGS:%=%.8) $(generated_mans): rm -f $@-t echo '.so man8/virt-tools.8' > $@-t mv $@-t $@ virt-tools.8: virt-uname $(POD2MAN) \ --section 8 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ --name "virt-tools" \ $< > $@-t && mv $@-t $@ virt-ifconfig.8: virt-ifconfig $(POD2MAN) \ --section 8 \ -c "Virtualization Support" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ $< > $@-t && mv $@-t $@ CLEANFILES = $(generated_mans)