diff options
author | Steve Dower <steve.dower@python.org> | 2021-07-07 18:35:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-07 18:35:51 (GMT) |
commit | f2491c647937fc0871a473c19e3d5cb5392cfca0 (patch) | |
tree | a8cd062c3267d9ab00f7d4e3f2b60d2b5005a860 /PCbuild | |
parent | 9f431dd0a59c9ac2de46772a4dbd7db2199ef26a (diff) | |
download | cpython-f2491c647937fc0871a473c19e3d5cb5392cfca0.zip cpython-f2491c647937fc0871a473c19e3d5cb5392cfca0.tar.gz cpython-f2491c647937fc0871a473c19e3d5cb5392cfca0.tar.bz2 |
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
Diffstat (limited to 'PCbuild')
-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 7c956c4..a1de340 100644 --- a/PCbuild/regen.targets +++ b/PCbuild/regen.targets @@ -96,21 +96,21 @@ <_LicenseSources Include="$(tcltkDir)tcllicense.terms; $(tcltkDir)tklicense.terms; $(tcltkDir)tixlicense.terms" Condition="$(IncludeTkinter)" /> - <_LicenseOutputs Include="$(OutDir)LICENSE.txt" /> </ItemGroup> - <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="_RegenLicense"> - <Message Text="Other generated files are up to date" Importance="high" /> - </Target> + <Target Name="PostBuildRegen" DependsOnTargets="_RegenLicense" /> </Project> |