]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Ensure LICENSE.txt file is generated even in PGO builds (GH-27580)
authorSteve Dower <steve.dower@python.org>
Tue, 3 Aug 2021 15:52:45 +0000 (16:52 +0100)
committerGitHub <noreply@github.com>
Tue, 3 Aug 2021 15:52:45 +0000 (16:52 +0100)
PCbuild/regen.targets

index 27fdd6e29b8bc2d744751c17bdf9515b012b670a..9492cff2d8c3eaaec288e453c5db2f8382691524 100644 (file)
   </ItemGroup>
 
   <Target Name="_RegenTestFrozenmain" Inputs="@(_TestFrozenSources)" Outputs="@(_TestFrozenOutputs)"
-          Condition="$(Platform) == 'Win32' or $(Platform) == 'x64'">
+          Condition="($(Platform) == 'Win32' or $(Platform) == 'x64') and
+                     $(Configuration) != 'PGInstrument' and $(Configuration) != 'PGUpdate'">
     <Message Text="Regenerate @(_TestFrozenOutputs->'%(Filename)%(Extension)', ' ')" Importance="high" />
     <Exec Command="$(PythonExe) Programs\freeze_test_frozenmain.py Programs/test_frozenmain.h"
           WorkingDirectory="$(PySourcePath)" />
     <Message Text="Wrote $(OutDir)LICENSE.txt" Importance="high" />
   </Target>
 
-  <Target Name="PostBuildRegen"
-          Condition="$(Configuration) != 'PGInstrument' and $(Configuration) != 'PGUpdate'"
-          DependsOnTargets="_RegenTestFrozenmain;_RegenLicense" />
+  <Target Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense" />
 </Project>