Remove the ancient (if unlinked) doc/vorbis.html as well as more newly unused graphics.
[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         wait.png
32
33 # bits needed by the spec
34 SPEC_PNG = \
35         components.png \
36         fish_xiph_org.png \
37         floor1-1.png \
38         floor1-2.png \
39         floor1-3.png \
40         floor1-4.png \
41         hufftree.png \
42         hufftree-under.png \
43         residue-pack.png \
44         residue2.png \
45         window1.png \
46         window2.png
47
48 SPEC_TEX = \
49         Vorbis_I_spec.tex \
50         01-introduction.tex \
51         02-bitpacking.tex \
52         03-codebook.tex \
53         04-codec.tex   \
54         05-comment.tex \
55         06-floor0.tex  \
56         07-floor1.tex  \
57         08-residue.tex \
58         09-helper.tex  \
59         10-tables.tex  \
60         a1-encapsulation-ogg.tex \
61         a2-encapsulation-rtp.tex \
62         footer.tex
63
64 built_docs = Vorbis_I_spec.pdf Vorbis_I_spec.html Vorbis_I_spec.css
65
66 # conditionally make the generated documentation
67 if BUILD_DOCS
68 doc_DATA = $(static_docs) $(SPEC_PNG) $(built_docs) doxygen-build.stamp
69 else
70 doc_DATA = $(static_docs) doxygen-build.stamp
71 endif
72
73 EXTRA_DIST = $(static_docs) $(built_docs) \
74         $(SPEC_TEX) $(SPEC_PNG) $(SPEC_PDF) Vorbis_I_spec.cfg Doxyfile.in
75
76 # these are expensive; only remove if we have to
77 MAINTAINERCLEANFILES = $(built_docs)
78 CLEANFILES = $(SPEC_TEX:%.tex=%.aux) \
79              Vorbis_I_spec.4ct Vorbis_I_spec.4tc \
80              Vorbis_I_spec.dvi Vorbis_I_spec.idv \
81              Vorbis_I_spec.lg  Vorbis_I_spec.log \
82              Vorbis_I_spec.out Vorbis_I_spec.tmp \
83              Vorbis_I_spec.toc Vorbis_I_spec.xref \
84              Vorbis_I_spec*.png \
85              zzVorbis_I_spec.ps
86 DISTCLEANFILES = $(built_docs)
87
88
89 # explicit rules for generating docs
90 if BUILD_DOCS
91 Vorbis_I_spec.html Vorbis_I_spec.css: $(SPEC_TEX) $(SPEC_PNG)
92         htlatex $<
93
94 Vorbis_I_spec.pdf: $(SPEC_TEX) $(SPEC_PNG)
95         pdflatex $<
96         pdflatex $<
97         pdflatex $<
98 else
99 Vorbis_I_spec.html: NO_DOCS_ERROR
100 Vorbis_I_spec.pdf: NO_DOCS_ERROR
101 NO_DOCS_ERROR:
102         @echo
103         @echo "*** Documentation has not been built! ***"
104         @echo "Try re-running after passing --enable-docs to configure."
105         @echo
106 endif
107
108 if HAVE_DOXYGEN
109 doxygen-build.stamp: Doxyfile $(top_srcdir)/include/vorbis/*.h
110         doxygen
111         touch doxygen-build.stamp
112 else
113 doxygen-build.stamp:
114         echo "*** Warning: Doxygen not found; documentation will not be built."
115         touch doxygen-build.stamp
116 endif
117
118 install-data-local: doxygen-build.stamp
119         $(mkinstalldirs) $(DESTDIR)$(docdir)
120         if test -d vorbis; then \
121           for dir in vorbis/*; do \
122             if test -d $$dir; then \
123               b=`basename $$dir`; \
124               $(mkinstalldirs) $(DESTDIR)$(docdir)/$$b; \
125               for f in $$dir/*; do \
126                 $(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$b; \
127               done \
128             fi \
129           done \
130         fi
131
132 uninstall-local:
133         rm -rf $(DESTDIR)$(docdir)
134
135 clean-local:
136         if test -d vorbis; then rm -rf vorbis; fi
137         if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi
138
139