1*b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2fd41b5a9SPaolo Bonziniinclude ../../scripts/Makefile.include 3fd41b5a9SPaolo Bonziniinclude ../../scripts/utilities.mak 4f9bc9e65SJanosch FrankBINDIR=usr/bin 5fd41b5a9SPaolo BonziniMANDIR=usr/share/man 6fd41b5a9SPaolo BonziniMAN1DIR=$(MANDIR)/man1 7f9bc9e65SJanosch Frank 8fd41b5a9SPaolo BonziniMAN1=kvm_stat.1 9fd41b5a9SPaolo Bonzini 10fd41b5a9SPaolo BonziniA2X=a2x 11fd41b5a9SPaolo Bonzinia2x_path := $(call get-executable,$(A2X)) 12fd41b5a9SPaolo Bonzini 13fd41b5a9SPaolo Bonziniall: man 14fd41b5a9SPaolo Bonzini 15fd41b5a9SPaolo Bonziniifneq ($(findstring $(MAKEFLAGS),s),s) 16fd41b5a9SPaolo Bonzini ifneq ($(V),1) 17fd41b5a9SPaolo Bonzini QUIET_A2X = @echo ' A2X '$@; 18fd41b5a9SPaolo Bonzini endif 19fd41b5a9SPaolo Bonziniendif 20fd41b5a9SPaolo Bonzini 21fd41b5a9SPaolo Bonzini%.1: %.txt 22fd41b5a9SPaolo Bonziniifeq ($(a2x_path),) 23fd41b5a9SPaolo Bonzini $(error "You need to install asciidoc for man pages") 24fd41b5a9SPaolo Bonzinielse 25fd41b5a9SPaolo Bonzini $(QUIET_A2X)$(A2X) --doctype manpage --format manpage $< 26fd41b5a9SPaolo Bonziniendif 27fd41b5a9SPaolo Bonzini 28fd41b5a9SPaolo Bonziniclean: 29fd41b5a9SPaolo Bonzini rm -f $(MAN1) 30fd41b5a9SPaolo Bonzini 31fd41b5a9SPaolo Bonziniman: $(MAN1) 32fd41b5a9SPaolo Bonzini 33fd41b5a9SPaolo Bonziniinstall-man: man 34fd41b5a9SPaolo Bonzini install -d -m 755 $(INSTALL_ROOT)/$(MAN1DIR) 35fd41b5a9SPaolo Bonzini install -m 644 kvm_stat.1 $(INSTALL_ROOT)/$(MAN1DIR) 36fd41b5a9SPaolo Bonzini 37fd41b5a9SPaolo Bonziniinstall-tools: 38fd41b5a9SPaolo Bonzini install -d -m 755 $(INSTALL_ROOT)/$(BINDIR) 39f9bc9e65SJanosch Frank install -m 755 -p "kvm_stat" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" 40fd41b5a9SPaolo Bonzini 41fd41b5a9SPaolo Bonziniinstall: install-tools install-man 42fd41b5a9SPaolo Bonzini.PHONY: all clean man install-tools install-man install 43