core-agent-linux/doc/Makefile

30 lines
723 B
Makefile
Raw Normal View History

2013-03-12 17:10:49 +01:00
VM_DIR=vm-tools
PANDOC=pandoc -s -f rst -t man
RPMS_DIR=rpm/
VM_DOCS=$(patsubst %.rst,%.1.gz,$(wildcard $(VM_DIR)/*.rst))
help:
@echo "make rpms -- generate manpages and create RPM package"
@echo "make rst=example.rst preview -- generate manpage preview from example.rst"
@echo "make manpages -- generate manpages"
@echo "make install -- generate VM manpages and copy them to /usr/share/man"
install: manpages
mkdir -p $(DESTDIR)/usr/share/man/man1
cp $(VM_DOCS) $(DESTDIR)/usr/share/man/man1/
%.1: %.rst
$(PANDOC) $< > $@
%.1.gz: %.1
gzip -f $<
manpages: $(QVM_DOCS) $(QUBES_DOCS) $(VM_DOCS)
2015-10-15 04:34:55 +02:00
2013-03-12 17:10:49 +01:00
preview: $(rst)
pandoc -s -f rst -t man $(rst) | groff -mandoc -Tlatin1 | less -R
clean:
rm -f $(VM_DOCS)