-
Notifications
You must be signed in to change notification settings - Fork 291
/
Build.proj
142 lines (119 loc) · 4.97 KB
/
Build.proj
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<MainBuildPrefix Condition=" '$(MainBuildPrefix)' == '' "></MainBuildPrefix>
<Mono Condition="'$(OS)' != 'Windows_NT'">true</Mono>
<MacOS Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</MacOS>
<RootDir>$(MSBuildThisFileDirectory)</RootDir>
<Solution>$(RootDir)IronPython.sln</Solution>
<UtilDir>$(RootDir)Util</UtilDir>
<ReferenceDir>$(RootDir)Util\References</ReferenceDir>
<BinDir>$(RootDir)bin</BinDir>
<BuildSysDir>$(RootDir)Build</BuildSysDir>
</PropertyGroup>
<Import Project="$(BuildSysDir)\Tasks.Targets" />
<Import Project="$(MSBuildThisFileDirectory)\CurrentVersion.props" />
<PropertyGroup>
<PackageVersion Condition="'$(ReleaseLevel)' == 'final'">$(MajorVersion).$(MinorVersion).$(MicroVersion)</PackageVersion>
<PackageVersion Condition="'$(ReleaseLevel)' != 'final' or '$(ReleaseSerial)' != '0'">$(MajorVersion).$(MinorVersion).$(MicroVersion)-$(ReleaseLevel)$(ReleaseSerial)</PackageVersion>
<StageDir>$(RootDir)Package\$(Configuration)\Stage\IronPython-$(PackageVersion)</StageDir>
<PackageDir>$(RootDir)Package\$(Configuration)\Packages\IronPython-$(PackageVersion)</PackageDir>
<StdLibDirName>lib</StdLibDirName>
</PropertyGroup>
<PropertyGroup>
<BuildProperties>
RootDir=$(RootDir);
Solution=$(Solution);
Configuration=$(Configuration);
BinDir=$(BinDir);
StageDir=$(StageDir);
PackageDir=$(PackageDir);
PackageVersion=$(PackageVersion);
BuildSysDir=$(BuildSysDir);
</BuildProperties>
</PropertyGroup>
<PropertyGroup>
<NuGet>$(UtilDir)\NuGet\nuget.exe</NuGet>
</PropertyGroup>
<ItemGroup>
<MainStageFiles Include="$(RootDir)README.md" />
<MainStageFiles Include="$(RootDir)LICENSE" />
</ItemGroup>
<Target Name="RestoreReferences">
<MSBuild Projects="$(Solution)" Targets="Restore" />
</Target>
<Target Name="Build" DependsOnTargets="RestoreReferences">
<MSBuild
Projects="$(Solution)"
Targets="Build"
Properties="$(BuildProperties);Configuration=$(Configuration)" />
</Target>
<Target Name="Rebuild" DependsOnTargets="RestoreReferences">
<MSBuild
Projects="$(Solution)"
Targets="Rebuild"
Properties="$(BuildProperties);Configuration=$(Configuration)" />
</Target>
<Target Name="Clean">
<MSBuild
Projects="$(Solution)"
Targets="Clean"
Properties="$(BuildProperties);Configuration=$(Configuration)" />
</Target>
<Target Name="_MakeStageDir">
<MakeDir Directories="$(StageDir)" Condition="!Exists('$(StageDir)')" />
</Target>
<Target Name="_PlatformStage" DependsOnTargets="RestoreReferences;_MakeStageDir">
<MSBuild
Projects="$(Solution)"
Targets="Build"
Properties="$(BuildProperties);Configuration=$(Configuration);Staging=true" />
</Target>
<Target Name="_CopyDlrMainReferences" DependsOnTargets="_MakeStageDir">
<ItemGroup>
<DlrMainReferenceFiles
Include="$(BinDir)\$(Configuration)\*\Microsoft.Scripting.dll" />
<DlrMainReferenceFiles
Include="$(BinDir)\$(Configuration)\*\Microsoft.Scripting.xml" />
<DlrMainReferenceFiles
Include="$(BinDir)\$(Configuration)\*\Microsoft.Dynamic.dll" />
<DlrMainReferenceFiles
Include="$(BinDir)\$(Configuration)\*\Microsoft.Dynamic.xml" />
</ItemGroup>
<Copy SourceFiles="@(DlrMainReferenceFiles)"
DestinationFolder="$(StageDir)\%(RecursiveDir)" />
</Target>
<Target Name="_CopyMonoUnixReferences" DependsOnTargets="_MakeStageDir">
<ItemGroup>
<MonoUnixReferenceFiles
Include="$(BinDir)\$(Configuration)\*\Mono.Unix.dll" />
<MonoUnixReferenceFiles
Include="$(BinDir)\$(Configuration)\*\runtimes\**" />
</ItemGroup>
<Copy SourceFiles="@(MonoUnixReferenceFiles)"
DestinationFolder="$(StageDir)\%(RecursiveDir)" />
</Target>
<Target Name="_CopyMainStageFiles" DependsOnTargets="_MakeStageDir">
<Copy SourceFiles="@(MainStageFiles)" DestinationFolder="$(StageDir)" />
</Target>
<Target Name="_CopyStdLib" DependsOnTargets="_MakeStageDir">
<MSBuild Projects="$(RootDir)\Src\StdLib\StdLib.pyproj"
Properties="OutputPath=$(StageDir);StdLibDirName=$(StdLibDirName)"
Targets="Stage" />
</Target>
<PropertyGroup>
<StageDependsOn>
_MakeStageDir;
_PlatformStage;
_CopyDlrMainReferences;
_CopyMonoUnixReferences;
_CopyMainStageFiles;
_CopyStdLib;
</StageDependsOn>
</PropertyGroup>
<Target Name="Stage" DependsOnTargets="$(StageDependsOn)" />
<!-- This looks like an empty target, but the targets files use it as an AfterTargets -->
<Target Name="Package" DependsOnTargets="Stage" />
<Import Project="$(RootDir)\Package\**\*.Packaging.targets" />
</Project>