Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1b4340d

Browse files
committed
Compile and install F# Interactive (fsi.exe)
Along with additional fsi.exe references:* FSharp.Compiler.Interactive.Settings.dll* FSharp.Compiler.Server.Shared.dllChange fsi.fs to workaround a Mono bug when compiling with runtime v4.0:https://bugzilla.novell.com/show_bug.cgi?id=665710
1 parent670221c commit1b4340d

File tree

7 files changed

+131
-2
lines changed

7 files changed

+131
-2
lines changed

‎configure.ac‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,8 @@ src/fsharp/FSharp.Core/Makefile
5454
src/fsharp/FSharp.Build/Makefile
5555
src/fsharp/FSharp.Compiler/Makefile
5656
src/fsharp/Fsc/Makefile
57+
src/fsharp/FSharp.Compiler.Interactive.Settings/Makefile
58+
src/fsharp/FSharp.Compiler.Server.Shared/Makefile
59+
src/fsharp/fsi/Makefile
5760
])
5861
AC_OUTPUT
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
NAME=FSharp.Compiler.Interactive.Settings
2+
ASSEMBLY =$(NAME).dll
3+
SIGN=1
4+
5+
srcdir := @abs_srcdir@/
6+
7+
include @abs_top_builddir@/config.make
8+
9+
FSC=$(protodir)fsc-proto.exe
10+
11+
FLAGS +=\
12+
$(FINAL_FLAGS)\
13+
--target:library
14+
15+
REFERENCES +=\
16+
-r:$(outdir)FSharp.Core.dll\
17+
-r:Mono.Security.dll
18+
19+
sources =\
20+
../../assemblyinfo/assemblyinfo.FSharp.Compiler.Interactive.Settings.dll.fs\
21+
../fsiaux.fsi\
22+
../fsiaux.fs\
23+
../fsiattrs.fs
24+
25+
RESOURCES=\
26+
$(tmpdir)FSInteractiveSettings.resources
27+
28+
$(tmpdir)FSInteractiveSettings.resources:$(srcdir)../FSInteractiveSettings.txt
29+
mono --debug$(FSSRGEN)$<$(@:.resources=.fs)$(@:.resources=.resx)
30+
resgen$(@:.resources=.resx)$@
31+
32+
include$(topdir)/src/fsharp/targets.make
33+
34+
install: install-lib-2 install-lib-4
35+
36+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
NAME=FSharp.Compiler.Server.Shared
2+
ASSEMBLY =$(NAME).dll
3+
SIGN=1
4+
5+
srcdir := @abs_srcdir@/
6+
7+
include @abs_top_builddir@/config.make
8+
9+
FSC=$(protodir)fsc-proto.exe
10+
11+
FLAGS +=\
12+
$(FINAL_FLAGS)\
13+
--target:library
14+
15+
REFERENCES +=\
16+
-r:$(outdir)FSharp.Core.dll\
17+
-r:System.Runtime.Remoting.dll\
18+
-r:Mono.Security.dll
19+
20+
sources =\
21+
../../assemblyinfo/assemblyinfo.FSharp.Compiler.Server.Shared.dll.fs\
22+
../fsiserver/fsiserver.fs
23+
24+
RESOURCES=\
25+
$(tmpdir)FSServerShared.resources
26+
27+
$(tmpdir)FSServerShared.resources:$(srcdir)../fsiserver/FSServerShared.txt
28+
mono --debug$(FSSRGEN)$<$(@:.resources=.fs)$(@:.resources=.resx)
29+
resgen$(@:.resources=.resx)$@
30+
31+
include$(topdir)/src/fsharp/targets.make
32+
33+
install: install-lib-2 install-lib-4
34+
35+

‎src/fsharp/Makefile.in‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@ all clean do-2-0 do-4-0 clean-2-0 clean-4-0:
66
$(MAKE) -C FSharp.Build$@
77
$(MAKE) -C FSharp.Compiler$@
88
$(MAKE) -C Fsc$@
9+
$(MAKE) -C FSharp.Compiler.Interactive.Settings$@
10+
$(MAKE) -C FSharp.Compiler.Server.Shared$@
11+
$(MAKE) -C fsi$@
912

