mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-15 16:39:14 +00:00
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"
|
RelativePath="..\..\src\include\switch_utils.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\src\include\switch_version.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Resource Files"
|
Name="Resource Files"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
'On Error Resume Next
|
On Error Resume Next
|
||||||
' **************
|
' **************
|
||||||
' Initialization
|
' Initialization
|
||||||
' **************
|
' **************
|
||||||
@ -101,7 +101,6 @@ End If
|
|||||||
' ******************
|
' ******************
|
||||||
|
|
||||||
If BuildCore Then
|
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"
|
VersionCmd="svnversion " & quote & FreeswitchDir & "." & quote & " -n"
|
||||||
Set MyFile = fso.CreateTextFile(UtilsDir & "tmpVersion.Bat", True)
|
Set MyFile = fso.CreateTextFile(UtilsDir & "tmpVersion.Bat", True)
|
||||||
MyFile.WriteLine("@" & VersionCmd)
|
MyFile.WriteLine("@" & VersionCmd)
|
||||||
@ -112,7 +111,19 @@ If BuildCore Then
|
|||||||
VERSION=strFromProc
|
VERSION=strFromProc
|
||||||
Loop While Not OExec.StdOut.atEndOfStream
|
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
|
FindReplaceInFile FreeswitchDir & "src\include\switch_version.h", "@SVN_VERSION@", VERSION
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not FSO.FolderExists(LibDestDir & "include") Then
|
If Not FSO.FolderExists(LibDestDir & "include") Then
|
||||||
FSO.CreateFolder(LibDestDir & "include")
|
FSO.CreateFolder(LibDestDir & "include")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user