PageRenderTime 202ms CodeModel.GetById 70ms app.highlight 2ms RepoModel.GetById 99ms app.codeStats 2ms

/mordor/ragel.targets

http://github.com/mozy/mordor
MSBuild | 99 lines | 99 code | 0 blank | 0 comment | 0 complexity | aa4e9f661ba6fbbf3983587e43818a1b MD5 | raw file
 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="Ragel">
 8      <Targets>_Ragel</Targets>
 9    </AvailableItemName>
10  </ItemGroup>
11  <UsingTask
12    TaskName="Ragel"
13    TaskFactory="XamlTaskFactory"
14    AssemblyName="Microsoft.Build.Tasks.v4.0">
15    <Task>$(MSBuildThisFileDirectory)$(MSBuildThisFileName).xml</Task>
16  </UsingTask>
17  <Target
18    Name="_Ragel"
19    BeforeTargets="$(RagelBeforeTargets)"
20    AfterTargets="$(RagelAfterTargets)"
21    Condition="'@(Ragel)' != ''"
22    DependsOnTargets="$(RagelDependsOn);ComputeRagelOutput"
23    Outputs="@(Ragel-&gt;Metadata('Outputs')-&gt;Distinct())"
24    Inputs="@(Ragel);%(Ragel.AdditionalDependencies);$(MSBuildProjectFile)">
25    <ItemGroup
26      Condition="'@(SelectedFiles)' != ''">
27      <Ragel
28        Remove="@(Ragel)"
29        Condition="'%(Identity)' != '@(SelectedFiles)'" />
30    </ItemGroup>
31    <ItemGroup>
32      <Ragel_tlog
33        Include="%(Ragel.Outputs)"
34        Condition="'%(Ragel.Outputs)' != '' and '%(Ragel.ExcludedFromBuild)' != 'true'">
35        <Source>@(Ragel, '|')</Source>
36      </Ragel_tlog>
37    </ItemGroup>
38    <ItemGroup>
39      <ClCompile
40        Include="%(Ragel.Outputs)"
41        Condition="'%(Ragel.Outputs)' != '' and '%(Ragel.ExcludedFromBuild)' != 'true'" />
42    </ItemGroup>
43    <Message
44      Importance="High"
45      Text="%(Ragel.ExecutionDescription)" />
46    <WriteLinesToFile
47      Condition="'@(Ragel_tlog)' != '' and '%(Ragel_tlog.ExcludedFromBuild)' != 'true'"
48      File="$(IntDir)$(ProjectName).write.1.tlog"
49      Lines="^%(Ragel_tlog.Source);@(Ragel_tlog-&gt;'%(Fullpath)')" />
50    <Ragel
51      Condition="'@(Ragel)' != '' and '%(Ragel.ExcludedFromBuild)' != 'true'"
52      CommandLineTemplate="%(Ragel.CommandLineTemplate)"
53      NoDuplicates="%(Ragel.NoDuplicates)"
54      XML="%(Ragel.XML)"
55      Graphviz="%(Ragel.Graphviz)"
56      PrintableCharacters="%(Ragel.PrintableCharacters)"
57      InhibitLineDirectives="%(Ragel.InhibitLineDirectives)"
58      OutputFileName="%(Ragel.OutputFileName)"
59      IncludePaths="%(Ragel.IncludePaths)"
60      Spec="%(Ragel.Spec)"
61      Machine="%(Ragel.Machine)"
62      NWaySplit="%(Ragel.NWaySplit)"
63      Minimization="%(Ragel.Minimization)"
64      Host="%(Ragel.Host)"
65      CodeStyle="%(Ragel.CodeStyle)"
66      AdditionalOptions="%(Ragel.AdditionalOptions)"
67      Inputs="@(Ragel)" />
68  </Target>
69  <PropertyGroup>
70    <ComputeLinkInputsTargets>
71            $(ComputeLinkInputsTargets);
72            ComputeRagelOutput;
73          </ComputeLinkInputsTargets>
74    <ComputeLibInputsTargets>
75            $(ComputeLibInputsTargets);
76            ComputeRagelOutput;
77          </ComputeLibInputsTargets>
78  </PropertyGroup>
79  <Target
80    Name="ComputeRagelOutput"
81    Condition="'@(Ragel)' != ''">
82    <ItemGroup>
83      <RagelDirsToMake
84        Condition="'@(Ragel)' != '' and '%(Ragel.ExcludedFromBuild)' != 'true'"
85        Include="%(Ragel.Outputs)" />
86      <Link
87        Include="%(RagelDirsToMake.Identity)"
88        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
89      <Lib
90        Include="%(RagelDirsToMake.Identity)"
91        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
92      <ImpLib
93        Include="%(RagelDirsToMake.Identity)"
94        Condition="'%(Extension)'=='.obj' or '%(Extension)'=='.res' or '%(Extension)'=='.rsc' or '%(Extension)'=='.lib'" />
95    </ItemGroup>
96    <MakeDir
97      Directories="@(RagelDirsToMake-&gt;'%(RootDir)%(Directory)')" />
98  </Target>
99</Project>