Skip to content

Commit 948e2c7

Browse files
authored
rejig install locations (fsharp#689)
* Resurrect old back versions (FSharp.Core 4.3.0.0, 4.3.1.0, 4.4.0.0) and install them to "/usr/lib/mono/fsharp/api" and GAC
1 parent bd9cf35 commit 948e2c7

32 files changed

Lines changed: 339 additions & 660 deletions

File tree

.travis.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,20 @@ os:
66

77
mono:
88
- latest
9+
- 4.8.0
910
- 4.4.2
1011

1112
install:
1213

1314
script: ./build-mono.sh && ./test-mono.sh
1415

15-
#matrix:
16-
# allow_failures:
17-
# - mono: 4.2.2
16+
matrix:
17+
exclude:
18+
- os: osx
19+
mono: 4.4.2
20+
- os: osx
21+
mono: 4.8.0
1822

23+
# allow_failures:
24+
# - os: osx
25+
# mono: latest

CHANGELOG-fsharp.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
4.1.2
2+
* [align fsc task and target file](https://github.com/fsharp/fsharp/pull/690)
3+
* [use install layout that includes mono/fsharp](https://github.com/fsharp/fsharp/pull/689)
4+
* [fix F# Intereactive on Mono 4.9+](https://github.com/fsharp/fsharp/pull/687)
5+
16
4.1.1
27
* Update compiler tools
38

Makefile.in

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,48 @@
11
include $(topsrcdir)config.make
22

3-
all clean install build build-proto all-monotouch-monodroid-xamarinmac all-monotouch-monodroid all-monotouch all-monodroid all-xamarinmac all-monotouch-xamarinmac:
3+
.PHONY: restore
4+
5+
restore:
46
MONO_ENV_OPTIONS=$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config
7+
8+
# We need the bootstrap's FSharp.Core to run the proto
9+
build-proto: restore $(bootstrap)/FSharp.Core.dll $(bootstrap)/FSharp.Core.sigdata $(bootstrap)/FSharp.Core.optdata
10+
@-mkdir -p $(protodir)
11+
cp -p $(bootstrap)/FSharp.Core.dll $(protodir)FSharp.Core.dll
12+
cp -p $(bootstrap)/FSharp.Core.sigdata $(protodir)FSharp.Core.sigdata
13+
cp -p $(bootstrap)/FSharp.Core.optdata $(protodir)FSharp.Core.optdata
14+
$(MAKE) -C src/fsharp/FSharp.Build-proto Configuration=Proto $@
15+
$(MAKE) -C src/fsharp/FSharp.Compiler-proto Configuration=Proto $@
16+
$(MAKE) -C src/fsharp/Fsc-proto Configuration=Proto $@
17+
18+
build: restore
19+
$(MAKE) -C src/fsharp $@
20+
21+
clean:
22+
$(MAKE) -C src/fsharp $@
23+
24+
# Make the proto using the bootstrap, then make the final compiler using the proto
25+
# We call MAKE sequentially because we don't want build-final to explicitly depend on build-proto,
26+
# as that causes a complete recompilation of both proto and final everytime you touch the
27+
# compiler sources.
28+
all:
29+
$(MAKE) build-proto
30+
$(MAKE) build
31+
32+
install:
33+
-rm -fr $(DESTDIR)$(monodir)/fsharp
34+
-rm -fr $(DESTDIR)$(monodir)/Microsoft\ F#
35+
-rm -fr $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#
36+
-rm -fr $(DESTDIR)$(monodir)/gac/FSharp.Core
37+
-rm -fr $(DESTDIR)$(monodir)/gac/FSharp.Compiler
38+
-rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v/FSharp
39+
-rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v11.0/FSharp
40+
-rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp
41+
-rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v14.0/FSharp
42+
-rm -fr $(DESTDIR)$(monodir)/xbuild/Microsoft/VisualStudio/v15.0/FSharp
543
$(MAKE) -C src/fsharp $@
6-
BUILD_NET40=1 TEST_NET40_COREUNIT_SUITE=1 MONO_ENV_OPTIONS=$(monoopts) $(XBUILD) /p:Configuration=$(Configuration) /p:TargetFramework=$(TargetFramework) build-everything.proj
44+
echo "------------------------------ INSTALLED FILES --------------"
45+
ls -xlR $(DESTDIR)$(monodir)/fsharp $(DESTDIR)$(monodir)/xbuild $(DESTDIR)$(monodir)/gac/FSharp* $(DESTDIR)$(monodir)/Microsoft*
746

847
dist:
948
-rm -r fsharp-$(DISTVERSION) fsharp-$(DISTVERSION).tar.bz2

README.md

Lines changed: 74 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,94 @@
33
The main purpose of this repository is to package the open editions of the F# compiler, core library
44
and core tools for use across multiple platforms.
55

6-
76
### Contributing to the F# Compiler, Core Library and Tools
87

98
Most contributions to the F# compiler/library/tools go first via the
109
repository at https://github.com/Microsoft/visualfsharp. This ensures that the main
1110
packaging of F# on Windows (the Visual F# Tools) also includes any contributions that are made, and
12-
ensures that the versions do not diverge.
13-
14-
### Contributing on Windows
11+
ensures that the versions do not diverge, and that very extensive QA is done.
1512

1613
If you are using Windows, you should fork the https://github.com/Microsoft/visualfsharp repo and contribute directly there. Your contributions will then be merged into this repo.
1714

18-
### Contributing on Linux/OSX when using Mono
19-
2015
If you are using Linux or OSX, you can still contribute directly to https://github.com/Microsoft/visualfsharp if you like,
21-
Your contributions will then be merged into this repo.
22-
23-
Alternatively, you can prepare your contributions by forking this repository (the code is
16+
Your contributions will then be merged into this repo. Alternatively, you can prepare your contributions by forking this repository (the code is
2417
essentially the same). This will give you access to some additional the cross-platform testing
2518
available from this repo.
2619

27-
## Status
28-
29-
The `master` branch is for F# 4.x.
30-
31-
To bootstrap the compiler, binaries built from an earlier version of this project are used.
3220

33-
This codebase uses the Apache 2.0 license.
21+
## Status
3422

35-
## Current Build Status
23+
The `master` branch is for F# 4.x. To bootstrap the compiler, binaries built from an earlier version of this project are used. This codebase uses the Apache 2.0 license.
3624

3725
| F# | Branch | OSX/Linux | Windows |
3826
|------|---------------|-----------|---------|
39-
| 4.0+ | ``master`` | [![Build Status](https://travis-ci.org/fsharp/fsharp.png?branch=master)](https://travis-ci.org/fsharp/fsharp/branches) | [![Build status](https://ci.appveyor.com/api/projects/status/7m5e2yr0snbbr7t9)](https://ci.appveyor.com/project/fsgit/fsharp) |
27+
| 4.1+ | ``master`` | [![Build Status](https://travis-ci.org/fsharp/fsharp.png?branch=master)](https://travis-ci.org/fsharp/fsharp/branches) | [![Build status](https://ci.appveyor.com/api/projects/status/7m5e2yr0snbbr7t9)](https://ci.appveyor.com/project/fsgit/fsharp) |
4028
| 4.0 | ``fsharp4`` | [![Build Status](https://travis-ci.org/fsharp/fsharp.png?branch=fsharp4)](https://travis-ci.org/fsharp/fsharp/branches) |
41-
| 3.1 | ``fsharp31`` | [![Build Status](https://travis-ci.org/fsharp/fsharp.png?branch=fsharp31)](https://travis-ci.org/fsharp/fsharp/branches) |
42-
| 3.0 | ``fsharp_30`` | [![Build Status](https://travis-ci.org/fsharp/fsharp.png?branch=fsharp_30)](https://travis-ci.org/fsharp/fsharp/branches) |
4329

4430

45-
## NuGet Feed of FSharp.Core and FSharp.Compiler.Tools packages
31+
## Outputs of this repository
4632

47-
This repo is currently used to make two NuGet packages - FSharp.Core and FSharp.Compiler.Tools.
33+
### The ``FSharp.Core`` NuGet package
4834

49-
Stable builds are available in the NuGet Gallery:
50-
[http://www.nuget.org/packages/FSharp.Core](http://www.nuget.org/packages/FSharp.Core) and [http://www.nuget.org/packages/FSharp.Compiler.Tools](http://www.nuget.org/packages/FSharp.Compiler.Tools).
35+
This repo is currently used to make [the FSharp.Core NuGet package](http://www.nuget.org/packages/FSharp.Core). This package includes
36+
* FSharp.Core.dll for .NET Framework/Mono
37+
* FSharp.Core.dll for .NET Core
38+
* FSharp.Core.dll for portable profiles
5139

5240

5341
The FSharp.Core NuGet package includes all of the FSharp.Core redistributables from Visual F#. In addition, they include assemblies for MonoAndroid and MonoTouch built from this repository.
5442

55-
The FSharp.Compiler.Tools package includes the F# compiler `fsc.exe`, F# Interactive `fsi.exe`, build support,
56-
a copy of FSharp.Core used to run the tools, and related DLLs.
43+
### The ``FSharp.Compiler.Tools`` NuGet package
5744

58-
It can be used if you wish to use the latest F# compiler on a computer without relying on the installed version of Visual Studio.
45+
This repo is currently used to make [the FSharp.Compiler.Tools NuGet package]((http://www.nuget.org/packages/FSharp.Compiler.Tools). This package includes the
46+
following for both .NET Core and .NET Framework/Mono:
47+
* the F# compiler `fsc.exe`
48+
* F# Interactive `fsi.exe`
49+
* build support,
50+
* a copy of FSharp.Core used to run the tools
51+
* related DLLs.
52+
53+
The ``FSharp.Compiler.Tools`` NuGet package can be used if you wish to use the latest F# compiler on a computer without relying on the installed version of Visual Studio.
5954
Adding it via nuget to a project will override the in-box compiler with the compiler from the nuget package.
60-
Note: due to how previous versions of the default project templates referenced ``Microsoft.FSharp.Targets``, you may need to manually modify your project file once (see https://github.com/fsharp/fsharp/issues/676).
55+
Note: you will need to manually modify your project file once (see https://github.com/fsharp/fsharp/issues/676).
56+
57+
### The ``fsharp`` Debian Linux Package
58+
59+
Usage: See http://fsharp.org/use/linux
60+
61+
apt-get install fsharp
62+
63+
See https://github.com/mono/linux-packaging-fsharp/, a downstream variant of this repo, where this package is actually made.
64+
65+
* There is a tag for each upstream source tag
66+
* There is a tag for each "debianized" package
67+
* Packaging metadata lives in debian/
68+
* install files are files installed to disk
69+
* cligacinstall are GAC-installed libraries
70+
* `control` is the manifest of packages
71+
* rules is the Makefile which handles build/install.
72+
73+
Jo Shields (@directhex) says:
74+
75+
> I tend to only update the published packages when a) the same update has already been pulled in on Mac by Jason, and either b) something breaks horribly in the existing version on a new Mono, or c) someone explicitly asks me to.
76+
77+
### F# in Mono + OSX
78+
79+
F# is pacakged as part of Mono on OSX. Jason Imison says:
80+
81+
> We use a system called BockBuild that pushes versions of F# (sometimes with patches) out with Mono for OSX (F# is bundled with mono here, not a separate package).
82+
83+
> You can see an example build script here (if you have access, ping me if not) https://github.com/xamarin/bockbuild/blob/2017-02/packages/fsharp.py. Unfortunately, you need to know the branch name here – 2017-02 is what is going to be released with VS for Mac aka Mono 4.9.x
84+
85+
86+
### Package feeds
6187

6288
A feed of nuget packages from builds is available from AppVeyor using the NuGet feed: https://ci.appveyor.com/nuget/fsgit-fsharp
6389

6490
If using Paket, add the source at the top of `paket.dependencies`.
6591

66-
```
67-
source https://www.nuget.org/api/v2
68-
source https://ci.appveyor.com/nuget/fsgit-fsharp
69-
```
92+
source https://www.nuget.org/api/v2
93+
source https://ci.appveyor.com/nuget/fsgit-fsharp
7094

7195
Add the dependency on `FSharp.Core` and run `paket update`. See the AppVeyor [build history](https://ci.appveyor.com/project/fsgit/fsharp/history) for a list of available versions. Here are some options for specifying the dependency:
7296

@@ -81,7 +105,11 @@ If using NuGet Package Manager, add the source to the list of available package
81105

82106
![Available Package Sources](https://cloud.githubusercontent.com/assets/80104/8576204/3cf077f4-2555-11e5-80cc-5db185af7d1e.png)
83107

84-
## Build Requirements
108+
109+
110+
## Development Guide
111+
112+
### Build Requirements
85113

86114
Building F# on Unix-type platforms requires
87115
[Mono](http://www.mono-project.com/download/) 4.4 or higher. If you
@@ -99,9 +127,8 @@ At a shell prompt, say:
99127

100128
xcode-select --install
101129

102-
## How to Build
103130

104-
### Linux and other Unix systems:
131+
### Building on Linux and other Unix systems:
105132
The usual:
106133

107134
./autogen.sh --prefix=/usr
@@ -110,7 +137,8 @@ The usual:
110137

111138
By default that makes optimized binaries. To make debug, use ```make CONFIG=debug```
112139

113-
### OS X
140+
141+
### Building on OS X
114142

115143
Use a prefix to your version of Mono:
116144

@@ -120,76 +148,32 @@ Use a prefix to your version of Mono:
120148

121149
By default that makes optimized binaries. To make debug, use ```make CONFIG=debug```
122150

123-
### Windows, using msbuild
151+
### Building on Windows
124152

125153
Build using:
126154

127155
build.bat
128156

129157
This build the proto compiler, then the library, then the final compiler.
130158

131-
You can also build these independently using:
132-
133-
msbuild src\fsharp-proto-build.proj
134-
ngen install lib\proto\fsc-proto.exe
135-
msbuild src\fsharp-library-build.proj /p:Configuration=Release
136-
msbuild src\fsharp-compiler-build.proj /p:Configuration=Release
137-
138-
You can also build FSharp.Core.dll for other profiles:
139-
140-
msbuild src\fsharp-library-build.proj /p:TargetFramework=net20 /p:Configuration=Release
141-
msbuild src\fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
142-
msbuild src\fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
143-
msbuild src\fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
144-
msbuild src\fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
145-
146-
msbuild src\fsharp-library-build.proj /p:TargetFramework=monodroid /p:Configuration=Release
147-
msbuild src\fsharp-library-build.proj /p:TargetFramework=monotouch /p:Configuration=Release
148-
149-
Change to ``` /p:Configuration=Debug``` for debug binaries.
150-
151-
152-
## Build Note: Strong Names
159+
### Build Note: Strong Names
153160

154161
The FSharp.Core.dll produced is only delay-signed (Mono does not require strong names).
155162
If a strong-name signed FSharp.Core.dll is needed then use the one in
156163

157164
lib\bootstrap\signed\.NETFramework\v4.0\4.3.0.0\FSharp.Core.dll
158165
lib\bootstrap\signed\.NETFramework\v4.0\4.3.1.0\FSharp.Core.dll
159166

160-
## How to Install
161-
162-
make install
163-
164-
## Development Notes
165-
166-
167-
### How Linux Mono Packages are actully made (by Xamarin/Microsoft)
168-
169-
See https://github.com/mono/linux-packaging-fsharp/
170-
171-
* There is a tag for each upstream source tag
172-
* There is a tag for each "debianized" package
173-
* Packaging metadata lives in debian/
174-
* install files are files installed to disk
175-
* cligacinstall are GAC-installed libraries
176-
* `control` is the manifest of packages
177-
* rules is the Makefile which handles build/install.
178-
179-
Jo Shields (@directhex) says:
180-
181-
> I tend to only update the published packages when a) the same update has already been pulled in on Mac by Jason, and either b) something breaks horribly in the existing version on a new Mono, or c) someone explicitly asks me to.
182-
183-
### How F# becomes part of Mono on OSX are actully made (by Xamarin/Microsoft)
184-
185-
186-
Jason Imison says:
187-
188-
> We use a system called BockBuild that pushes versions of F# (sometimes with patches) out with Mono for OSX (F# is bundled with mono here, not a separate package).
189-
190-
> You can see an example build script here (if you have access, ping me if not) https://github.com/xamarin/bockbuild/blob/2017-02/packages/fsharp.py. Unfortunately, you need to know the branch name here – 2017-02 is what is going to be released with VS for Mac aka Mono 4.9.x
191167

168+
### Building on Linux (Wheezy build)
192169

170+
vagrant up
171+
vagrant ssh
172+
cd /vagrant
173+
sudo apt-get install dos2unix autoconf
174+
./autogen.sh --prefix=/usr
175+
make
176+
sudo make install
193177

194178
### Integrating changes from 'visualfsharp'
195179

@@ -209,7 +193,7 @@ There are certain guidelines that need to be followed when integrating changes f
209193

210194
### Continuous Integration Build
211195

212-
A continuous integration build is set up with Travis. See above.
196+
A continuous integration build is set up with Travis and AppVeyor. See above.
213197

214198
### Editing the Compiler with Visual Studio, Xamarin Studio or MonoDevelop
215199

@@ -243,17 +227,6 @@ In 2016 the Microsoft http://visualfsharp.codeplex.com repo moved to GitHub at h
243227

244228
This repository uses bootstrapping libraries, tools and F# compiler. The `lib/bootstrap/X.0` directories contain mono-built libraries, compiler and tools that can be used to bootstrap a build. You can also supply your own via the `--with-bootstrap` option.
245229

246-
### Wheezy build
247-
248-
```
249-
vagrant up
250-
vagrant ssh
251-
cd /vagrant
252-
sudo apt-get install dos2unix autoconf
253-
./autogen.sh --prefix=/usr
254-
make
255-
sudo make install
256-
```
257230

258231

259232
Maintainers

build-mono.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#!/bin/sh
22

3-
# At the moment all we build is the Mono version of the F# compiler
4-
export BUILD_NET40=1
5-
63
# Perform any necessary setup prior to running builds
74
# (e.g., restoring NuGet packages).
85
echo "prepare-mono.sh..."
@@ -21,6 +18,7 @@ chmod +x travis-autogen.sh
2118
# Generate the makefiles
2219
# Bootstrap the compiler
2320
# Install the compiler
24-
./travis-autogen.sh &&
25-
make &&
21+
./travis-autogen.sh && \
22+
make && \
2623
sudo make install
24+

0 commit comments

Comments
 (0)