* Bring back rbuild build to be used until bug 6372 is fixed.
[reactos.git] / tools / rbuild / backend / msvc / rules / spec.targets
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <ItemGroup>
4 <PropertyPageSchema
5 Include="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml" />
6 <AvailableItemName
7 Include="spec">
8 <Targets>_spec</Targets>
9 </AvailableItemName>
10 <AvailableItemName
11 Include="Pspec">
12 <Targets>_Pspec</Targets>
13 </AvailableItemName>
14 </ItemGroup>
15 <UsingTask
16 TaskName="spec"
17 TaskFactory="XamlTaskFactory"
18 AssemblyName="Microsoft.Build.Tasks.v4.0">
19 <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
20 </UsingTask>
21 <UsingTask
22 TaskName="Pspec"
23 TaskFactory="XamlTaskFactory"
24 AssemblyName="Microsoft.Build.Tasks.v4.0">
25 <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
26 </UsingTask>
27 <Target
28 Name="_spec"
29 BeforeTargets="$(specBeforeTargets)"
30 AfterTargets="$(specAfterTargets)"
31 Condition="'@(spec)' != ''"
32 DependsOnTargets="$(specDependsOn);ComputespecOutput"
33 Outputs="@(spec-&gt;Metadata('Outputs')-&gt;Distinct())"
34 Inputs="@(spec);%(spec.AdditionalDependencies);$(MSBuildProjectFile)">
35 <ItemGroup
36 Condition="'@(SelectedFiles)' != ''">
37 <spec
38 Remove="@(spec)"
39 Condition="'%(Identity)' != '@(SelectedFiles)'" />
40 </ItemGroup>
41 <ItemGroup>
42 <spec_tlog
43 Include="%(spec.Outputs)"
44 Condition="'%(spec.Outputs)' != '' and '%(spec.ExcludedFromBuild)' != 'true'">
45 <Source>@(spec, '|')</Source>
46 </spec_tlog>
47 </ItemGroup>
48 <Message
49 Importance="High"
50 Text="%(spec.ExecutionDescription)" />
51 <WriteLinesToFile
52 Condition="'@(spec_tlog)' != '' and '%(spec_tlog.ExcludedFromBuild)' != 'true'"
53 File="$(IntDir)$(ProjectName).write.1.tlog"
54 Lines="^%(spec_tlog.Source);@(spec_tlog-&gt;'%(Fullpath)')" />
55 <spec
56 Condition="'@(spec)' != '' and '%(spec.ExcludedFromBuild)' != 'true'"
57 CommandLineTemplate="%(spec.CommandLineTemplate)"
58 DefFile="%(spec.DefFile)"
59 StubsFile="%(spec.StubsFile)"
60 AdditionalOptions="%(spec.AdditionalOptions)"
61 Inputs="@(spec)" />
62 </Target>
63 <PropertyGroup>
64 <ComputeLinkInputsTargets>
65 $(ComputeLinkInputsTargets);
66 ComputespecOutput;
67 </ComputeLinkInputsTargets>
68 <ComputeLibInputsTargets>
69 $(ComputeLibInputsTargets);
70 ComputespecOutput;
71 </ComputeLibInputsTargets>
72 </PropertyGroup>
73 <Target
74 Name="ComputespecOutput"
75 Condition="'@(spec)' != ''">
76 <ItemGroup>
77 <specDirsToMake
78 Condition="'@(spec)' != '' and '%(spec.ExcludedFromBuild)' != 'true'"
79 Include="%(spec.Outputs)" />
80 <Link
81 Include="%(specDirsToMake.Identity)"
82 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
83 <Lib
84 Include="%(specDirsToMake.Identity)"
85 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
86 <ImpLib
87 Include="%(specDirsToMake.Identity)"
88 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
89 </ItemGroup>
90 <MakeDir
91 Directories="@(specDirsToMake-&gt;'%(RootDir)%(Directory)')" />
92 </Target>
93 <Target
94 Name="_Pspec"
95 BeforeTargets="$(PspecBeforeTargets)"
96 AfterTargets="$(PspecAfterTargets)"
97 Condition="'@(Pspec)' != ''"
98 DependsOnTargets="$(PspecDependsOn);ComputePspecOutput"
99 Outputs="@(Pspec-&gt;Metadata('Outputs')-&gt;Distinct())"
100 Inputs="@(Pspec);%(Pspec.AdditionalDependencies);$(MSBuildProjectFile)">
101 <ItemGroup
102 Condition="'@(SelectedFiles)' != ''">
103 <Pspec
104 Remove="@(Pspec)"
105 Condition="'%(Identity)' != '@(SelectedFiles)'" />
106 </ItemGroup>
107 <ItemGroup>
108 <Pspec_tlog
109 Include="%(Pspec.Outputs)"
110 Condition="'%(Pspec.Outputs)' != '' and '%(Pspec.ExcludedFromBuild)' != 'true'">
111 <Source>@(Pspec, '|')</Source>
112 </Pspec_tlog>
113 </ItemGroup>
114 <Message
115 Importance="High"
116 Text="%(Pspec.ExecutionDescription)" />
117 <WriteLinesToFile
118 Condition="'@(Pspec_tlog)' != '' and '%(Pspec_tlog.ExcludedFromBuild)' != 'true'"
119 File="$(IntDir)$(ProjectName).write.1.tlog"
120 Lines="^%(Pspec_tlog.Source);@(Pspec_tlog-&gt;'%(Fullpath)')" />
121 <Pspec
122 Condition="'@(Pspec)' != '' and '%(Pspec.ExcludedFromBuild)' != 'true'"
123 CommandLineTemplate="%(Pspec.CommandLineTemplate)"
124 includes="%(Pspec.includes)"
125 Specfile="%(Pspec.Specfile)"
126 AdditionalOptions="%(Pspec.AdditionalOptions)"
127 Inputs="@(Pspec)" />
128 </Target>
129 <PropertyGroup>
130 <ComputeLinkInputsTargets>
131 $(ComputeLinkInputsTargets);
132 ComputePspecOutput;
133 </ComputeLinkInputsTargets>
134 <ComputeLibInputsTargets>
135 $(ComputeLibInputsTargets);
136 ComputePspecOutput;
137 </ComputeLibInputsTargets>
138 </PropertyGroup>
139 <Target
140 Name="ComputePspecOutput"
141 Condition="'@(Pspec)' != ''">
142 <ItemGroup>
143 <PspecDirsToMake
144 Condition="'@(Pspec)' != '' and '%(Pspec.ExcludedFromBuild)' != 'true'"
145 Include="%(Pspec.Outputs)" />
146 <Link
147 Include="%(PspecDirsToMake.Identity)"
148 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
149 <Lib
150 Include="%(PspecDirsToMake.Identity)"
151 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
152 <ImpLib
153 Include="%(PspecDirsToMake.Identity)"
154 Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
155 </ItemGroup>
156 <MakeDir
157 Directories="@(PspecDirsToMake-&gt;'%(RootDir)%(Directory)')" />
158 </Target>
159 </Project>