-
Notifications
You must be signed in to change notification settings - Fork 121
/
win_flex_custom_build.targets
94 lines (94 loc) · 3.39 KB
/
win_flex_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
92
93
94
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PropertyPageSchema
Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
<AvailableItemName
Include="Flex">
<Targets>FlexTarget</Targets>
</AvailableItemName>
</ItemGroup>
<UsingTask
TaskName="Flex"
TaskFactory="XamlTaskFactory"
AssemblyName="Microsoft.Build.Tasks.v4.0">
<Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
</UsingTask>
<Target
Name="FlexTarget"
BeforeTargets="$(FlexBeforeTargets)"
AfterTargets="$(FlexAfterTargets)"
Condition="'@(Flex)' != ''"
DependsOnTargets="$(FlexDependsOn);ComputeFlexOutput"
Outputs="%(Flex.Outputs)"
Inputs="%(Flex.Identity);%(Flex.AdditionalDependencies);$(MSBuildProjectFile)">
<ItemGroup
Condition="'@(SelectedFiles)' != ''">
<Flex
Remove="@(Flex)"
Condition="'%(Identity)' != '@(SelectedFiles)'" />
</ItemGroup>
<ItemGroup>
<Flex_tlog
Include="%(Flex.Outputs)"
Condition="'%(Flex.Outputs)' != '' and '%(Flex.ExcludedFromBuild)' != 'true'">
<Source>@(Flex, '|')</Source>
</Flex_tlog>
</ItemGroup>
<Message
Importance="High"
Text="%(Flex.ExecutionDescription)" />
<WriteLinesToFile
Condition="'@(Flex_tlog)' != '' and '%(Flex_tlog.ExcludedFromBuild)' != 'true'"
File="$(IntDir)$(ProjectName).write.1.tlog"
Lines="^%(Flex_tlog.Source);@(Flex_tlog->'%(Fullpath)')" />
<Flex
Condition="'@(Flex)' != '' and '%(Flex.ExcludedFromBuild)' != 'true'"
CommandLineTemplate="%(Flex.CommandLineTemplate)"
OutputFile="%(Flex.OutputFile)"
HeaderFile="%(Flex.HeaderFile)"
Prefix="%(Flex.Prefix)"
Wincompat="%(Flex.Wincompat)"
CaseInsensitive="%(Flex.CaseInsensitive)"
LexCompat="%(Flex.LexCompat)"
Stack="%(Flex.Stack)"
BisonBridge="%(Flex.BisonBridge)"
Noline="%(Flex.Noline)"
Reentrant="%(Flex.Reentrant)"
Cpp="%(Flex.Cpp)"
CppClassName="%(Flex.CppClassName)"
Debug="%(Flex.Debug)"
AdditionalOptions="%(Flex.AdditionalOptions)"
Inputs="%(Flex.Identity)" />
</Target>
<PropertyGroup>
<ComputeLinkInputsTargets>
$(ComputeLinkInputsTargets);
ComputeFlexOutput;
</ComputeLinkInputsTargets>
<ComputeLibInputsTargets>
$(ComputeLibInputsTargets);
ComputeFlexOutput;
</ComputeLibInputsTargets>
</PropertyGroup>
<Target
Name="ComputeFlexOutput"
Condition="'@(Flex)' != ''">
<ItemGroup>
<FlexDirsToMake
Condition="'@(Flex)' != '' and '%(Flex.ExcludedFromBuild)' != 'true'"
Include="%(Flex.Outputs)" />
<Link
Include="%(FlexDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<Lib
Include="%(FlexDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
<ImpLib
Include="%(FlexDirsToMake.Identity)"
Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
</ItemGroup>
<MakeDir
Directories="@(FlexDirsToMake->'%(RootDir)%(Directory)')" />
</Target>
</Project>