Docbook to latex conversion of the spec by Max Horn.
[platform/upstream/libvorbis.git] / doc / Makefile.am
1 ## Process this with automake to create Makefile.in
2
3 SUBDIRS = vorbisfile vorbisenc
4
5 docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
6
7 ### all of the static docs, commited to SVN and included as is
8 static_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-ogg.png \
35         white-xifish.png
36
37 # bits needed by the spec
38 SPEC_PNG = \
39         components.png \
40         floor1-1.png \
41         floor1-2.png \
42         floor1-3.png \
43         floor1-4.png \
44         hufftree.png \
45         hufftree-under.png \
46         residue-pack.png \
47         residue2.png \
48         white-xifish.png \
49         window1.png \
50         window2.png
51 SPEC_PDF = xifish.pdf
52
53 # FIXME: also needed here
54 #       white-xifish.png 
55
56 SPEC_TEX = \
57         Vorbis_I_spec.tex \
58         01-introduction.tex \
59         02-bitpacking.tex \
60         03-codebook.tex \
61         04-codec.tex   \
62         05-comment.tex \
63         06-floor0.tex  \
64         07-floor1.tex  \
65         08-residue.tex \
66         09-helper.tex  \
67         10-tables.tex  \
68         a1-encapsulation-ogg.tex \
69         a2-encapsulation-rtp.tex \
70         footer.tex
71
72 built_docs = Vorbis_I_spec.pdf Vorbis_I_spec.html Vorbis_I_spec.css
73
74 # conditionally make the generated documentation
75 if BUILD_DOCS
76 doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs)
77 else
78 doc_DATA = $(static_docs)
79 endif
80
81 EXTRA_DIST = $(static_docs) $(built_docs) \
82         $(SPEC_TEX) $(SPEC_PNG) $(SPEC_PDF) Vorbis_I_spec.cfg
83
84 # these are expensive; only remove if we have to
85 MAINTAINERCLEANFILES = $(built_docs)
86 CLEANFILES = $(SPEC_TEX:%.tex=%.aux) \
87              Vorbis_I_spec.4ct Vorbis_I_spec.4tc \
88              Vorbis_I_spec.dvi Vorbis_I_spec.idv \
89              Vorbis_I_spec.lg  Vorbis_I_spec.log \
90              Vorbis_I_spec.out Vorbis_I_spec.tmp \
91              Vorbis_I_spec.toc Vorbis_I_spec.xref \
92              Vorbis_I_spec*.png \
93              zzVorbis_I_spec.ps xifish.png
94
95 # explicit rules for generating docs
96 if BUILD_DOCS
97 xifish.png: white-xifish.png
98         cp $< $@
99
100 Vorbis_I_spec.html Vorbis_I_spec.css: $(SPEC_TEX) $(SPEC_PNG) xifish.png
101         htlatex $<
102
103 Vorbis_I_spec.pdf: $(SPEC_TEX) $(SPEC_PNG) xifish.png
104         pdflatex $<
105         pdflatex $<
106 else
107 Vorbis_I_spec.html: NO_DOCS_ERROR
108 Vorbis_I_spec.pdf: NO_DOCS_ERROR
109 NO_DOCS_ERROR:
110         @echo
111         @echo "*** Documentation has not been built! ***"
112         @echo "Try re-running after passing --enable-docs to configure."
113         @echo
114 endif