提交 97f60804 authored 作者: Michael Jerris's avatar Michael Jerris

Don't rebuild switch_version.h everytime, only when it changes.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@330 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 c2b1cbfb
......@@ -315,10 +315,6 @@
RelativePath="..\..\src\include\switch_utils.h"
>
</File>
<File
RelativePath="..\..\src\include\switch_version.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
......
'On Error Resume Next
On Error Resume Next
' **************
' Initialization
' **************
......@@ -101,7 +101,6 @@ End If
' ******************
If BuildCore Then
FSO.CopyFile FreeswitchDir & "src\include\switch_version.h.in", FreeswitchDir & "src\include\switch_version.h", true
VersionCmd="svnversion " & quote & FreeswitchDir & "." & quote & " -n"
Set MyFile = fso.CreateTextFile(UtilsDir & "tmpVersion.Bat", True)
MyFile.WriteLine("@" & VersionCmd)
......@@ -111,8 +110,20 @@ If BuildCore Then
strFromProc = OExec.StdOut.ReadLine()
VERSION=strFromProc
Loop While Not OExec.StdOut.atEndOfStream
Set fOrgFile = FSO.OpenTextFile(UtilsDir & "lastversion", ForReading, FailIfNotExist, OpenAsASCII)
sLastVersion = fOrgFile.ReadLine()
fOrgFile.Close
If VERSION <> sLastVersion Then
Set MyFile = fso.CreateTextFile(UtilsDir & "lastversion", True)
MyFile.WriteLine(VERSION)
MyFile.Close
FSO.CopyFile FreeswitchDir & "src\include\switch_version.h.in", FreeswitchDir & "src\include\switch_version.h", true
FindReplaceInFile FreeswitchDir & "src\include\switch_version.h", "@SVN_VERSION@", VERSION
End If
FindReplaceInFile FreeswitchDir & "src\include\switch_version.h", "@SVN_VERSION@", VERSION
If Not FSO.FolderExists(LibDestDir & "include") Then
FSO.CreateFolder(LibDestDir & "include")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论