[Ecm-commits] r2378 - in trunk/build.vc10: . libecm

cvs commits ecm-commits at lists.gforge.inria.fr
Wed Feb 6 17:05:05 CET 2013


Author: brian_gladman
Date: 2013-02-06 17:05:04 +0100 (Wed, 06 Feb 2013)
New Revision: 2378

Log:
Pick up the ECM_VERSION define in Visual Studio build

Added:
   trunk/build.vc10/gen_ecm_h.bat
   trunk/build.vc10/out_copy_rename.bat
Modified:
   trunk/build.vc10/libecm/libecm.vcxproj
   trunk/build.vc10/libecm/libecm.vcxproj.filters
Added: trunk/build.vc10/gen_ecm_h.bat
===================================================================
--- trunk/build.vc10/gen_ecm_h.bat	                        (rev 0)
+++ trunk/build.vc10/gen_ecm_h.bat	2013-02-06 16:05:04 UTC (rev 2378)
@@ -0,0 +1,13 @@
+ at echo off
+echo creating ecm.h from ecm.h.in
+echo /* generated from ecm-h.in by gen_ecm_h.bat */>tmp.h
+
+for /f "tokens=1,2*" %%a in (..\ecm.h.in) do (
+  if "%%a" EQU "#undef" (
+    if "%%b" EQU "ECM_VERSION" (
+      echo #define ECM_VERSION "7.0-dev">>tmp.h
+    )
+  ) else echo %%a %%b %%c>>tmp.h
+)
+
+call out_copy_rename tmp.h ..\ ecm.h

Modified: trunk/build.vc10/libecm/libecm.vcxproj
===================================================================
--- trunk/build.vc10/libecm/libecm.vcxproj	2013-02-06 13:20:37 UTC (rev 2377)
+++ trunk/build.vc10/libecm/libecm.vcxproj	2013-02-06 16:05:04 UTC (rev 2378)
@@ -80,7 +80,10 @@
   </PropertyGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <PreBuildEvent>
-      <Command>copy ..\config.h ..\..\</Command>
+      <Command>cd ..\
+gen_ecm_h
+copy config.h ..\
+</Command>
     </PreBuildEvent>
     <ClCompile>
       <Optimization>Full</Optimization>
@@ -108,7 +111,10 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
     <PreBuildEvent>
-      <Command>copy ..\config.h ..\..\</Command>
+      <Command>cd ..\
+gen_ecm_h
+copy config.h ..\
+</Command>
     </PreBuildEvent>
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
@@ -141,7 +147,10 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <PreBuildEvent>
-      <Command>copy ..\config.h ..\..\</Command>
+      <Command>cd ..\
+gen_ecm_h
+copy config.h ..\
+</Command>
     </PreBuildEvent>
     <ClCompile>
       <Optimization>Disabled</Optimization>
@@ -170,7 +179,10 @@
   </ItemDefinitionGroup>
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
     <PreBuildEvent>
-      <Command>copy ..\config.h ..\..\</Command>
+      <Command>cd ..\
+gen_ecm_h
+copy config.h ..\
+</Command>
     </PreBuildEvent>
     <Midl>
       <TargetEnvironment>X64</TargetEnvironment>
@@ -209,10 +221,12 @@
     <YASM Include="..\assembler\redc.asm" />
   </ItemGroup>
   <ItemGroup>
+    <ClCompile Include="..\..\addlaws.c" />
     <ClCompile Include="..\..\auxarith.c" />
     <ClCompile Include="..\..\auxlib.c" />
     <ClCompile Include="..\..\batch.c" />
     <ClCompile Include="..\..\bestd.c" />
+    <ClCompile Include="..\..\cmecm.c" />
     <ClCompile Include="..\..\cudawrapper.c" />
     <ClCompile Include="..\..\ecm.c" />
     <ClCompile Include="..\..\ecm2.c" />
@@ -221,6 +235,7 @@
     <ClCompile Include="..\..\getprime.c" />
     <ClCompile Include="..\..\ks-multiply.c" />
     <ClCompile Include="..\..\listz.c" />
+    <ClCompile Include="..\..\listz_handle.c" />
     <ClCompile Include="..\..\lucas.c" />
     <ClCompile Include="..\..\median.c" />
     <ClCompile Include="..\..\mpmod.c" />
@@ -247,9 +262,12 @@
       <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Full</Optimization>
     </ClCompile>
     <ClCompile Include="..\..\stage2.c" />
+    <ClCompile Include="..\..\torsions.c" />
   </ItemGroup>
   <ItemGroup>
+    <ClInclude Include="..\..\addlaws.h" />
     <ClInclude Include="..\..\champions.h" />
+    <ClInclude Include="..\..\cmecm.h" />
     <ClInclude Include="..\..\config.h" />
     <ClInclude Include="..\..\ecm-ecm.h" />
     <ClInclude Include="..\..\ecm-gmp.h" />
@@ -257,8 +275,10 @@
     <ClInclude Include="..\..\ecm-impl.h" />
     <ClInclude Include="..\..\ecm-params.h" />
     <ClInclude Include="..\..\ecm.h" />
+    <ClInclude Include="..\..\listz_handle.h" />
     <ClInclude Include="..\..\longlong.h" />
     <ClInclude Include="..\..\sp.h" />
+    <ClInclude Include="..\..\torsions.h" />
   </ItemGroup>
   <ItemGroup>
     <CudaCompile Include="..\..\cudakernel.cu">

Modified: trunk/build.vc10/libecm/libecm.vcxproj.filters
===================================================================
--- trunk/build.vc10/libecm/libecm.vcxproj.filters	2013-02-06 13:20:37 UTC (rev 2377)
+++ trunk/build.vc10/libecm/libecm.vcxproj.filters	2013-02-06 16:05:04 UTC (rev 2378)
@@ -118,6 +118,18 @@
     <ClCompile Include="..\..\cudawrapper.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\addlaws.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\cmecm.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\listz_handle.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\torsions.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\ecm-ecm.h">
@@ -150,5 +162,17 @@
     <ClInclude Include="..\..\ecm-gpu.h">
       <Filter>Header Files</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\addlaws.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\cmecm.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\listz_handle.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\torsions.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
 </Project>
\ No newline at end of file

Added: trunk/build.vc10/out_copy_rename.bat
===================================================================
--- trunk/build.vc10/out_copy_rename.bat	                        (rev 0)
+++ trunk/build.vc10/out_copy_rename.bat	2013-02-06 16:05:04 UTC (rev 2378)
@@ -0,0 +1,42 @@
+ at echo off
+if not exist %1 goto nofile
+if exist %2 goto copy
+
+echo creating directory %2
+md %2 > nul
+
+:copy
+set str=%2
+for /f "useback tokens=*" %%a in ('%str%') do set str=%%~a
+set str=%str:~-1%
+if %str% == "\" goto hasbackslash
+
+if not exist %2\%3 goto cpy
+fc %1 %2\%3 > nul && if not %errorlevel 1 goto exit
+echo overwriting %2\%3 with %1
+copy %1 %2\%3 > nul
+goto exit
+
+:cpy
+echo copying %1 to %2\%3
+copy %1 %2\%3 > nul
+goto exit
+
+:hasbackslash
+if not exist %2%3 goto cpy2 
+fc %1 %2%3 > nul && if not %errorlevel 1 goto exit
+echo overwriting %2%3 with %1
+copy %1 %2%3 > nul
+goto exit
+
+:cpy2
+echo copying %1 to %2%3
+copy %1 %2%3 > nul
+goto exit
+
+:nofile
+echo %1 not found
+
+:exit
+
+




More information about the Ecm-commits mailing list