Makefile 724 B

1234567891011121314151617181920212223242526272829
  1. VM_DIR=vm-tools
  2. PANDOC=pandoc -s -f rst -t man
  3. RPMS_DIR=rpm/
  4. VM_DOCS=$(patsubst %.rst,%.1.gz,$(wildcard $(VM_DIR)/*.rst))
  5. help:
  6. @echo "make rpms -- generate manpages and create RPM package"
  7. @echo "make rst=example.rst preview -- generate manpage preview from example.rst"
  8. @echo "make manpages -- generate manpages"
  9. @echo "make install -- generate VM manpages and copy them to /usr/share/man"
  10. install: manpages
  11. mkdir -p $(DESTDIR)/usr/share/man/man1
  12. cp $(VM_DOCS) $(DESTDIR)/usr/share/man/man1/
  13. %.1: %.rst
  14. $(PANDOC) $< > $@
  15. %.1.gz: %.1
  16. gzip -f $<
  17. manpages: $(QVM_DOCS) $(QUBES_DOCS) $(VM_DOCS)
  18. preview: $(rst)
  19. pandoc -s -f rst -t man $(rst) | groff -mandoc -Tlatin1 | less -R
  20. clean:
  21. rm -f $(VM_DOCS)