Fix dependency loop in the specification.
authorRalph Giles <giles@thaumas.net>
Sat, 4 Jul 2020 00:02:26 +0000 (17:02 -0700)
committerRalph Giles <giles@thaumas.net>
Sat, 4 Jul 2020 01:43:33 +0000 (18:43 -0700)
Building the html version of the Vorbis format specification
creates a series of image files containing figures and rendered
equations. Previously we were treating these as part of the
static documentation, since we keep a copy of the spec in
the repository.

Hopever, since the static images were listed as dependencies
of the specification document (as the not-generated ones are)
rebuilding the spec necessarily rebuilt them as well, which
meant the spec would always be considered out of date and
rebuilt needlessly.

Instead, split the static image files from the set which
are generated as part of the specification build process,
and only mark dependence on the former.

This allows us to drop the inconsistent DISTCLEAN line which
was working around the problem of always needing to rebuild
the spec, even when it was included in the distribution.

Signed-off-by: Mark Harris <mark.hsj@gmail.com>
doc/Makefile.am

index a98c4d8..3f14247 100644 (file)
@@ -27,6 +27,22 @@ static_docs = \
        vorbis-fidelity.html
 
 # bits needed by the spec
+SPEC_TEX = \
+       Vorbis_I_spec.tex \
+       01-introduction.tex \
+       02-bitpacking.tex \
+       03-codebook.tex \
+       04-codec.tex   \
+       05-comment.tex \
+       06-floor0.tex  \
+       07-floor1.tex  \
+       08-residue.tex \
+       09-helper.tex  \
+       10-tables.tex  \
+       a1-encapsulation-ogg.tex \
+       a2-encapsulation-rtp.tex \
+       footer.tex
+
 SPEC_PNG = \
        components.png \
        floor1-1.png \
@@ -38,7 +54,10 @@ SPEC_PNG = \
        residue-pack.png \
        residue2.png \
        window1.png \
-       window2.png \
+       window2.png
+
+# Figure images generated by htlatex
+built_SPEC_PNG = \
        Vorbis_I_spec0x.png \
        Vorbis_I_spec1x.png \
        Vorbis_I_spec2x.png \
@@ -55,23 +74,9 @@ SPEC_PNG = \
        Vorbis_I_spec13x.png \
        Vorbis_I_spec14x.png
 
-SPEC_TEX = \
-       Vorbis_I_spec.tex \
-       01-introduction.tex \
-       02-bitpacking.tex \
-       03-codebook.tex \
-       04-codec.tex   \
-       05-comment.tex \
-       06-floor0.tex  \
-       07-floor1.tex  \
-       08-residue.tex \
-       09-helper.tex  \
-       10-tables.tex  \
-       a1-encapsulation-ogg.tex \
-       a2-encapsulation-rtp.tex \
-       footer.tex
 
-built_docs = Vorbis_I_spec.pdf Vorbis_I_spec.html Vorbis_I_spec.css
+built_docs = Vorbis_I_spec.pdf \
+            Vorbis_I_spec.html Vorbis_I_spec.css $(built_SPEC_PNG)
 
 # conditionally make the generated documentation
 if BUILD_DOCS
@@ -93,8 +98,6 @@ CLEANFILES = $(SPEC_TEX:%.tex=%.aux) \
             Vorbis_I_spec.toc Vorbis_I_spec.xref \
             Vorbis_I_spec.out.ps \
             zzVorbis_I_spec.ps
-DISTCLEANFILES = $(built_docs)
-
 
 # explicit rules for generating docs
 if BUILD_DOCS