Mercurial > dwindows
changeset 1166:568b37e4b167
Attempt at importing the svn revision with VAC/nmake.
The REXX script might need some more work.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 16 Sep 2011 21:00:31 +0000 |
parents | 590740c9c5c6 |
children | 5668d269beb3 |
files | makefile.vac os2/svnrev.cmd |
diffstat | 2 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/makefile.vac Fri Sep 16 11:20:14 2011 +0000 +++ b/makefile.vac Fri Sep 16 21:00:31 2011 +0000 @@ -1,11 +1,15 @@ .SUFFIXES: .c .obj +!if ![cmd /c os2\svnrev.cmd] +!include SVN.REV +!endif + .all: \ .\dw.dll \ .\dwcompat.dll .c.obj: - icc.exe /DOS2 /DTCPV40HDRS /DBUILD_DLL /I. /Tm+ /Tdc /Ss /Wprorearet /Wpro+ /V"Dynamic Windows Compatibility" /Ti /Gm /Gd- /G5 /Ge- /C /W3 /Wini+ /Wpar+ /Wpro+ /Wuse+ %s + icc.exe /DOS2 /DTCPV40HDRS /DBUILD_DLL /DVER_REV=$(VERREV) /I. /Tm+ /Tdc /Ss /Wprorearet /Wpro+ /V"Dynamic Windows Compatibility" /Ti /Gm /Gd- /G5 /Ge- /C /W3 /Wini+ /Wpar+ /Wpro+ /Wuse+ %s .\dw.dll: \ .\os2\dw.obj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os2/svnrev.cmd Fri Sep 16 21:00:31 2011 +0000 @@ -0,0 +1,16 @@ +/* REXX script to get the svn revision and save it to SVN.REV. */ +"svnversion -n . | rxqueue" +/* Using PARSE PULL preserves case */ +Parse Pull sval +/* If it is a double value get the first value */ +Parse Var sval ver ':' newver 'M' 'S' +/* Remove trailing M or S from the version */ +Parse Var ver tmpver 'M' +Parse Var tmpver ver 'S' +err = LINEOUT('SVN.REV', 'VERREV=' || ver, 1) +/* Check for an error. */ +IF err \== 0 THEN DO +Bad: + SAY "ERROR:" STREAM('SVN.REV', 'D') + RETURN +END