1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 include ../../scripts/Makefile.include 2 include ../../scripts/Makefile.include 3 include ../../scripts/utilities.mak 3 include ../../scripts/utilities.mak 4 BINDIR=usr/bin 4 BINDIR=usr/bin 5 MANDIR=usr/share/man 5 MANDIR=usr/share/man 6 MAN1DIR=$(MANDIR)/man1 6 MAN1DIR=$(MANDIR)/man1 7 7 8 MAN1=kvm_stat.1 8 MAN1=kvm_stat.1 9 9 10 A2X=a2x 10 A2X=a2x 11 a2x_path := $(call get-executable,$(A2X)) 11 a2x_path := $(call get-executable,$(A2X)) 12 12 13 all: man 13 all: man 14 14 15 ifneq ($(findstring $(MAKEFLAGS),s),s) 15 ifneq ($(findstring $(MAKEFLAGS),s),s) 16 ifneq ($(V),1) 16 ifneq ($(V),1) 17 QUIET_A2X = @echo ' A2X '$@; 17 QUIET_A2X = @echo ' A2X '$@; 18 endif 18 endif 19 endif 19 endif 20 20 21 %.1: %.txt 21 %.1: %.txt 22 ifeq ($(a2x_path),) 22 ifeq ($(a2x_path),) 23 $(error "You need to install asciidoc 23 $(error "You need to install asciidoc for man pages") 24 else 24 else 25 $(QUIET_A2X)$(A2X) --doctype manpage - 25 $(QUIET_A2X)$(A2X) --doctype manpage --format manpage $< 26 endif 26 endif 27 27 28 clean: 28 clean: 29 rm -f $(MAN1) 29 rm -f $(MAN1) 30 30 31 man: $(MAN1) 31 man: $(MAN1) 32 32 33 install-man: man 33 install-man: man 34 install -d -m 755 $(INSTALL_ROOT)/$(MA 34 install -d -m 755 $(INSTALL_ROOT)/$(MAN1DIR) 35 install -m 644 kvm_stat.1 $(INSTALL_RO 35 install -m 644 kvm_stat.1 $(INSTALL_ROOT)/$(MAN1DIR) 36 36 37 install-tools: 37 install-tools: 38 install -d -m 755 $(INSTALL_ROOT)/$(BI 38 install -d -m 755 $(INSTALL_ROOT)/$(BINDIR) 39 install -m 755 -p "kvm_stat" "$(INSTAL 39 install -m 755 -p "kvm_stat" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)" 40 40 41 install: install-tools install-man 41 install: install-tools install-man 42 .PHONY: all clean man install-tools install-ma 42 .PHONY: all clean man install-tools install-man install
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.