singrdk/base/build/BuildKey.proj

61 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

2008-03-05 09:52:00 -05:00
<!--
##############################################################################
Microsoft Research Singularity
Copyright (c) Microsoft Corporation. All rights reserved.
File: Build\BuildKey.proj
Note: Builds the strong name key for all of the signed Singularity assemblies.
In order for parallel builds to work correctly, no two projects should try to
write to the same file at the same time. Previously, strong name key files
had been emitted by SingSharp.targets, InterfaceAssembly.targets, etc.
But this breaks parallel builds. So now all of those projects just build this
project, which generates the key once, then copies the public.snk file to the
various places in the output tree where it is needed. I'm not crazy about this,
but it solves the problem and should be reliable.
##############################################################################
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\Paths.targets"/>
<ItemGroup>
<OutputDir Include="$(APPSDIR)"/>
2008-11-17 18:29:00 -05:00
<OutputDir Include="$(APPILLSDIR)"/>
2008-03-05 09:52:00 -05:00
<OutputDir Include="$(KERNEL_IL_DIR)"/>
<OutputDir Include="$(APPRUNTIMEDIR)"/>
<OutputDir Include="$(LIBSDIR)"/>
<OutputDir Include="$(DRIVDIR)"/>
</ItemGroup>
2008-11-17 18:29:00 -05:00
<Target Name="CreateBuildDir">
<MakeDir Directories="$(SINGULARITY_OBJROOT)"/>
</Target>
2008-03-05 09:52:00 -05:00
<Target Name="CreateStrongName"
Inputs="$(BUILDDIR)\BuildKey.snk"
2008-11-17 18:29:00 -05:00
Outputs="$(SINGULARITY_OBJROOT)\public.snk"
DependsOnTargets="CreateBuildDir"
Condition="!Exists('$(SINGULARITY_OBJROOT)\public.snk')"
>
<Exec Command="&quot;$(BUILDDIR)\sn&quot; -q -p &quot;$(BUILDDIR)\BuildKey.snk&quot; &quot;$(SINGULARITY_OBJROOT)\public.snk&quot;"/>
2008-03-05 09:52:00 -05:00
</Target>
<Target Name="CopyToOutputDirs"
Inputs="$(SINGULARITY_OBJROOT)\public.snk"
Outputs="@(OutputDir->'%(identity)\public.snk')"
DependsOnTargets="CreateStrongName">
<MakeDir Directories="@(OutputDir)"/>
<Copy SourceFiles="$(SINGULARITY_OBJROOT)\public.snk" DestinationFiles="%(OutputDir.identity)\public.snk" SkipUnchangedFiles="true"/>
</Target>
2008-11-17 18:29:00 -05:00
<Target Name="Build"
DependsOnTargets="CreateBuildDir;CreateStrongName;CopyToOutputDirs">
2008-03-05 09:52:00 -05:00
</Target>
</Project>