From 3dc6938f702402db47ced37e448e3683f1f3ff95 Mon Sep 17 00:00:00 2001 From: oehhar Date: Mon, 24 Sep 2012 15:05:16 +0000 Subject: [PATCH] copy DOTVERSION in win/makefile.vc from configure.in --- tdbcsqlite3/ChangeLog | 7 +++++++ tdbcsqlite3/win/makefile.vc | 13 ++++++++++++- tdbcsqlite3/win/nmakehlp.c | 3 ++- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/tdbcsqlite3/ChangeLog b/tdbcsqlite3/ChangeLog index 9ad0c96..8ce5a9c 100644 --- a/tdbcsqlite3/ChangeLog +++ b/tdbcsqlite3/ChangeLog @@ -1,3 +1,10 @@ +2012-09-24 Harald Oehlmann + + * tdbcsqlite3/win/makefile.vc: Get DOTVERSION from file configure.in. + * tdbcsqlite3/win/nmakehelp.c: Copied from tcl Checkin [8be494c5ee]: + Let "nmakehlp -V" start searching digits after the found match + (nijtmans). + 2012-08-17 Jan Nijtmans * win/nmakehlp.c: Add "-V" option, in order to be able diff --git a/tdbcsqlite3/win/makefile.vc b/tdbcsqlite3/win/makefile.vc index fc92efc..3ad909e 100644 --- a/tdbcsqlite3/win/makefile.vc +++ b/tdbcsqlite3/win/makefile.vc @@ -167,7 +167,18 @@ PROJECT = tdbcsqlite #PROJECT_REQUIRES_TK=1 !include "rules.vc" -DOTVERSION = 1.0b17 +# nmakehelp -V will search the file for tag, skips until a +# number and returns all character until a character not in [0-9.ab] +# is read. + +!if [echo REM = This file is generated from Makefile.vc > versions.vc] +!endif +# get project version from row "AC_INIT([tdbcsqlite3], [1.0b17])" +!if [echo DOTVERSION = \>> versions.vc] \ + && [nmakehlp -V ..\configure.in tdbcsqlite3 >> versions.vc] +!endif +!include "versions.vc" + VERSION = $(DOTVERSION:.=) STUBPREFIX = $(PROJECT)stub diff --git a/tdbcsqlite3/win/nmakehlp.c b/tdbcsqlite3/win/nmakehlp.c index d8021b9..b1a1517 100644 --- a/tdbcsqlite3/win/nmakehlp.c +++ b/tdbcsqlite3/win/nmakehlp.c @@ -498,9 +498,10 @@ GetVersionFromFile( p = strstr(szBuffer, match); if (p != NULL) { /* - * Skip to first digit. + * Skip to first digit after the match. */ + p += strlen(match); while (*p && !isdigit(*p)) { ++p; }