forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.make
More file actions
281 lines (249 loc) · 14.6 KB
/
config.make
File metadata and controls
281 lines (249 loc) · 14.6 KB
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
DEFAULT: all
.PHONY: install-sdk-lib
monocmd = $(shell which mono)
monocmddir = $(dir $(monocmd))
prefix = $(shell (cd $(monocmddir)/..; pwd))
thisdir = $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
topdir = $(thisdir)../
builddir = $(topdir)
libdir = $(prefix)/lib/
bindir = $(prefix)/bin/
monobindir = $(bindir)
monolibdir = $(libdir)
monodir = $(monolibdir)mono
debugvars:
@echo prefix=$(prefix)
@echo topdir=$(topdir)
@echo monodir=$(monodir)
@echo monolibdir=$(monolibdir)
@echo monobindir=$(monobindir)
TargetDotnetProfile = net40
Configuration = Release
DISTVERSION = 201011
# Version number mappings for various versions of FSharp.Core
ifeq (x-$(TargetDotnetProfile)-,x-net40-)
ifeq (x-$(FSharpCoreBackVersion)-,x--)
VERSION = 4.4.1.0
PKGINSTALL = yes
REFASSEMPATH = .NETFramework/v4.0
outsuffix = $(TargetDotnetProfile)
endif
ifeq (x-$(FSharpCoreBackVersion)-,x-3.0-)
VERSION = 4.3.0.0
REFASSEMPATH = .NETFramework/v4.0
outsuffix = fsharp30/$(TargetDotnetProfile)
endif
ifeq (x-$(FSharpCoreBackVersion)-,x-3.1-)
VERSION = 4.3.1.0
REFASSEMPATH = .NETFramework/v4.0
outsuffix = fsharp31/$(TargetDotnetProfile)
endif
ifeq (x-$(FSharpCoreBackVersion)-,x-4.0-)
VERSION = 4.4.0.0
REFASSEMPATH = .NETFramework/v4.0
outsuffix = fsharp40/$(TargetDotnetProfile)
endif
endif
ifeq (x-$(TargetDotnetProfile)-,x-monoandroid10+monotouch10+xamarinios10-)
VERSION = 3.98.41.0
outsuffix = $(TargetDotnetProfile)
endif
ifeq (x-$(TargetDotnetProfile)-,x-xamarinmacmobile-)
VERSION = 3.99.41.0
outsuffix = $(TargetDotnetProfile)
endif
ifeq (x-$(TargetDotnetProfile)-,x-portable47-)
VERSION = 3.47.41.0
PCLPATH = .NETPortable
outsuffix = $(TargetDotnetProfile)
endif
ifeq (x-$(TargetDotnetProfile)-,x-portable7-)
VERSION = 3.7.41.0
PCLPATH = .NETCore
outsuffix = $(TargetDotnetProfile)
endif
ifeq (x-$(TargetDotnetProfile)-,x-portable78-)
VERSION = 3.78.41.0
PCLPATH = .NETCore
outsuffix = $(TargetDotnetProfile)
endif
ifeq (x-$(TargetDotnetProfile)-,x-portable259-)
VERSION = 3.259.41.0
PCLPATH = .NETCore
outsuffix = $(TargetDotnetProfile)
endif
FSCORE_DELAY_SIGN_TOKEN = b03f5f7f11d50a3a
SIGN_TOKEN = f536804aa0eb945b
tmpdir = .libs/$(Configuration)/
outdir = $(builddir)$(Configuration)/$(outsuffix)/bin/
INSTALL = $(SHELL) $(topdir)/mono/install-sh
INSTALL_BIN = $(INSTALL) -c -m 755
INSTALL_LIB = $(INSTALL_BIN)
MSBUILD = msbuild
EXTRA_DIST = configure
NO_DIST = .gitignore lib/debug lib/proto lib/release
# Install .optdata/.sigdata if they exist (they go alongside FSharp.Core)
# Install the .Targets file. The XBuild targets file gets installed into the place(s) expected for standard F# project
# files. For F# 2.0 project files this is
# /usr/lib/mono/Microsoft F#/v4.0/Microsoft.FSharp.Targets
# For F# 3.0 project files this is
# /usr/lib/mono/Microsoft SDKs/F#/3.0/Framework/v4.0/Microsoft.FSharp.Targets
# For F# 3.1 project files this is
# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v12.0/FSharp/Microsoft.FSharp.Targets
# For F# 4.0 project files this is
# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v14.0/FSharp/Microsoft.FSharp.Targets
# For F# 4.1 project files this is
# /usr/lib/mono/xbuild/Microsoft/VisualStudio/v15.0/FSharp/Microsoft.FSharp.Targets
#
# Here 12.0/14.0/15.0 is 'VisualStudioVersion'. xbuild should set this to 11.0/12.0/14.0/15.0, copying MSBuild.
#
# We put the F# targets and link the SDK DLLs for all these locations
#
# We put a forwarding targets file into all three locations. We also put one in
# .../lib/mono/xbuild/Microsoft/VisualStudio/v/FSharp/Microsoft.FSharp.Targets
# since this is the location if 'xbuild' fails to set VisualStudioVersion.
#
install-sdk-lib:
@echo "Installing $(ASSEMBLY)"
@mkdir -p $(DESTDIR)$(monodir)/fsharp
@if test "x$(DELAY_SIGN)" = "x1"; then \
echo "Signing $(outdir)$(ASSEMBLY) with Mono key"; \
$(monobindir)sn -q -R $(outdir)$(ASSEMBLY) $(topdir)mono/mono.snk; \
fi
@if test x-$(NAME) = x-FSharp.Compiler.Private; then \
echo "Installing extra dependency System.Collections.Immutable.dll to $(DESTDIR)$(monodir)/fsharp/"; \
$(INSTALL_LIB) $(outdir)System.Collections.Immutable.dll $(DESTDIR)$(monodir)/fsharp/; \
echo "Installing extra dependency System.Reflection.Metadata.dll to $(DESTDIR)$(monodir)/fsharp/"; \
$(INSTALL_LIB) $(outdir)System.Reflection.Metadata.dll $(DESTDIR)$(monodir)/fsharp/; \
fi
@if test x-$(NAME) = x-FSharp.Build; then \
echo "Installing Microsoft.FSharp.Targets and Microsoft.Portable.FSharp.Targets into install locations matching Visual Studio"; \
echo " --> $(DESTDIR)$(monodir)/fsharp/"; \
echo " --> $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/"; \
echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/"; \
echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/"; \
echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/"; \
echo " --> $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/"; \
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/"; \
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/"; \
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/"; \
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/"; \
echo " --> $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/"; \
\
mkdir -p $(tmpdir); \
mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \
mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \
mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
mkdir -p $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
\
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/fsharp/; \
\
echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' > $(tmpdir)Microsoft.FSharp.Targets; \
echo ' <Import Project="$(monodir)/fsharp/Microsoft.FSharp.Targets" />' >> $(tmpdir)Microsoft.FSharp.Targets; \
echo '</Project>' >> $(tmpdir)Microsoft.FSharp.Targets; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
\
echo '<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">' > $(tmpdir)Microsoft.Portable.FSharp.Targets; \
echo ' <Import Project="$(monodir)/fsharp/Microsoft.Portable.FSharp.Targets" />' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \
echo '</Project>' >> $(tmpdir)Microsoft.Portable.FSharp.Targets; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ F#/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.0/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/4.1/Framework/v4.0/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
$(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
\
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.props $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
\
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
\
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp/; \
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Overrides.NetSdk.targets $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp/; \
fi
@if test x-$(outsuffix) = x-net40; then \
if test -e $(outdir)$(NAME).dll; then \
echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \
mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
$(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/; \
fi; \
if test -e $(outdir)$(NAME).dll.config; then \
echo "Installing $(outdir)$(NAME).dll to $(DESTDIR)$(monodir)/fsharp/"; \
mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
$(INSTALL_LIB) $(outdir)$(NAME).dll.config $(DESTDIR)$(monodir)/fsharp/; \
fi; \
if test -e $(outdir)$(NAME).xml; then \
echo "Installing $(outdir)$(NAME).xml into $(DESTDIR)$(monodir)/fsharp/"; \
mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
$(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/; \
fi; \
if test -e $(outdir)$(NAME).sigdata; then \
echo "Installing $(outdir)$(NAME).sigdata into $(DESTDIR)$(monodir)/fsharp/"; \
mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
$(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/; \
fi; \
if test -e $(outdir)$(NAME).optdata; then \
echo "Installing $(outdir)$(NAME).optdata into $(DESTDIR)$(monodir)/fsharp/"; \
mkdir -p $(DESTDIR)$(monodir)/fsharp/; \
$(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/; \
fi; \
fi
@if test x-$(NAME) = x-FSharp.Core && test x-$(REFASSEMPATH) != x-; then \
echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \
echo " --> $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)"; \
mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION); \
$(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
$(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
$(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
$(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(REFASSEMPATH)/$(VERSION)/; \
fi
@if test x-$(NAME) = x-FSharp.Core && test x-$(PCLPATH) != x-; then \
echo "Installing FSharp.Core $(VERSION) reference assembly into api location"; \
echo " --> $(DESTDIR)$(monodir)/fsharp/$(PCLPATH)/$(VERSION)"; \
mkdir -p $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION); \
$(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
$(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
$(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
$(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(monodir)/fsharp/api/$(PCLPATH)/$(VERSION)/; \
fi
# The binaries fsc.exe and fsi.exe only get installed for Mono 4.5 profile
# This also installs 'fsharpc' and 'fsharpi' and 'fsharpiAnyCpu'
install-bin:
chmod +x $(outdir)$(ASSEMBLY)
sed -e 's,[@]DIR[@],$(monodir)/fsharp,g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' -e 's,[@]MONOBINDIR[@],$(monobindir),g' < $(topdir)mono/launcher > $(outdir)$(subst fs,fsharp,$(NAME))
chmod +x $(outdir)$(subst fs,fsharp,$(NAME))
@mkdir -p $(DESTDIR)$(monodir)/fsharp
@mkdir -p $(DESTDIR)$(bindir)
$(INSTALL_BIN) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/fsharp
$(INSTALL_BIN) $(outdir)$(ASSEMBLY).config $(DESTDIR)$(monodir)/fsharp
$(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME)) $(DESTDIR)$(bindir)