# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1316167687 0 # Node ID 2991afb3bf71b28947b8e44ffe61c0769b0c8ffc # Parent 52e3aa735bdb794992ac11a3acadd5d5f77166ba Added support for including the svn revision number as the sub version with Visual C. diff -r 52e3aa735bdb -r 2991afb3bf71 makefile.vc --- a/makefile.vc Fri Sep 16 07:27:56 2011 +0000 +++ b/makefile.vc Fri Sep 16 10:08:07 2011 +0000 @@ -3,6 +3,7 @@ # VER = 21 VERDOT = 2.1 +VERREV = 0 # # Setup the source and destination directories @@ -48,8 +49,15 @@ LINK_DEBUG = -release !endif +# Check the SVN revision number if possible +!if ![subwcrev . win\__SVN__.REV SVN.REV > NUL] +!include SVN.REV +!message Revision is [$(VERREV)] +SVNVERSION=-DVER_REV=$(VERREV) +!endif + CC = cl -CFLAGS = -c $(PLATFORM_DEF) -D__WIN32__ -DMSVC -DBUILD_DLL -I$(SRCDIR)\platform -I$(SRCDIR) +CFLAGS = -c $(PLATFORM_DEF) -D__WIN32__ -DMSVC -DBUILD_DLL -I$(SRCDIR)\platform -I$(SRCDIR) $(SVNVERSION) LIBS = wsock32.lib kernel32.lib user32.lib comctl32.lib gdi32.lib advapi32.lib shell32.lib comdlg32.lib ole32.lib oleaut32.lib userenv.lib msimg32.lib RES = LINKFLAGS = -machine:$(TARGET_CPU) -manifest $(LINK_DEBUG) @@ -64,6 +72,8 @@ all: dw dwcompat dwtest + + clean: -erase *.dll -erase *.exe @@ -79,8 +89,8 @@ dw: dw.dll dw.dll: $(OBJS) $(DEFFILE) - -mkdir $(DWLIBDIR) - -mkdir $(DWDLLDIR) + -md $(DWLIBDIR) + -md $(DWDLLDIR) $(LINK) @<< -out:$(@) -def:$(DEFFILE) $(LINKFLAGS) $(DLLLINKFLAGS) diff -r 52e3aa735bdb -r 2991afb3bf71 win/__SVN__.REV --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/win/__SVN__.REV Fri Sep 16 10:08:07 2011 +0000 @@ -0,0 +1,1 @@ +VERREV=$WCREV$ \ No newline at end of file