1## Process this with automake to create Makefile.in
2
3SUBDIRS = vorbisfile vorbisenc
4
5docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
6
7### all of the static docs, commited to SVN and included as is
8static_docs = \
9	rfc5215.xml \
10	rfc5215.txt \
11	eightphase.png \
12	evenlsp.png \
13	fish_xiph_org.png \
14	floor1_inverse_dB_table.html \
15	floorval.png \
16	fourphase.png \
17	framing.html \
18	helper.html \
19	index.html \
20	lspmap.png \
21	oddlsp.png \
22	oggstream.html \
23	programming.html \
24	squarepolar.png \
25	stereo.html \
26	stream.png \
27	v-comment.html \
28	vorbis-clip.txt \
29	vorbis-errors.txt \
30	vorbis-fidelity.html \
31	vorbis.html \
32	vorbisword2.png \
33	wait.png \
34	white-xifish.png
35
36# bits needed by the spec
37SPEC_PNG = \
38	components.png \
39	floor1-1.png \
40	floor1-2.png \
41	floor1-3.png \
42	floor1-4.png \
43	hufftree.png \
44	hufftree-under.png \
45	residue-pack.png \
46	residue2.png \
47	white-xifish.png \
48	window1.png \
49	window2.png
50SPEC_PDF = xifish.pdf
51
52# FIXME: also needed here
53#	white-xifish.png 
54
55SPEC_TEX = \
56	Vorbis_I_spec.tex \
57	01-introduction.tex \
58	02-bitpacking.tex \
59	03-codebook.tex \
60	04-codec.tex   \
61	05-comment.tex \
62	06-floor0.tex  \
63	07-floor1.tex  \
64	08-residue.tex \
65	09-helper.tex  \
66	10-tables.tex  \
67	a1-encapsulation-ogg.tex \
68	a2-encapsulation-rtp.tex \
69	footer.tex
70
71built_docs = Vorbis_I_spec.pdf Vorbis_I_spec.html Vorbis_I_spec.css
72
73# conditionally make the generated documentation
74if BUILD_DOCS
75doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs)
76else
77doc_DATA = $(static_docs)
78endif
79
80EXTRA_DIST = $(static_docs) $(built_docs) \
81	$(SPEC_TEX) $(SPEC_PNG) $(SPEC_PDF) Vorbis_I_spec.cfg
82
83# these are expensive; only remove if we have to
84MAINTAINERCLEANFILES = $(built_docs)
85CLEANFILES = $(SPEC_TEX:%.tex=%.aux) \
86	     Vorbis_I_spec.4ct Vorbis_I_spec.4tc \
87	     Vorbis_I_spec.dvi Vorbis_I_spec.idv \
88	     Vorbis_I_spec.lg  Vorbis_I_spec.log \
89	     Vorbis_I_spec.out Vorbis_I_spec.tmp \
90	     Vorbis_I_spec.toc Vorbis_I_spec.xref \
91	     Vorbis_I_spec*.png \
92	     zzVorbis_I_spec.ps xifish.png
93DISTCLEANFILES = $(built_docs)
94
95
96# explicit rules for generating docs
97if BUILD_DOCS
98xifish.png: white-xifish.png
99	cp $< $@
100
101Vorbis_I_spec.html Vorbis_I_spec.css: $(SPEC_TEX) $(SPEC_PNG) xifish.png
102	htlatex $<
103
104Vorbis_I_spec.pdf: $(SPEC_TEX) $(SPEC_PNG) xifish.png
105	pdflatex $<
106	pdflatex $<
107	pdflatex $<
108else
109Vorbis_I_spec.html: NO_DOCS_ERROR
110Vorbis_I_spec.pdf: NO_DOCS_ERROR
111NO_DOCS_ERROR:
112	@echo
113	@echo "*** Documentation has not been built! ***"
114	@echo "Try re-running after passing --enable-docs to configure."
115	@echo
116endif
117