From 210a8afa5e601dda3a05e73f0415df5e8c3b9ef6 Mon Sep 17 00:00:00 2001 From: Ron Date: Mon, 14 Nov 2016 18:27:31 +1030 Subject: [PATCH] Add an update-doc-version target This is similar to the automation we added to libogg, it needs to be invoked manually after the package version is changed in configure.ac when the documentation boilerplate needs to be updated for a release. --- doc/Makefile.am | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/Makefile.am b/doc/Makefile.am index ad81252..417a126 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -44,3 +44,17 @@ doc_DATA = ao_append_option.html \ style.css EXTRA_DIST = $(doc_DATA) + +update-doc-version: + @YEAR=$$(date +%Y); DAY=$$(date +%Y%m%d); \ + for f in $(srcdir)/*.html; do \ + sed -e "s/2010-[0-9]\{4\} Monty/2010-$$YEAR Monty/g" \ + -e "s/libao version [0-9. -]\+/libao version $(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; + -- 2.27.0