Makefile 912 B

123456789101112131415161718192021222324252627282930313233343536
  1. TARGETS := pisg-doc.txt pisg-doc.html pisg-faq.html pisg-formats.html pisg.1
  2. VERSION := $(shell grep "version =>" ../modules/Pisg.pm | sed 's/[^"]*"\([^"]*\)".*/\1/; s/+CVS//')
  3. all: $(TARGETS)
  4. pisg-doc.xml: .version
  5. .version: ../modules/Pisg.pm
  6. perl -i -pe 's/(<title>pisg ).*(documentation<\/title>)/$${1}$(VERSION) $${2}/' pisg-doc.xml
  7. touch .version
  8. pisg-doc.txt: pisg-doc.xml
  9. docbook2txt pisg-doc.xml
  10. mv pisg-doc.txt pisg-tmp.txt
  11. cat pisg-tmp.txt | ./modifytxt.pl > pisg-doc.txt
  12. rm -f pisg-tmp.txt
  13. # One self-contained page with the example configuration at the end.
  14. pisg-doc.html: pisg-doc.xml
  15. python3 xml2html.py pisg-doc.xml pisg-doc.html
  16. pisg-faq.html: pisg-faq.txt
  17. a2x -f xhtml pisg-faq.txt
  18. pisg-formats.html: FORMATS
  19. a2x -f xhtml FORMATS
  20. mv FORMATS.html pisg-formats.html
  21. pisg.1: pisg.sgml
  22. docbook2man $< > $@
  23. clean:
  24. rm -f $(TARGETS) .version
  25. .PHONY: all clean
  26. # vim:noexpandtab: