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
This commit is contained in:
parent
c2b1cbfb02
commit
97f6080403
|
@ -315,10 +315,6 @@
|
|||
RelativePath="..\..\src\include\switch_utils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\include\switch_version.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
'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)
|
||||
|
@ -112,7 +111,19 @@ If BuildCore Then
|
|||
VERSION=strFromProc
|
||||
Loop While Not OExec.StdOut.atEndOfStream
|
||||
|
||||
FindReplaceInFile FreeswitchDir & "src\include\switch_version.h", "@SVN_VERSION@", VERSION
|
||||
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
|
||||
|
||||
|
||||
If Not FSO.FolderExists(LibDestDir & "include") Then
|
||||
FSO.CreateFolder(LibDestDir & "include")
|
||||
|
|
Loading…
Reference in New Issue