1dist_man_MANS = dvdstyler.1
2
3LINGUAS=ca de el en es eu fi fr hu it ja nb pl pt pt_BR ro ru si uk zh_CN zh_TW
4docdir=@datadir@/@PACKAGE@/docs
5doc_DATA = $(LINGUAS:%=help_%.zip)
6
7help_%.zip: DVDStylerGuide_%.xml
8	t=`mktemp -d tempXXXXXXX`; \
9	(cd "$$t" && $(XMLTO) --skip-validation htmlhelp ../DVDStylerGuide_$*.xml && rm -f *.hh* && $(ZIP) ../help_$*.zip *.html); \
10	rm -f "$$t"/*.html; \
11	rm -f "$$t"/*.proc; \
12	if [ -d "images/$*" ]; then \
13		$(ZIP) help_$*.zip htmlhelp.hhp toc.hhc images/$*/*.png images/$*/*.jpg; \
14	else \
15		$(ZIP) help_$*.zip htmlhelp.hhp toc.hhc images/en/*.png images/en/*.jpg; \
16	fi; \
17	rmdir "$$t"
18
19html: $(LINGUAS:%=html_%)
20
21html_%: DVDStylerGuide_%.xml
22	rm -rf html_$*; \
23	mkdir html_$*; \
24	(cd html_$* && $(XMLTO) --skip-validation htmlhelp ../DVDStylerGuide_$*.xml && rm -f *.hh*); \
25	mkdir html_$*/images; \
26	if [ -d "images/$*" ]; then \
27		mkdir html_$*/images/$*; \
28		cp images/$*/*.png images/$*/*.jpg html_$*/images/$*/; \
29	else \
30		mkdir html_$*/images/en; \
31		cp images/en/*.png images/en/*.jpg html_$*/images/en/; \
32	fi;
33