POD=readme.pod
TITLE:="Html2Wml Documentation"

help: 
	@echo "available targets: "
	@echo "    doc        rebuild the documentation"
	@echo "    install    install the documentation"

install: 
	@install -m 444 *.pod *.html *.pdf $(DOCDIR)/

doc:
	@echo "[ writing html doc ]"
	@pod2html --infile="${POD}" --outfile="readme.html" --title=\"${TITLE}\" --norecurse --index --verbose --css=style.css
	@./mkhtml
	@rm -f pod2htm*.x~~
	@echo "[ writing text doc ]"
	@pod2text ${POD} > readme.txt
	@echo "[ writing nroff doc ]"
	@pod2man --center=\"${TITLE}\" --release=${VERSION} ${POD} > html2wml.man
	@echo "[ writing pdf doc ]"
	@perl -p -e '/=for html/ and <>, <>, next' ${POD} > Html2Wml
	@pod2pdf --verbose 1 --podfile Html2Wml
	@mv Html2Wml.pdf readme.pdf
	@rm Html2Wml
