blob: 90d6dc68d5404fd91d8da259c0c05905bae66c5e [file] [log] [blame]
Anthony Shaw9e365892019-12-18 08:21:20 +11001<?xml version="1.0" encoding="utf-8"?>
2<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup Label="ProjectConfigurations">
4 <ProjectConfiguration Include="Debug|ARM">
5 <Configuration>Debug</Configuration>
6 <Platform>ARM</Platform>
7 </ProjectConfiguration>
8 <ProjectConfiguration Include="Debug|Win32">
9 <Configuration>Debug</Configuration>
10 <Platform>Win32</Platform>
11 </ProjectConfiguration>
12 <ProjectConfiguration Include="Debug|x64">
13 <Configuration>Debug</Configuration>
14 <Platform>x64</Platform>
15 </ProjectConfiguration>
16 <ProjectConfiguration Include="PGInstrument|ARM">
17 <Configuration>PGInstrument</Configuration>
18 <Platform>ARM</Platform>
19 </ProjectConfiguration>
20 <ProjectConfiguration Include="PGInstrument|Win32">
21 <Configuration>PGInstrument</Configuration>
22 <Platform>Win32</Platform>
23 </ProjectConfiguration>
24 <ProjectConfiguration Include="PGInstrument|x64">
25 <Configuration>PGInstrument</Configuration>
26 <Platform>x64</Platform>
27 </ProjectConfiguration>
28 <ProjectConfiguration Include="PGUpdate|ARM">
29 <Configuration>PGUpdate</Configuration>
30 <Platform>ARM</Platform>
31 </ProjectConfiguration>
32 <ProjectConfiguration Include="PGUpdate|Win32">
33 <Configuration>PGUpdate</Configuration>
34 <Platform>Win32</Platform>
35 </ProjectConfiguration>
36 <ProjectConfiguration Include="PGUpdate|x64">
37 <Configuration>PGUpdate</Configuration>
38 <Platform>x64</Platform>
39 </ProjectConfiguration>
40 <ProjectConfiguration Include="Release|ARM">
41 <Configuration>Release</Configuration>
42 <Platform>ARM</Platform>
43 </ProjectConfiguration>
44 <ProjectConfiguration Include="Release|Win32">
45 <Configuration>Release</Configuration>
46 <Platform>Win32</Platform>
47 </ProjectConfiguration>
48 <ProjectConfiguration Include="Release|x64">
49 <Configuration>Release</Configuration>
50 <Platform>x64</Platform>
51 </ProjectConfiguration>
52 </ItemGroup>
53 <PropertyGroup Label="Globals">
54 <ProjectGuid>{21CF2108-2CC9-4005-A6ED-B7965ADE3854}</ProjectGuid>
55 <Keyword>Win32Proj</Keyword>
56 <RootNamespace>regen</RootNamespace>
57 <SupportPGO>false</SupportPGO>
58 <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
59 </PropertyGroup>
60 <Import Project="python.props" />
61 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
62 <PropertyGroup Label="Configuration">
63 <ConfigurationType>Utility</ConfigurationType>
64 <CharacterSet>Unicode</CharacterSet>
65 </PropertyGroup>
66 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
67 <PlatformToolset>v142</PlatformToolset>
68 </PropertyGroup>
69 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
70 <PlatformToolset>v142</PlatformToolset>
71 </PropertyGroup>
72 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
73 <PlatformToolset>v142</PlatformToolset>
74 </PropertyGroup>
75 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
76 <PlatformToolset>v142</PlatformToolset>
77 </PropertyGroup>
78 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
79 <PlatformToolset>v142</PlatformToolset>
80 </PropertyGroup>
81 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
82 <PlatformToolset>v142</PlatformToolset>
83 </PropertyGroup>
84 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGUpdate|x64'">
85 <PlatformToolset>v142</PlatformToolset>
86 </PropertyGroup>
87 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGUpdate|ARM'">
88 <PlatformToolset>v142</PlatformToolset>
89 </PropertyGroup>
90 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
91 <PlatformToolset>v142</PlatformToolset>
92 </PropertyGroup>
93 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGInstrument|ARM'">
94 <PlatformToolset>v142</PlatformToolset>
95 </PropertyGroup>
96 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGInstrument|x64'">
97 <PlatformToolset>v142</PlatformToolset>
98 </PropertyGroup>
99 <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
100 <PlatformToolset>v142</PlatformToolset>
101 </PropertyGroup>
102 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
103 <ImportGroup Label="ExtensionSettings">
104 </ImportGroup>
105 <ImportGroup Label="PropertySheets">
106 <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
107 <Import Project="pyproject.props" />
108 </ImportGroup>
109 <PropertyGroup Label="UserMacros" />
110 <ItemDefinitionGroup>
111 <ClCompile>
112 <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
113 </ClCompile>
114 <Link>
115 <SubSystem>Console</SubSystem>
116 </Link>
117 </ItemDefinitionGroup>
118 <ItemGroup>
119 <ClCompile Include="..\Programs\_freeze_importlib.c" />
120 </ItemGroup>
121 <ItemGroup>
122 <ProjectReference Include="pythoncore.vcxproj">
123 <Project>{cf7ac3d1-e2df-41d2-bea6-1e2556cdea26}</Project>
124 <Private>true</Private>
125 <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
126 <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
127 <LinkLibraryDependencies>true</LinkLibraryDependencies>
128 <UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
129 </ProjectReference>
130 </ItemGroup>
131 <ItemGroup>
132 <None Include="..\Grammar\Grammar">
133 </None>
134 <None Include="..\Grammar\Tokens">
135 </None>
Anthony Shaw9e365892019-12-18 08:21:20 +1100136 <None Include="..\Include\token.h">
137 </None>
138 <None Include="..\Include\opcode.h">
139 </None>
140 <None Include="..\Include\Python-ast.h">
141 </None>
142 <None Include="..\Python\Python-ast.c">
143 </None>
144 <None Include="..\Lib\keyword.py">
145 </None>
146 <None Include="..\Lib\symbol.py">
147 </None>
148 <None Include="..\Doc\library\token-list.inc">
149 </None>
150 </ItemGroup>
151 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
152 <ImportGroup Label="ExtensionTargets">
153 </ImportGroup>
Pablo Galindoc5fc1562020-04-22 23:29:27 +0100154 <Target Name="_RegenPegen" BeforeTargets="Build">
Pablo Galindo1ed83ad2020-06-11 17:30:46 +0100155 <!-- Regenerate Parser/parser.c -->
Anthony Shaw9b64ef32020-04-29 19:09:09 +1000156 <SetEnv Name="PYTHONPATH" Prefix="true" Value="$(PySourcePath)Tools\peg_generator\" />
Pablo Galindo1ed83ad2020-06-11 17:30:46 +0100157 <Exec Command="&quot;$(PythonExe)&quot; -m pegen -q c &quot;$(PySourcePath)Grammar\python.gram&quot; &quot;$(PySourcePath)Grammar\Tokens&quot; -o &quot;$(IntDir)parser.c&quot;" />
158 <Copy SourceFiles="$(IntDir)parser.c" DestinationFiles="$(PySourcePath)Parser\parser.c">
Pablo Galindoc5fc1562020-04-22 23:29:27 +0100159 <Output TaskParameter="CopiedFiles" ItemName="_UpdatedParse" />
160 </Copy>
161 <Warning Text="Pegen updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedParse)' != ''" />
162 </Target>
Anthony Shaw9e365892019-12-18 08:21:20 +1100163 <Target Name="_RegenAST_H" AfterTargets="_RegenGrammar">
Batuhan Taskaya63b8e0c2020-05-18 20:42:10 +0300164 <!-- Regenerate Include/Python-ast.h and Python/Python-ast.c using Parser/asdl_c.py -h -->
165 <Exec Command="&quot;$(PythonExe)&quot; &quot;$(PySourcePath)Parser\asdl_c.py&quot; &quot;$(PySourcePath)Parser\Python.asdl&quot; -H &quot;$(IntDir)Python-ast.h&quot; -C &quot;$(IntDir)Python-ast.c&quot;" />
Anthony Shaw9e365892019-12-18 08:21:20 +1100166 <Copy SourceFiles="$(IntDir)Python-ast.h" DestinationFiles="$(PySourcePath)Include\Python-ast.h">
167 <Output TaskParameter="CopiedFiles" ItemName="_UpdatedH" />
168 </Copy>
Anthony Shaw9e365892019-12-18 08:21:20 +1100169 <Copy SourceFiles="$(IntDir)Python-ast.c" DestinationFiles="$(PySourcePath)Python\Python-ast.c">
Batuhan Taskaya63b8e0c2020-05-18 20:42:10 +0300170 <Output TaskParameter="CopiedFiles" ItemName="_UpdatedC" />
Anthony Shaw9e365892019-12-18 08:21:20 +1100171 </Copy>
Batuhan Taskaya63b8e0c2020-05-18 20:42:10 +0300172 <Warning Text="ASDL is updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedH)' != '' and '@(_UpdatedC)' != ''" />
Anthony Shaw9e365892019-12-18 08:21:20 +1100173 </Target>
174 <Target Name="_RegenOpcodes" AfterTargets="_RegenAST_C">
175 <!-- Regenerate Include/opcode.h from Lib/opcode.py using Tools/scripts/generate_opcode_h.py-->
176 <Exec Command="&quot;$(PythonExe)&quot; $(PySourcePath)Tools\scripts\generate_opcode_h.py &quot;$(PySourcePath)Lib\opcode.py&quot; &quot;$(IntDir)opcode.h&quot;" />
177 <Copy SourceFiles="$(IntDir)opcode.h" DestinationFiles="$(PySourcePath)Include\opcode.h">
178 <Output TaskParameter="CopiedFiles" ItemName="_Updated" />
179 </Copy>
180 <Warning Text="Opcodes updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_Updated)' != ''" />
181 </Target>
182 <Target Name="_RegenTokens" AfterTargets="_RegenOpcodes">
183 <!-- Regenerate Doc/library/token-list.inc from Grammar/Tokens using Tools/scripts/generate_token.py-->
184 <Exec Command="&quot;$(PythonExe)&quot; $(PySourcePath)Tools\scripts\generate_token.py rst &quot;$(PySourcePath)Grammar\Tokens&quot; &quot;$(PySourcePath)Doc\library\token-list.inc&quot;" />
185 <!-- Regenerate Include/token.h from Grammar/Tokens using Tools/scripts/generate_token.py-->
186 <Exec Command="&quot;$(PythonExe)&quot; $(PySourcePath)Tools\scripts\generate_token.py h &quot;$(PySourcePath)Grammar\Tokens&quot; &quot;$(PySourcePath)Include\token.h&quot;" />
187 <!-- Regenerate Parser/token.c from Grammar/Tokens using Tools/scripts/generate_token.py-->
188 <Exec Command="&quot;$(PythonExe)&quot; $(PySourcePath)Tools\scripts\generate_token.py c &quot;$(PySourcePath)Grammar\Tokens&quot; &quot;$(PySourcePath)Parser\token.c&quot;" />
189 <!-- Regenerate Lib/token.py from Grammar/Tokens using Tools/scripts/generate_token.py -->
190 <Exec Command="&quot;$(PythonExe)&quot; $(PySourcePath)Tools\scripts\generate_token.py py &quot;$(PySourcePath)Grammar\Tokens&quot; &quot;$(PySourcePath)Lib\token.py&quot;" />
191 </Target>
192 <Target Name="_RegenKeywords" AfterTargets="_RegenTokens">
Lysandros Nikolaou97276942020-06-11 15:45:15 +0300193 <!-- Regenerate Lib/keyword.py from Grammar/python.gram and Grammar/Tokens using Tools/peg_generator/pegen-->
194 <SetEnv Name="PYTHONPATH" Prefix="true" Value="$(PySourcePath)Tools\peg_generator\" />
195 <Exec Command="&quot;$(PythonExe)&quot; -m pegen.keywordgen &quot;$(PySourcePath)Grammar\python.gram&quot; &quot;$(PySourcePath)Grammar\Tokens&quot; &quot;$(IntDir)keyword.py&quot;" />
Anthony Shaw9e365892019-12-18 08:21:20 +1100196 <Copy SourceFiles="$(IntDir)keyword.py" DestinationFiles="$(PySourcePath)Lib\keyword.py">
197 <Output TaskParameter="CopiedFiles" ItemName="_Updated" />
198 </Copy>
199 <Warning Text="Keywords updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_Updated)' != ''" />
200 </Target>
Anthony Shaw9e365892019-12-18 08:21:20 +1100201 <Target Name="_CleanFiles" BeforeTargets="CoreClean">
202 <ItemGroup>
203 <Clean Include="$(IntDir)keyword.py" />
204 <Clean Include="$(IntDir)opcode.h" />
205 <Clean Include="$(IntDir)Python-ast.c" />
206 <Clean Include="$(IntDir)Python-ast.h" />
Anthony Shaw9e365892019-12-18 08:21:20 +1100207 </ItemGroup>
208 </Target>
Pablo Galindoc5fc1562020-04-22 23:29:27 +0100209</Project>