1013
install:
1114
$(MAKE) -C FSharp.Core$@
1215
$(MAKE) -C FSharp.Build$@
1316
$(MAKE) -C FSharp.Compiler$@
1417
$(MAKE) -C Fsc$@
15-
18+
$(MAKE) -C FSharp.Compiler.Interactive.Settings$@
19+
$(MAKE) -C FSharp.Compiler.Server.Shared$@
20+
$(MAKE) -C fsi$@

‎src/fsharp/fsi/Makefile.in‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
NAME=fsi
2+
ASSEMBLY =$(NAME).exe
3+
SIGN=1
4+
5+
srcdir := @abs_srcdir@/
6+
7+
include @abs_top_builddir@/config.make
8+
9+
FSC=$(protodir)fsc-proto.exe
10+
11+
FLAGS +=\
12+
$(FINAL_FLAGS)\
13+
--target:exe
14+
15+
REFERENCES +=\
16+
-r:$(outdir)FSharp.Core.dll\
17+
-r:$(outdir)FSharp.Compiler.dll\
18+
-r:$(outdir)FSharp.Compiler.Interactive.Settings.dll\
19+
-r:$(outdir)FSharp.Compiler.Server.Shared.dll\
20+
-r:$(monolibdir)System.Windows.Forms.dll\
21+
-r:$(monolibdir)System.Drawing.dll
22+
23+
sources =\
24+
$(tmpdir)FSIstrings.fs\
25+
../../assemblyinfo/assemblyinfo.fsi.exe.fs\
26+
../InternalCollections.fsi\
27+
../InternalCollections.fs\
28+
console.fs\
29+
fsi.fs
30+
31+
RESOURCES =\
32+
$(tmpdir)FSIstrings.resources
33+
34+
$(tmpdir)FSIstrings.resources:$(srcdir)/FSIstrings.txt
35+
mono --debug$(FSSRGEN)$<$(@:.resources=.fs)$(@:.resources=.resx)
36+
resgen$(@:.resources=.resx)$@
37+
38+
include$(topdir)/src/fsharp/targets.make
39+
40+
install: install-bin-2 install-bin-4
41+

‎src/fsharp/fsi/fsi.fs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ type FsiValuePrinter(ilGlobals,generateDebugInfo,resolvePath) =
180180
yield DefaultPrintingIntercept];
181181
FloatingPointFormat= fsi.FloatingPointFormat;
182182
PrintWidth= fsi.PrintWidth;
183+
183184
PrintDepth= fsi.PrintDepth;
184185
PrintLength= fsi.PrintLength;
185186
PrintSize= fsi.PrintSize;
@@ -1314,8 +1315,16 @@ module MagicAssemblyResolution =
13141315
// It is an explicit user trust decision to load an assembly with #r. Scripts are not run automatically (for example, by double-clicking in explorer).
13151316
// We considered setting loadFromRemoteSources in fsi.exe.config but this would transitively confer unsafe loading to the code in the referenced
13161317
// assemblies. Better to let those assemblies decide for themselves which is safer.
1318+
13171319
#if FX_ATLEAST_40
1320+
1321+
// Mono doesn't provide the UnsafeLoadFrom. LoadFrom works fine.
1322+
#if MONO
1323+
Assembly.LoadFrom(path)
1324+
#else
13181325
Assembly.UnsafeLoadFrom(path)
1326+
#endif
1327+
13191328
#else
13201329
Assembly.LoadFrom(path)
13211330
#endif

‎src/fsharp/targets.make‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ install-lib-2 install-lib-4:
101101
$(INSTALL_LIB)$(outdir)Microsoft.FSharp.targets$(DESTDIR)/$(libdir)mono/$(TARGET)/;
102102

103103
install-bin-2install-bin-4:
104-
sed -e's,[@]DIR[@],$(libdir)mono/$(TARGET),g' -e's,[@]TOOL[@],fsc.exe,g'<$(topdir)launcher.in>$(outdir)$(NAME)$(VERSION)
104+
sed -e's,[@]DIR[@],$(libdir)mono/$(TARGET),g' -e's,[@]TOOL[@],$(ASSEMBLY),g'<$(topdir)launcher.in>$(outdir)$(NAME)$(VERSION)
105105
chmod +x$(outdir)$(NAME)$(VERSION)
106106
@mkdir -p$(DESTDIR)/$(libdir)
107107
@mkdir -p$(DESTDIR)/$(bindir)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp