<commit_before>__nmk_dir ?= ../scripts/nmk/scripts/
include $(__nmk_dir)include.mk
include $(__nmk_dir)macro.mk

ASCIIDOC	:= asciidoc
A2X		:= a2x
XMLTO		:= xmlto

FOOTER		:= footer.txt
SRC		+= criu.txt
XMLS		:= $(patsubst %.txt,%.xml,$(SRC))
MANS		:= $(patsubst %.txt,%.8,$(SRC))
MAN8DIR		:= $(MANDIR)/man8

GROFF		:=groff
PAPER		:=$(shell paperconf 2>/dev/null || echo letter)
GROFF_OPTS	:= -Tps -t -dpaper=$(PAPER) -P-p$(PAPER) -man -msafer -rC1 -rD1 -rS11
PSS		:= $(MANS:%.8=%.ps)
PDFS		:= $(MANS:%.8=%.pdf)

all: check $(MANS)
ps: $(PSS)
pdf: $(PDFS)
.PHONY: all ps pdf check

check:
	$(Q) for B in $(ASCIIDOC) $(A2X) $(XMLTO); do	\
		$$B --version > /dev/null || exit 1;	\
	done

ifeq ($(CRIU_VERSION),)
 include ../Makefile.versions
endif
$(FOOTER): ../Makefile.versions
	$(call msg-gen, $@)
	$(Q) echo ":doctype:       manpage"		>  $@
	$(Q) echo ":man source:    criu"		>> $@
	$(Q) echo ":man version:   $(CRIU_VERSION)"	>> $@
	$(Q) echo ":man manual:    CRIU Manual"		>> $@

$(SRC): $(FOOTER)
	@true

%.8: %.txt
	$(call msg-gen, $@)<commit_msg>doc/Makefile: fix deps<commit_after>__nmk_dir ?= ../scripts/nmk/scripts/
include $(__nmk_dir)include.mk
include $(__nmk_dir)macro.mk

ASCIIDOC	:= asciidoc
A2X		:= a2x
XMLTO		:= xmlto

FOOTER		:= footer.txt
SRC		+= criu.txt
XMLS		:= $(patsubst %.txt,%.xml,$(SRC))
MANS		:= $(patsubst %.txt,%.8,$(SRC))
MAN8DIR		:= $(MANDIR)/man8

GROFF		:=groff
PAPER		:=$(shell paperconf 2>/dev/null || echo letter)
GROFF_OPTS	:= -Tps -t -dpaper=$(PAPER) -P-p$(PAPER) -man -msafer -rC1 -rD1 -rS11
PSS		:= $(MANS:%.8=%.ps)
PDFS		:= $(MANS:%.8=%.pdf)

all: check $(MANS)
ps: $(PSS)
pdf: $(PDFS)
.PHONY: all ps pdf check

check:
	$(Q) for B in $(ASCIIDOC) $(A2X) $(XMLTO); do	\
		$$B --version > /dev/null || exit 1;	\
	done

ifeq ($(CRIU_VERSION),)
 include ../Makefile.versions
endif
$(FOOTER): ../Makefile.versions
	$(call msg-gen, $@)
	$(Q) echo ":doctype:       manpage"		>  $@
	$(Q) echo ":man source:    criu"		>> $@
	$(Q) echo ":man version:   $(CRIU_VERSION)"	>> $@
	$(Q) echo ":man manual:    CRIU Manual"		>> $@

%.8: %.txt $(FOOTER) custom.xsl
	$(call msg-gen, $@)
{'fraction_non_alphanumeric': 0.23529411764705882, 'fraction_numerical': 0.014231499051233396, 'mean_word_length': 3.4872340425531916, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4188958', 'n_tokens_mistral': 1047, 'n_tokens_neox': 982, 'n_words': 219}