changeset 689:19073a2914b9

reveal the current version number automatically from doc/index.html
author Volker Grabsch <vog@notjusthosting.com>
date Fri, 05 Feb 2010 14:06:26 +0100
parents ff047093f2a8
children 8562d568a07a
files Makefile doc/index.html
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Feb 05 05:12:28 2010 +0100
+++ b/Makefile	Fri Feb 05 14:06:26 2010 +0100
@@ -5,7 +5,6 @@
 TARGET             := i686-pc-mingw32
 SOURCEFORGE_MIRROR := kent.dl.sourceforge.net
 
-VERSION   := 2.11
 PREFIX    := $(PWD)/usr
 LOG_DIR   := $(PWD)/log
 TIMESTAMP := $(shell date +%Y%m%d_%H%M%S)
@@ -18,6 +17,7 @@
 SHELL     := bash
 SED       := $(shell gsed --help >/dev/null 2>&1 && echo g)sed
 INSTALL   := $(shell ginstall --help >/dev/null 2>&1 && echo g)install
+VERSION   := $(shell $(SED) -n 's,^.*<span id="latest-version">\([^<]*\)</span>.*$$,\1,p' '$(TOP_DIR)/doc/index.html')
 
 # unset any environment variables which might cause trouble
 AR =
--- a/doc/index.html	Fri Feb 05 05:12:28 2010 +0100
+++ b/doc/index.html	Fri Feb 05 14:06:26 2010 +0100
@@ -405,7 +405,7 @@
 
     <dl>
 
-    <dt>2010-xx-xx &ndash; Release 2.11</dt>
+    <dt>2010-xx-xx &ndash; Release <span id="latest-version">2.11</span></dt>
     <dd>
         <p>
         <a href="http://download.savannah.nongnu.org/releases/mingw-cross-env/mingw-cross-env-2.11.tar.gz">Download</a> |