dotnet-installer/build/prepare/CheckPrereqs.targets
Matt Ellis 0f092f92c2 Don't look for Debian package dependencies when skipping installers
Today, we always check to see if DebianPackageBuildDependencies are
present on the machine doing a build, because we will need them to
build the .deb files later on.

Since we now allow skipping of building packages, don't check for
these dependencies if we weren't going to use them.
2017-02-23 14:11:11 -08:00

40 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="UbuntuCoreclrAndCoreFxDependencies.props" />
<Import Project="DebianPackageBuildDependencies.props" />
<Import Project="CentosCoreclrAndCoreFxDependencies.props" />
<Target Name="CheckPrereqs"
DependsOnTargets="CheckUbuntuAptGetDependencies;
CheckCentOsYumDependencies;">
<Message Text="Using Stage0 version:" />
<Exec Command="$(DotnetStage0) --version" />
</Target>
<Target Name="CheckUbuntuAptGetDependencies"
Condition=" '$(Rid)' == 'ubuntu.14.04-x64' ">
<Exec Command="dpkg -s %(UbuntuCoreclrAndCoreFxDependencies.Identity)" />
<Exec Command="dpkg -s %(DebianPackageBuildDependencies.Identity)" Condition="$(SkipBuildingInstallers) != 'true'" />
<OnError ExecuteTargets="ShowAptGetUsage" />
</Target>
<Target Name="ShowAptGetUsage">
<Message Text="Install the missing dependency with `sudo apt-get install {package}`." />
</Target>
<Target Name="CheckCentOsYumDependencies"
Condition=" '$(OSName)' == 'centos' ">
<Exec Command="yum list installed %(CentosCoreclrAndCoreFxDependencies.Identity)" />
<OnError ExecuteTargets="ShowYumUsage" />
</Target>
<Target Name="ShowYumUsage">
<Message Text="Install the missing dependency with `yum install {package}`." />
</Target>
</Project>