mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
This commit is contained in:
parent
6bd3ecfc27
commit
3d3027c5fc
1 changed files with 9 additions and 9 deletions
|
@ -96,7 +96,6 @@
|
||||||
<_LicenseSources Include="$(tcltkDir)tcllicense.terms;
|
<_LicenseSources Include="$(tcltkDir)tcllicense.terms;
|
||||||
$(tcltkDir)tklicense.terms;
|
$(tcltkDir)tklicense.terms;
|
||||||
$(tcltkDir)tixlicense.terms" Condition="$(IncludeTkinter)" />
|
$(tcltkDir)tixlicense.terms" Condition="$(IncludeTkinter)" />
|
||||||
<_LicenseOutputs Include="$(OutDir)LICENSE.txt" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="_RegenTestFrozenmain" Inputs="@(_TestFrozenSources)" Outputs="@(_TestFrozenOutputs)"
|
<Target Name="_RegenTestFrozenmain" Inputs="@(_TestFrozenSources)" Outputs="@(_TestFrozenOutputs)"
|
||||||
|
@ -106,18 +105,19 @@
|
||||||
WorkingDirectory="$(PySourcePath)" />
|
WorkingDirectory="$(PySourcePath)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="_RegenLicense" Inputs="@(_LicenseSources)" Outputs="@(_LicenseOutputs)">
|
<Target Name="_RegenLicense">
|
||||||
<Message Text="Regenerate @(_LicenseOutputs->'%(Filename)%(Extension)', ' ')" Importance="high" />
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<_Text Include="@(_LicenseFiles)">
|
<_Text1 Include="@(_LicenseSources)">
|
||||||
<Content Condition="Exists(%(FullPath))">$([System.IO.File]::ReadAllText(%(FullPath)))</Content>
|
<Content Condition="Exists(%(FullPath))">$([System.IO.File]::ReadAllText(%(FullPath)))</Content>
|
||||||
</_Text>
|
</_Text1>
|
||||||
|
<_Text Include="@(_Text1->'%(Content)')" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<WriteLinesToFile File="@(_LicenseOutputs)" Overwrite="true" Lines="@(_Text->'%(Content)')" />
|
<WriteLinesToFile File="$(OutDir)LICENSE.txt" Overwrite="true" Lines="@(_Text)" />
|
||||||
|
<Warning Text="License file %(_LicenseSources.FullPath) is missing"
|
||||||
|
Condition="!Exists(@(_LicenseSources))" />
|
||||||
|
<Message Text="Wrote $(OutDir)LICENSE.txt" Importance="high" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense">
|
<Target Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense" />
|
||||||
<Message Text="Other generated files are up to date" Importance="high" />
|
|
||||||
</Target>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue