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