<commit_before>commit bc158686baf64dcb0fb492a3a39177e3e7ecf3cd
Author: <NAME> <<EMAIL>>
Date:   Sun Mar 1 00:31:32 2015 -0500

    Mono 4.0 no longer ships a functioning 4.0 profile. $install/lib/mono/4.0 only has reference assemblies with no IL.
    
    Which means we cannot have fsc.exe there as mono will try to use the mscorlib on that directory and fail.
    
    The solution is to change the build to default to install things on 4.5 and symlink the libraries (and the MSBuild .Targets files) to 4.0.

diff --git a/config.make.in b/config.make.in
index 040bf1c..da8e788 100644
--- a/config.make.in
+++ b/config.make.in
@@ -42,7 +42,7 @@ endif
 
 ifeq (x-$(TargetFramework)-$(FSharpCoreBackVersion),x-net40-)
 VERSION = 4.3.1.0
-TARGET = 4.0
+TARGET = 4.5
 outsuffix = .
 endif
 
diff --git a/src/fsharp/targets.make b/src/fsharp/targets.make
index 2bf9071..0aee503 100644
--- a/src/fsharp/targets.make
+++ b/src/fsharp/targets.make
@@ -70,6 +70,18 @@ install-lib:
 	    $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
 	    $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
 	    \
+	    if test $(TARGET) = 4.5; then \
+		mkdir -p $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.0/; \
+		mkdir -p $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+		mkdir -p $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+		ln -fs $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.5/Microsoft.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.0/; \
+		ln -fs $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.5/Microsoft.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+		ln -fs $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.5/Microsoft.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+		ln -fs $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.5/Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.0/; \
+		ln -fs $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.5/Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+		ln -fs $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.5/Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+	    fi; \
+	    \
 	    echo $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$((gacdir)/$(TARGET); \
 	    $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(gacdir)/$(TARGET); \
 	    $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(gacdir)/$(TARGET); \
@@ -105,27 +117,27 @@ install-lib:
 	    $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(gacdir)/Reference\ Assemblies/Microsoft/FSharp/3.0/Runtime/$(PCLPATH)/$(NAME).dll; \
 	fi
 
-# Also place some .NET 4.0 libraries into .NET 4.5
+# Also place some .NET 4.5 libraries into .NET 4.0
 install-lib-net45: 
 	@if test '$(TargetFramework)' = 'net40'; then \
-	  if test -e $(DESTDIR)$(gacdir)/4.5/; then \
-		ln -fs ../4.0/$(ASSEMBLY) $(DESTDIR)$(gacdir)/4.5/$(ASSEMBLY); \
-		if test -e $(DESTDIR)$(gacdir)/4.0/$(ASSEMBLY).config; then \
-		    ln -fs ../4.0/$(ASSEMBLY).config $(DESTDIR)$(gacdir)/4.5/$(ASSEMBLY).config; \
+	  if test -e $(DESTDIR)$(gacdir)/4.0/; then \
+		ln -fs ../4.5/$(ASSEMBLY) $(DESTDIR)$(gacdir)/4.0/$(ASSEMBLY); \<commit_msg>Make 'fsharp-fix-net45-profile.patch' work with relocatable build (thanks @directhex)<commit_after>commit bc158686baf64dcb0fb492a3a39177e3e7ecf3cd
Author: <NAME> <<EMAIL>>
Date:   Sun Mar 1 00:31:32 2015 -0500

    Mono 4.0 no longer ships a functioning 4.0 profile. $install/lib/mono/4.0 only has reference assemblies with no IL.
    
    Which means we cannot have fsc.exe there as mono will try to use the mscorlib on that directory and fail.
    
    The solution is to change the build to default to install things on 4.5 and symlink the libraries (and the MSBuild .Targets files) to 4.0.

diff --git a/config.make.in b/config.make.in
index 040bf1c..da8e788 100644
--- a/config.make.in
+++ b/config.make.in
@@ -42,7 +42,7 @@ endif
 
 ifeq (x-$(TargetFramework)-$(FSharpCoreBackVersion),x-net40-)
 VERSION = 4.3.1.0
-TARGET = 4.0
+TARGET = 4.5
 outsuffix = .
 endif
 
diff --git a/src/fsharp/targets.make b/src/fsharp/targets.make
index 2bf9071..0aee503 100644
--- a/src/fsharp/targets.make
+++ b/src/fsharp/targets.make
@@ -70,6 +70,18 @@ install-lib:
 	    $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/xbuild/Microsoft/VisualStudio/v/FSharp/; \
 	    $(INSTALL_LIB) $(tmpdir)Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/xbuild/Microsoft/VisualStudio/v12.0/FSharp/; \
 	    \
+	    if test $(TARGET) = 4.5; then \
+		mkdir -p $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.0/; \
+		mkdir -p $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+		mkdir -p $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+		ln -fs ../v4.5/Microsoft.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.0/; \
+		ln -fs ../../../../../Microsoft\ F#/v4.5/Microsoft.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+		ln -fs ../../../../../Microsoft\ F#/v4.5/Microsoft.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+		ln -fs ../v4.5/Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ F#/v4.0/; \
+		ln -fs ../../../../../Microsoft\ F#/v4.5/Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.0/Framework/v4.0/; \
+		ln -fs ../../../../../Microsoft\ F#/v4.5/Microsoft.Portable.FSharp.Targets $(DESTDIR)$(gacdir)/Microsoft\ SDKs/F#/3.1/Framework/v4.0/; \
+	    fi; \
+	    \
 	    echo $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$((gacdir)/$(TARGET); \
 	    $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(gacdir)/$(TARGET); \
 	    $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(gacdir)/$(TARGET); \
@@ -105,27 +117,27 @@ install-lib:
 	    $(INSTALL_LIB) $(outdir)$(NAME).dll $(DESTDIR)$(gacdir)/Reference\ Assemblies/Microsoft/FSharp/3.0/Runtime/$(PCLPATH)/$(NAME).dll; \
 	fi
 
-# Also place some .NET 4.0 libraries into .NET 4.5
+# Also place some .NET 4.5 libraries into .NET 4.0
 install-lib-net45: 
 	@if test '$(TargetFramework)' = 'net40'; then \
-	  if test -e $(DESTDIR)$(gacdir)/4.5/; then \
-		ln -fs ../4.0/$(ASSEMBLY) $(DESTDIR)$(gacdir)/4.5/$(ASSEMBLY); \
-		if test -e $(DESTDIR)$(gacdir)/4.0/$(ASSEMBLY).config; then \
-		    ln -fs ../4.0/$(ASSEMBLY).config $(DESTDIR)$(gacdir)/4.5/$(ASSEMBLY).config; \
+	  if test -e $(DESTDIR)$(gacdir)/4.0/; then \
+		ln -fs ../4.5/$(ASSEMBLY) $(DESTDIR)$(gacdir)/4.0/$(ASSEMBLY); \
{'fraction_non_alphanumeric': 0.21441633648277963, 'fraction_numerical': 0.057299603779335566, 'mean_word_length': 3.300786369593709, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3426504', 'n_tokens_mistral': 3063, 'n_tokens_neox': 2789, 'n_words': 481}