diff --git a/Documentation/Makefile b/Documentation/Makefile index 9668f4246..de41b3bb2 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -7,16 +7,21 @@ A2X := a2x XMLTO := xmlto FOOTER := footer.txt -SRC += criu.txt +SRC1 += crit.txt +SRC8 += criu.txt +SRC := $(SRC1) $(SRC8) XMLS := $(patsubst %.txt,%.xml,$(SRC)) -MANS := $(patsubst %.txt,%.8,$(SRC)) +MAN1S := $(patsubst %.txt,%.1,$(SRC1)) +MAN8S := $(patsubst %.txt,%.8,$(SRC8)) +MANS := $(MAN1S) $(MAN8S) +MAN1DIR := $(MANDIR)/man1 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) +PSS := $(patsubst %,%.ps,$(basename $(MANS))) +PDFS := $(patsubst %,%.pdf,$(basename $(MANS))) all: check $(MANS) ps: $(PSS) @@ -38,11 +43,20 @@ $(FOOTER): ../Makefile.versions $(Q) echo ":man version: $(CRIU_VERSION)" >> $@ $(Q) echo ":man manual: CRIU Manual" >> $@ +%.1: %.txt $(FOOTER) custom.xsl + $(call msg-gen, $@) + $(Q) $(ASCIIDOC) -b docbook -d manpage -o $(patsubst %.1,%.xml,$@) $< + $(Q) $(XMLTO) man -m custom.xsl $(patsubst %.1,%.xml,$@) 2>/dev/null + %.8: %.txt $(FOOTER) custom.xsl $(call msg-gen, $@) $(Q) $(ASCIIDOC) -b docbook -d manpage -o $(patsubst %.8,%.xml,$@) $< $(Q) $(XMLTO) man -m custom.xsl $(patsubst %.8,%.xml,$@) 2>/dev/null +%.ps: %.1 + $(call msg-gen, $@) + $(Q) $(GROFF) $(GROFF_OPTS) $^ > $@ + %.ps: %.8 $(call msg-gen, $@) $(Q) $(GROFF) $(GROFF_OPTS) $^ > $@ @@ -56,12 +70,17 @@ clean: $(Q) rm -f $(XMLS) $(MANS) $(PSS) $(PDFS) $(FOOTER) install: $(MANS) - $(E) " INSTALL " $(MANS) + $(E) " INSTALL " $(MAN8S) $(Q) mkdir -p $(DESTDIR)$(MAN8DIR) - $(Q) install -m 644 $(MANS) $(DESTDIR)$(MAN8DIR) + $(Q) install -m 644 $(MAN8S) $(DESTDIR)$(MAN8DIR) + $(E) " INSTALL " $(MAN1S) + $(Q) mkdir -p $(DESTDIR)$(MAN1DIR) + $(Q) install -m 644 $(MAN1S) $(DESTDIR)$(MAN1DIR) uninstall: - $(E) " UNINSTALL" $(MANS) - $(Q) $(RM) $(addprefix $(DESTDIR)$(MAN8DIR)/,$(MANS)) + $(E) " UNINSTALL" $(MAN1S) + $(Q) $(RM) $(addprefix $(DESTDIR)$(MAN1DIR)/,$(MAN1S)) + $(E) " UNINSTALL" $(MAN8S) + $(Q) $(RM) $(addprefix $(DESTDIR)$(MAN8DIR)/,$(MAN8S)) .PHONY: clean install uninstall diff --git a/Documentation/crit.txt b/Documentation/crit.txt new file mode 100644 index 000000000..32636c5b2 --- /dev/null +++ b/Documentation/crit.txt @@ -0,0 +1,58 @@ +CRIT(1) +======= +include::footer.txt[] + +NAME +---- +crit - CRiu Image Tool + +SYNOPSIS +-------- +*crit* 'decode' [-h] [-i IN] [-o OUT] [--pretty] + +*crit* 'encode' [-h] [-i IN] [-o OUT] + +*crit* 'info' [-h] in + +*crit* 'x' [-h] dir {ps,fds,mems} + +*crit* 'show' [-h] in + +DESCRIPTION +----------- +*crit* is a feature-rich replacement for existing *criu* show. + +ARGUMENTS +--------- + +Positional Arguments +~~~~~~~~~~~~~~~~~~~~ + +*decode*:: + convert *criu* image from binary type JSON + +*encode*:: + convert *criu* image from JSON type to binary + +*info*:: + show info about image + +*x*:: + explore image directory + +*show*:: + convert *criu* image from binary to human-readable JSON + +Optional Arguments +~~~~~~~~~~~~~~~~~~ + +*-h*, *--help*:: + Print some help and exit + +SEE ALSO +-------- +criu(8) + +AUTHOR +------ +The CRIU team