-
Notifications
You must be signed in to change notification settings - Fork 121
/
win_bison_custom_build.targets
91 lines (91 loc) · 3.34 KB
/
win_bison_custom_build.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PropertyPageSchema
Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
<AvailableItemName
Include="Bison">
<Targets>BisonTarget</Targets>
</AvailableItemName>
</ItemGroup>
<UsingTask
TaskName="Bison"
TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<Target
Name="BisonTarget"
BeforeTargets="$(BisonBeforeTargets)"
AfterTargets="$(BisonAfterTargets)"
Condition="'@(Bison)' != ''"
DependsOnTargets="$(BisonDependsOn);ComputeBisonOutput"
Outputs="%(Bison.Outputs)"
Inputs="%(Bison.Identity);%(Bison.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
<Bison
Remove="@(Bison)"
Condition="'%(Identity)' != '@(SelectedFiles)'" />
</ItemGroup>
<ItemGroup>
<Bison_tlog
Include="%(Bison.Outputs)"
Condition="'%(Bison.Outputs)' != '' and '%(Bison.ExcludedFromBuild)' != 'true'">
<Source>@(Bison, '|')</Source>
</Bison_tlog>
</ItemGroup>
<Message
Importance="High"
Text="%(Bison.ExecutionDescription)" />
<WriteLinesToFile
Condition="'@(Bison_tlog)' != '' and '%(Bison_tlog.ExcludedFromBuild)' != 'true'"
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(Bison_tlog.Source);@(Bison_tlog->'%(Fullpath)')" />
<Bison
Condition="'@(Bison)' != '' and '%(Bison.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(Bison.CommandLineTemplate)"
OutputFile="%(Bison.OutputFile)"
DefinesFile="%(Bison.DefinesFile)"
Debug="%(Bison.Debug)"
Verbose="%(Bison.Verbose)"
NoLines="%(Bison.NoLines)"
FilePrefix="%(Bison.FilePrefix)"
GraphFile="%(Bison.GraphFile)"
Warnings="%(Bison.Warnings)"
Report="%(Bison.Report)"
ReportFile="%(Bison.ReportFile)"
AdditionalOptions="%(Bison.AdditionalOptions)"
Inputs="%(Bison.Identity)" />
</Target>
<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeBisonOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeBisonOutput;
</ComputeLibInputsTargets>
</PropertyGroup>
<Target
Name="ComputeBisonOutput"
Condition="'@(Bison)' != ''">
<ItemGroup>
<BisonDirsToMake
Condition="'@(Bison)' != '' and '%(Bison.ExcludedFromBuild)' != 'true'"
Include="%(Bison.Outputs)" />
<Link
Include="%(BisonDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<Lib
Include="%(BisonDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<ImpLib
Include="%(BisonDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
</ItemGroup>
<MakeDir
Directories="@(BisonDirsToMake->'%(RootDir)%(Directory)')" />
</Target>
</Project>