Add a makefile target to update the doc versions
authorTim Terriberry <tterribe@xiph.org>
Tue, 14 May 2013 01:24:11 +0000 (01:24 +0000)
committerTim Terriberry <tterribe@xiph.org>
Tue, 14 May 2013 01:24:11 +0000 (01:24 +0000)
This isn't automatic.
It does need to be invoked explicitly, after the package version is
 changed in configure.in, immediately before release, but that
 beats updating all of those files by hand for each release.

Patch contributed by Ron Lee.

git-svn-id: http://svn.xiph.org/trunk/ogg@18941 0101bb08-14d6-0310-b084-bc0e0c8e3800

doc/libogg/Makefile.am

index 7ecd26a..4007907 100644 (file)
@@ -24,3 +24,16 @@ dist_apidoc_DATA = bitpacking.html datastructures.html decoding.html encoding.ht
        oggpack_writecopy.html oggpack_writeinit.html oggpack_writetrunc.html\
        overview.html reference.html style.css
 
+update-doc-version:
+       @YEAR=$$(date +%Y); DAY=$$(date +%Y%m%d);                                       \
+       for f in $(srcdir)/*.html; do                                                   \
+               sed -e "s/2000-[0-9]\{4\} Xiph.Org/2000-$$YEAR Xiph.Org/g"              \
+                   -e "s/libogg release [0-9. -]\+/libogg release $(VERSION) - $$DAY/g"\
+                       < $$f > $$f.tmp;                                                \
+               if diff -q $$f $$f.tmp > /dev/null; then                                \
+                       rm $$f.tmp;                                                     \
+               else                                                                    \
+                       mv $$f.tmp $$f;                                                 \
+               fi;                                                                     \
+       done;
+