mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-18 00:58:31 +00:00
Doc/Makefile: add ps and pdf generation
It can be handful to check how a man page looks in PDF or Postscript. Use 'make ps' and 'make pdf' to generate one. Signed-off-by: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
5e10cb7319
commit
19ea709e1a
2 changed files with 21 additions and 1 deletions
2
Documentation/.gitignore
vendored
2
Documentation/.gitignore
vendored
|
|
@ -1,3 +1,5 @@
|
|||
*.xml
|
||||
*.html
|
||||
*.[1-8]
|
||||
*.pdf
|
||||
*.ps
|
||||
|
|
|
|||
|
|
@ -9,16 +9,34 @@ 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: $(MANS)
|
||||
ps: $(PSS)
|
||||
pdf: $(PDFS)
|
||||
.PHONY: all ps pdf
|
||||
|
||||
%.8: %.txt
|
||||
$(E) " GEN " $@
|
||||
$(Q) $(ASCIIDOC) -b docbook -d manpage -o $(patsubst %.8,%.xml,$@) $<
|
||||
$(Q) $(XMLTO) man --skip-validation $(patsubst %.8,%.xml,$@) 2>/dev/null
|
||||
|
||||
%.ps: %.8
|
||||
$(E) " GEN " $@
|
||||
$(Q) $(GROFF) $(GROFF_OPTS) $^ > $@
|
||||
|
||||
%.pdf: %.ps
|
||||
$(E) " GEN " $@
|
||||
$(Q) ps2pdf $< $@
|
||||
|
||||
clean:
|
||||
$(E) " CLEAN "
|
||||
$(Q) rm -f $(XMLS) $(MANS)
|
||||
$(Q) rm -f $(XMLS) $(MANS) $(PSS) $(PDFS)
|
||||
|
||||
install: $(MANS)
|
||||
$(E) " INSTALL " $(MANS)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue