From: Martin v. Löwis Date: Wed, 18 Jan 2006 09:13:51 +0000 (+0000) Subject: Generate getbuildinfo.o each time the linker is invoked; X-Git-Tag: v2.5a0~801 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d078e40d416566d3a88bc47c2df180c85d5e339f;p=thirdparty%2FPython%2Fcpython.git Generate getbuildinfo.o each time the linker is invoked; try to generate SVNVERSION information if subwcrev.exe can be found. --- diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c index 7b47aea7e489..a017dab062ac 100644 --- a/Modules/getbuildinfo.c +++ b/Modules/getbuildinfo.c @@ -20,6 +20,10 @@ #endif #endif +#ifdef SUBWCREV +#define SVNVERSION "$WCRANGE$$WCMODS?M:$" +#endif + const char * Py_GetBuildInfo(void) { diff --git a/PCbuild/make_buildinfo.vcproj b/PCbuild/make_buildinfo.vcproj new file mode 100644 index 000000000000..d0c8a5df0d1a --- /dev/null +++ b/PCbuild/make_buildinfo.vcproj @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln index 8f998c3697c9..7ccab0aabb60 100644 --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln @@ -48,6 +48,7 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythoncore", "pythoncore.vcproj", "{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}" ProjectSection(ProjectDependencies) = postProject {F0E0541E-F17D-430B-97C4-93ADF0DD284E} = {F0E0541E-F17D-430B-97C4-93ADF0DD284E} + {C73F0EC1-358B-4177-940F-0846AC8B04CD} = {C73F0EC1-358B-4177-940F-0846AC8B04CD} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" @@ -79,6 +80,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_elementtree", "_elementtre {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -181,8 +186,15 @@ Global {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.Release.Build.0 = Release|Win32 {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32 {1966DDE2-4AB7-4E4E-ACC9-C121E4D37F8E}.ReleaseItanium.Build.0 = ReleaseItanium|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.ActiveCfg = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug.Build.0 = Debug|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release.Build.0 = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.ActiveCfg = Release|Win32 + {C73F0EC1-358B-4177-940F-0846AC8B04CD}.ReleaseItanium.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionItems) = postSolution + ..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c readme.txt = readme.txt EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/PCbuild/pythoncore.vcproj b/PCbuild/pythoncore.vcproj index cc56ca2aa2ad..88ddf1abf4cc 100644 --- a/PCbuild/pythoncore.vcproj +++ b/PCbuild/pythoncore.vcproj @@ -4,6 +4,7 @@ Version="7.10" Name="pythoncore" ProjectGUID="{7AFA1F0B-A8A1-455A-A832-BF263404BBEF}" + RootNamespace="pythoncore" SccProjectName="pythoncore" SccLocalPath=".."> @@ -37,6 +38,7 @@ Name="VCCustomBuildTool"/> + Name="VCPreLinkEventTool" + Description="generate buildinfo" + CommandLine="make_buildinfo.exe ${ConfigurationName}"/> + Name="VCPreLinkEventTool" + Description="generate buildinfo" + CommandLine="make_buildinfo.exe $(ConfigurationName)"/> + Name="VCPreLinkEventTool" + Description="generate buildinfo" + CommandLine="make_buildinfo.exe ${ConfigurationName}"/> - - - - -