fsharp/buildtools/buildtools.targets

64 строки
2.5 KiB
Plaintext
Исходник Обычный вид История

2018-11-27 21:10:43 +03:00
<Project>
<PropertyGroup>
2019-03-19 23:44:16 +03:00
<!-- during a regular build `dotnet(.exe)` is expected to be on the path -->
<DotNetExe Condition="'$(OS)' == 'Unix'">dotnet</DotNetExe>
<DotNetExe Condition="'$(OS)' != 'Unix'">dotnet.exe</DotNetExe>
<!-- if already running under dotnet, use that instance -->
<DotNetExe Condition="'$(DOTNET_HOST_PATH)' != ''">$(DOTNET_HOST_PATH)</DotNetExe>
2018-11-27 21:10:43 +03:00
<DotNetExePath>$(DotNetExe)</DotNetExePath>
2019-03-19 23:44:16 +03:00
<!-- this is usually set by Arcade, but non-arcade builds won't have it -->
<DotNetTool Condition="'$(DotNetTool)' == ''">$(DotNetExePath)</DotNetTool>
2018-11-27 21:10:43 +03:00
</PropertyGroup>
<!-- Build FsLex files. -->
<Target Name="CallFsLex"
Inputs="@(FsLex)"
Outputs="@(FsLex->'$(FsLexOutputFolder)%(Filename).fs')"
Condition="'@(FsLex)'!=''"
BeforeTargets="CoreCompile">
<PropertyGroup>
2019-04-16 01:01:00 +03:00
<FsLexPath Condition="'$(FsLexPath)' == ''">$(ArtifactsDir)\Bootstrap\fslex\fslex.dll</FsLexPath>
2018-11-27 21:10:43 +03:00
</PropertyGroup>
<!-- Create the output directory -->
<MakeDir Directories="$(FsLexOutputFolder)"/>
<!-- Run the tool -->
2019-03-19 23:44:16 +03:00
<Exec Command="&quot;$(DotNetTool)&quot; &quot;$(FsLexPath)&quot; -o &quot;$(FsLexOutputFolder)%(FsLex.Filename).fs&quot; %(FsLex.OtherFlags) %(FsLex.Identity)" />
2018-11-27 21:10:43 +03:00
<!-- Make sure it will get cleaned -->
<CreateItem Include="$(FsLexOutputFolder)%(FsLex.Filename).fs">
<Output TaskParameter="Include" ItemName="FsGeneratedSource"/>
2018-11-27 21:10:43 +03:00
<Output TaskParameter="Include" ItemName="FileWrites"/>
</CreateItem>
</Target>
<!-- Build FsYacc files. -->
<Target Name="CallFsYacc"
Inputs="@(FsYacc)"
Outputs="@(FsYacc->'$(FsYaccOutputFolder)%(Filename).fs')"
Condition="'@(FsYacc)'!=''"
BeforeTargets="CoreCompile">
<PropertyGroup>
2019-04-16 01:01:00 +03:00
<FsYaccPath Condition="'$(FsYaccPath)' == ''">$(ArtifactsDir)\Bootstrap\fsyacc\fsyacc.dll</FsYaccPath>
2018-11-27 21:10:43 +03:00
</PropertyGroup>
<!-- Create the output directory -->
<MakeDir Directories="$(FsYaccOutputFolder)" />
<!-- Run the tool -->
2019-03-19 23:44:16 +03:00
<Exec Command="&quot;$(DotNetTool)&quot; &quot;$(FsYaccPath)&quot; -o &quot;$(FsYaccOutputFolder)%(FsYacc.Filename).fs&quot; %(FsYacc.OtherFlags) %(FsYacc.Identity)" />
2018-11-27 21:10:43 +03:00
<!-- Make sure it will get cleaned -->
<CreateItem Include="$(FsYaccOutputFolder)%(FsYacc.Filename).fs">
<Output TaskParameter="Include" ItemName="FsGeneratedSource"/>
2018-11-27 21:10:43 +03:00
<Output TaskParameter="Include" ItemName="FileWrites"/>
</CreateItem>
</Target>
</Project>