Basic makefile support for generating the documentation. It should
[platform/upstream/libvorbis.git] / doc / Makefile.am
1 ## Process this with automake to create Makefile.in
2
3 AUTOMAKE_OPTIONS = foreign
4
5 SUBDIRS = vorbisfile vorbisenc
6
7 docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
8
9 # conditionally make the generated documentation
10 if BUILD_DOCS
11 built_docs = Vorbis_I_spec.html Vorbis_I_spec.pdf
12 else
13 built_docs =
14 endif !BUILD_DOCS
15
16 doc_DATA = components.png \
17         draft-moffitt-vorbis-rtp-00.txt \
18         eightphase.png \
19         evenlsp.png \
20         floor1-1.png \
21         floor1-2.png \
22         floor1-3.png \
23         floor1-4.png \
24         floor1_inverse_dB_table.html \
25         floorval.png \
26         fourphase.png \
27         framing.html \
28         helper.html \
29         hufftree-under.png \
30         hufftree.png \
31         index.html \
32         lspmap.png \
33         oddlsp.png \
34         oggstream.html \
35         programming.html \
36         residue-pack.png \
37         residue2.png \
38         squarepolar.png \
39         stereo.html \
40         stream.png \
41         v-comment.html \
42         vorbis-clip.txt \
43         vorbis-errors.txt \
44         vorbis-fidelity.html \
45         vorbis-ogg.html \
46         vorbis-spec-bitpack.html \
47         vorbis-spec-codebook.html \
48         vorbis-spec-floor0.html \
49         vorbis-spec-floor1.html \
50         vorbis-spec-intro.html \
51         vorbis-spec-ref.html \
52         vorbis-spec-res.html \
53         vorbis.html \
54         vorbisword2.png \
55         wait.png \
56         white-ogg.png \
57         white-xifish.png \
58         window1.png \
59         window2.png \
60         Vorbis_I_spec.html \
61         $(built_docs)
62
63 doc_sources = xml/Vorbis_I_spec.xml \
64         xml/01-introduction.xml \
65         xml/02-bitpacking.xml \
66         xml/03-codebook.xml \  
67         xml/04-codec.xml \           
68         xml/05-comment.xml \         
69         xml/06-floor0.xml \
70         xml/07-floor1.xml \ 
71         xml/08-residue.xml \ 
72         xml/09-helper.xml \ 
73         xml/10-tables.xml \
74         xml/a1-encapsulation_ogg.xml \
75         xml/a2-encapsulation_rtp.xml \
76         xml/footer.xml \
77         xml/spec-common.xsl \
78         xml/spec-fo.xsl \
79         xml/spec-html.xsl
80
81 EXTRA_DIST = $(doc_DATA)
82 nobase_EXTRA_DIST = $(doc_sources)
83
84 # explicit rules for generating docs
85 Vorbis_I_spec.html:
86         xsltproc --xinclude --output $@ xml/spec-html.xsl xml/Vorbis_I_spec.xml
87
88 Vorbis_I_spec.fo:
89         xsltproc --xinclude --output $@ xml/spec-fo.xsl xml/Vorbis_I_spec.xml
90
91 Vorbis_I_spec.pdf: Vorbis_I_spec.fo
92         cp $< spec.fo # work around a passivetex bug
93         pdfxmltex --interaction nonstopmode spec.fo
94         pdfxmltex --interaction nonstopmode spec.fo
95         rm spec.fo
96         mv spec.pdf $@
97