Makefile 854 B

1234567891011121314151617181920212223242526272829303132333435
  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/[^"]*"\([^"]*\)+CVS".*/\1/')
  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. pisg-doc.html: pisg-doc.xml
  14. docbook2html pisg-doc.xml -V "%use-id-as-filename%" -V nochunks
  15. pisg-faq.html: pisg-faq.txt
  16. a2x -f xhtml pisg-faq.txt
  17. pisg-formats.html: FORMATS
  18. a2x -f xhtml FORMATS
  19. mv FORMATS.html pisg-formats.html
  20. pisg.1: pisg.sgml
  21. docbook2man $< > $@
  22. clean:
  23. rm -f $(TARGETS) .version
  24. .PHONY: all clean
  25. # vim:noexpandtab: