Imported Upstream version 1.3.3
[platform/upstream/libvorbis.git] / doc / Makefile.am
1 ## Process this with automake to create Makefile.in
2
3 SUBDIRS = libvorbis 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-xifish.png
35
36 # bits needed by the spec
37 SPEC_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         window1.png \
48         window2.png
49 SPEC_PDF = xifish.pdf
50
51 # FIXME: also needed here
52 #       white-xifish.png 
53
54 SPEC_TEX = \
55         Vorbis_I_spec.tex \
56         01-introduction.tex \
57         02-bitpacking.tex \
58         03-codebook.tex \
59         04-codec.tex   \
60         05-comment.tex \
61         06-floor0.tex  \
62         07-floor1.tex  \
63         08-residue.tex \
64         09-helper.tex  \
65         10-tables.tex  \
66         a1-encapsulation-ogg.tex \
67         a2-encapsulation-rtp.tex \
68         footer.tex
69
70 built_docs = Vorbis_I_spec.pdf Vorbis_I_spec.html Vorbis_I_spec.css
71
72 # conditionally make the generated documentation
73 if BUILD_DOCS
74 doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs) doxygen-build.stamp
75 else
76 doc_DATA = $(static_docs) doxygen-build.stamp
77 endif
78
79 EXTRA_DIST = $(static_docs) $(built_docs) \
80         $(SPEC_TEX) $(SPEC_PNG) $(SPEC_PDF) Vorbis_I_spec.cfg Doxyfile.in
81
82 # these are expensive; only remove if we have to
83 MAINTAINERCLEANFILES = $(built_docs)
84 CLEANFILES = $(SPEC_TEX:%.tex=%.aux) \
85              Vorbis_I_spec.4ct Vorbis_I_spec.4tc \
86              Vorbis_I_spec.dvi Vorbis_I_spec.idv \
87              Vorbis_I_spec.lg  Vorbis_I_spec.log \
88              Vorbis_I_spec.out Vorbis_I_spec.tmp \
89              Vorbis_I_spec.toc Vorbis_I_spec.xref \
90              Vorbis_I_spec*.png \
91              zzVorbis_I_spec.ps xifish.png
92 DISTCLEANFILES = $(built_docs)
93
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         pdflatex $<
107 else
108 Vorbis_I_spec.html: NO_DOCS_ERROR
109 Vorbis_I_spec.pdf: NO_DOCS_ERROR
110 NO_DOCS_ERROR:
111         @echo
112         @echo "*** Documentation has not been built! ***"
113         @echo "Try re-running after passing --enable-docs to configure."
114         @echo
115 endif
116
117 if HAVE_DOXYGEN
118 doxygen-build.stamp: Doxyfile $(top_srcdir)/include/vorbis/*.h
119         doxygen
120         touch doxygen-build.stamp
121 else
122 doxygen-build.stamp:
123         echo "*** Warning: Doxygen not found; documentation will not be built."
124         touch doxygen-build.stamp
125 endif
126
127 install-data-local: doxygen-build.stamp
128         $(mkinstalldirs) $(DESTDIR)$(docdir)
129         if test -d vorbis; then \
130           for dir in vorbis/*; do \
131             if test -d $$dir; then \
132               b=`basename $$dir`; \
133               $(mkinstalldirs) $(DESTDIR)$(docdir)/$$b; \
134               for f in $$dir/*; do \
135                 $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$b; \
136               done \
137             fi \
138           done \
139         fi
140
141 uninstall-local:
142         rm -rf $(DESTDIR)$(docdir)
143
144 clean-local:
145         if test -d vorbis; then rm -rf vorbis; fi
146         if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi
147
148