diff options
author | Steve Dower <steve.dower@python.org> | 2021-07-07 18:21:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 18:21:54 +0100 |
commit | 3d3027c5fcc683c14ee55ad231d79971ba12b24d (patch) | |
tree | b4754a14b30bda8e6b38407cd4bbd50dfc65fb23 | |
parent | 6bd3ecfc272b122b55a6adec50dd7a7c868f262f (diff) | |
download | cpython-git-3d3027c5fcc683c14ee55ad231d79971ba12b24d.tar.gz |
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
-rw-r--r-- | PCbuild/regen.targets | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/PCbuild/regen.targets b/PCbuild/regen.targets index 22667d02aa..38f82d1b31 100644 --- a/PCbuild/regen.targets +++ b/PCbuild/regen.targets @@ -96,7 +96,6 @@ <_LicenseSources Include="$(tcltkDir)tcllicense.terms; $(tcltkDir)tklicense.terms; $(tcltkDir)tixlicense.terms" Condition="$(IncludeTkinter)" /> - <_LicenseOutputs Include="$(OutDir)LICENSE.txt" /> </ItemGroup> <Target Name="_RegenTestFrozenmain" Inputs="@(_TestFrozenSources)" Outputs="@(_TestFrozenOutputs)" @@ -106,18 +105,19 @@ WorkingDirectory="$(PySourcePath)" /> </Target> - <Target Name="_RegenLicense" Inputs="@(_LicenseSources)" Outputs="@(_LicenseOutputs)"> - <Message Text="Regenerate @(_LicenseOutputs->'%(Filename)%(Extension)', ' ')" Importance="high" /> + <Target Name="_RegenLicense"> <ItemGroup> - <_Text Include="@(_LicenseFiles)"> + <_Text1 Include="@(_LicenseSources)"> <Content Condition="Exists(%(FullPath))">$([System.IO.File]::ReadAllText(%(FullPath)))</Content> - </_Text> + </_Text1> + <_Text Include="@(_Text1->'%(Content)')" /> </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 Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense"> - <Message Text="Other generated files are up to date" Importance="high" /> - </Target> + <Target Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense" /> </Project> |