From a02be6c13a7353e7b2fba65a1faab1c6819d1728 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 5 Jan 2009 12:04:14 +0100 Subject: [PATCH] Use mk_version.tcl on Windows --- util/mk_version.tcl | 2 +- win/makefile | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/util/mk_version.tcl b/util/mk_version.tcl index 160a918..4bee1a4 100644 --- a/util/mk_version.tcl +++ b/util/mk_version.tcl @@ -44,7 +44,7 @@ set maps(VERSION) $version set c [split $version .] set versionl [expr ([lindex $c 0] * 256 + [lindex $c 1]) * 256 + [lindex $c 2]] -set maps(YAZ_VERSION_HEX) [format %x $versionl] +set maps(VERSION_HEX) [format %x $versionl] if {[llength $c] == 3} { lappend c 1 diff --git a/win/makefile b/win/makefile index 672335a..2f79a72 100644 --- a/win/makefile +++ b/win/makefile @@ -6,6 +6,10 @@ DEBUG=0 # 0 for release, 1 for debug +# TCL is optional - ONLY needed for source straight from Git +TCL="C:\Tcl\bin\tclsh85.exe" +HAVE_TCL=1 + # EXPAT is optional. It's required for grs.xml-filters. HAVE_EXPAT=1 EXPAT_DIR=c:\Program files\Expat 2.0.1 @@ -35,7 +39,7 @@ ICU_DIR=c:\icu default: all -all: dirs expat iconv libxml2 libxslt icu yaz dll zserver zebraidx tstflock +all: dirs generate expat iconv libxml2 libxslt icu yaz dll zserver zebraidx tstflock # Directories # The current directory is supposed to be something like @@ -331,6 +335,14 @@ LINK_PROGRAM= $(LINK) \ $(BZIP2LIB) \ $(LINK_LIBS) + +# Generated sources +generate: $(INCLDIR)\idzebra\version.h + +$(INCLDIR)\idzebra\version.h: + @cd $(ROOTDIR)\util + $(TCL) mk_version.tcl $(ROOTDIR)/configure.ac $(INCLDIR)\idzebra\version.h + # Source and object modules # Note: Ordinary source files are not specified here at # all, make finds them in suitable dirs. The object modules -- 1.7.10.4