-
Notifications
You must be signed in to change notification settings - Fork 32
/
proto-compile
executable file
·61 lines (50 loc) · 6.4 KB
/
proto-compile
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
#!/bin/sh
# Paths to tools and sources
unamestr=$(uname)
if [ "$unamestr" = 'Linux' ]; then
fsharp_dir=/home/jack/SourceCode/fsharp
mono_lib_dir=/usr/local/lib/mono
elif [ "$unamestr" = 'FreeBSD' ]; then
fsharp_dir=/usr/home/jack/SourceCode/fsharp
mono_lib_dir=/usr/local/lib/mono
elif [ "$unamestr" = 'Darwin' ]; then
fsharp_dir=/Users/jack/Code/fsharp
mono_lib_dir=/Library/Frameworks/Mono.framework/Versions/Current/lib/mono
else
echo "Unknown platform: $unamestr" 1>&2
exit 1
fi
# Create build directory structure.
mkdir build
pushd build
mkdir net40-Client
mkdir net45
mkdir profile47
mkdir profile7
mkdir profile78
mkdir profile259
popd
#
# Compile builds using the F# proto-compiler.
#
# Create the file list.
extcore_files="ExtCore/Pervasive.fs ExtCore/Substring.fs ExtCore/String.fs ExtCore/Control.Agents.fs ExtCore/Control.fs ExtCore/Control.Observable.fs ExtCore/Control.Indexed.fs ExtCore/Control.Cps.fs ExtCore/Control.Tasks.fs ExtCore/Collections.fs ExtCore/Collections.Seq.fs ExtCore/Collections.ListZipper.fs ExtCore/Collections.List.fs ExtCore/Collections.Vector.fs ExtCore/Collections.VectorView.fs ExtCore/Collections.ResizeArray.fs ExtCore/Collections.Array.fs ExtCore/Collections.TaggedArray.fs ExtCore/Collections.ArrayView.fs ExtCore/Collections.Set.fs ExtCore/Collections.Map.fs ExtCore/Collections.Dict.fs ExtCore/Collections.Bimap.fs ExtCore/Collections.IntSet.fs ExtCore/Collections.IntMap.fs ExtCore/Collections.IntBimap.fs ExtCore/Collections.LongSet.fs ExtCore/Collections.LongMap.fs ExtCore/Collections.LongBimap.fs ExtCore/Collections.HashSet.fs ExtCore/Collections.HashMap.fs ExtCore/Collections.Multiset.fs ExtCore/Collections.Multimap.fs ExtCore/Collections.LazyList.fs ExtCore/Collections.Queue.fs ExtCore/Collections.PriorityQueue.fs ExtCore/Collections.AsyncSeq.fs ExtCore/ControlCollections.State.fs ExtCore/ControlCollections.Reader.fs ExtCore/ControlCollections.ReaderState.fs ExtCore/ControlCollections.Maybe.fs ExtCore/ControlCollections.ReaderMaybe.fs ExtCore/ControlCollections.Choice.fs ExtCore/ControlCollections.ReaderChoice.fs ExtCore/ControlCollections.ProtectedState.fs ExtCore/ControlCollections.ReaderProtectedState.fs ExtCore/ControlCollections.StatefulChoice.fs ExtCore/ControlCollections.Async.fs ExtCore/ControlCollections.AsyncState.fs ExtCore/ControlCollections.AsyncMaybe.fs ExtCore/ControlCollections.AsyncChoice.fs ExtCore/ControlCollections.AsyncProtectedState.fs ExtCore/ControlCollections.Cont.fs ExtCore/ControlCollections.StateCont.fs ExtCore/Caching.LruCache.fs ExtCore/NativeInterop.fs ExtCore/IO.fs ExtCore/Net.fs ExtCore/Args.fs ExtCore/ExtraPervasives.fs ExtCore/AssemblyInfo.fs"
# net40-Client
framework_lib_dir=4.0-api
mono $fsharp_dir/lib/proto/fsc-proto.exe -o:./build/net40-Client/ExtCore.dll --doc:./build/net40-Client/ExtCore.xml -r:$mono_lib_dir/$framework_lib_dir/System.dll -r:$mono_lib_dir/$framework_lib_dir/System.Core.dll -r:$mono_lib_dir/$framework_lib_dir/System.Numerics.dll --define:TRACE --define:PROTO_COMPILER --define:FX_ATLEAST_40 --define:FX_ATLEAST_FSHARP_3_0 --debug:pdbonly --optimize+ --fullpaths --nowarn:42,75,1204 --platform:anycpu --target:library --extraoptimizationloops:1 $extcore_files
# net45
framework_lib_dir=4.5
mono $fsharp_dir/lib/proto/fsc-proto.exe -o:./build/net45/ExtCore.dll --doc:./build/net45/ExtCore.xml -r:$mono_lib_dir/$framework_lib_dir/System.dll -r:$mono_lib_dir/$framework_lib_dir/System.Core.dll -r:$mono_lib_dir/$framework_lib_dir/System.Numerics.dll --define:TRACE --define:PROTO_COMPILER --define:FX_ATLEAST_40 --define:FX_ATLEAST_45 --define:FX_ATLEAST_FSHARP_3_0 --debug:pdbonly --optimize+ --fullpaths --nowarn:42,75,1204 --platform:anycpu --target:library --extraoptimizationloops:1 $extcore_files
# profile7 (portable-net45+win8) (netstandard1.1)
framework_lib_dir=xbuild-frameworks/.NETPortable/v4.5/Profile/Profile7
mono $fsharp_dir/lib/proto/fsc-proto.exe -o:./build/profile7/ExtCore.dll --doc:./build/profile7/ExtCore.xml -r:$mono_lib_dir/$framework_lib_dir/System.dll -r:$mono_lib_dir/$framework_lib_dir/System.Core.dll -r:$mono_lib_dir/$framework_lib_dir/System.Numerics.dll --define:TRACE --define:PROTO_COMPILER --define:FX_ATLEAST_FSHARP_3_0 --define:FX_NO_SYSTEM_CONSOLE --define:FX_ATLEAST_PORTABLE --define:FX_SIMPLE_DIAGNOSTICS --define:FX_NO_TPL_PARALLEL --debug:pdbonly --optimize+ --fullpaths --nowarn:42,75,1204 --platform:anycpu --target:library --extraoptimizationloops:1 $extcore_files
# profile47 (portable-net45+sl5+win8)
framework_lib_dir=xbuild-frameworks/.NETPortable/v4.0/Profile/Profile47
mono $fsharp_dir/lib/proto/fsc-proto.exe -o:./build/profile47/ExtCore.dll --doc:./build/profile47/ExtCore.xml -r:$mono_lib_dir/$framework_lib_dir/System.dll -r:$mono_lib_dir/$framework_lib_dir/System.Core.dll -r:$mono_lib_dir/$framework_lib_dir/System.Numerics.dll --define:TRACE --define:PROTO_COMPILER --define:FX_ATLEAST_FSHARP_3_0 --define:FX_NO_SYSTEM_CONSOLE --define:FX_ATLEAST_PORTABLE --define:FX_SIMPLE_DIAGNOSTICS --define:FX_NO_TPL_PARALLEL --debug:pdbonly --optimize+ --fullpaths --nowarn:42,75,1204 --platform:anycpu --target:library --extraoptimizationloops:1 $extcore_files
# profile78 (portable-net45+win8+wp8) (netstandard1.0)
framework_lib_dir=xbuild-frameworks/.NETPortable/v4.5/Profile/Profile78
mono $fsharp_dir/lib/proto/fsc-proto.exe -o:./build/profile78/ExtCore.dll --doc:./build/profile78/ExtCore.xml -r:$mono_lib_dir/$framework_lib_dir/System.dll -r:$mono_lib_dir/$framework_lib_dir/System.Core.dll --define:TRACE --define:PROTO_COMPILER --define:FX_ATLEAST_FSHARP_3_0 --define:FX_NO_SYSTEM_CONSOLE --define:FX_ATLEAST_PORTABLE --define:FX_SIMPLE_DIAGNOSTICS --define:FX_NO_TPL_PARALLEL --debug:pdbonly --optimize+ --fullpaths --nowarn:42,75,1204 --platform:anycpu --target:library --extraoptimizationloops:1 $extcore_files
# profile259 (portable-net45+win8+wpa81+wp8) (netstandard1.0)
framework_lib_dir=xbuild-frameworks/.NETPortable/v4.5/Profile/Profile259
mono $fsharp_dir/lib/proto/fsc-proto.exe -o:./build/profile259/ExtCore.dll --doc:./build/profile259/ExtCore.xml -r:$mono_lib_dir/$framework_lib_dir/System.dll -r:$mono_lib_dir/$framework_lib_dir/System.Core.dll --define:TRACE --define:PROTO_COMPILER --define:FX_ATLEAST_FSHARP_3_0 --define:FX_NO_SYSTEM_CONSOLE --define:FX_ATLEAST_PORTABLE --define:FX_SIMPLE_DIAGNOSTICS --define:FX_NO_TPL_PARALLEL --debug:pdbonly --optimize+ --fullpaths --nowarn:42,75,1204 --platform:anycpu --target:library --extraoptimizationloops:1 $extcore_files
# TODO - Implement builds for netcore/netstandard profiles