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

Commit0041d3a

Browse files
committed
Merge pull requestfsharp#159 from knocte/3.0.30
Proper DESTDIR support (very useful for making custom deb/rpm packages)
2 parents26520a0 +2ef3ea5 commit0041d3a

File tree

10 files changed

+89
-76
lines changed

10 files changed

+89
-76
lines changed

‎config.make.in‎

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,23 @@ topdir := @abs_top_srcdir@/
44
builddir := @abs_top_builddir@/
55
libdir := ${prefix}/lib/
66
bindir := ${prefix}/bin/
7-
monorootdir := @MONOROOTDIR@/
8-
monodir := @MONODIR@/
9-
monolibdir2 := $(monodir)2.0/
7+
monolibdir := @MONOLIBDIR@
8+
monogacdir := @MONOGACDIR@
9+
10+
monogacdir20 := @MONOGACDIR20@
1011

1112
#This is where to find MonoTouch of MonoAndroid, for "make do-2-1"
1213
#
1314
#For now this is hardwired, it should be optionally detected by configure.ac
14-
monolibdir21 := @abs_top_srcdir@/dependencies/mono/2.1/
15+
monogacdir21 := @abs_top_srcdir@/dependencies/mono/2.1
16+
17+
monogacdir35 := @MONOGACDIR35@
18+
monogacdir40 := @MONOGACDIR40@
1519

20+
gacdir := ${libdir}mono
21+
gacdir20 := ${gacdir}/2.0
22+
gacdir40 := ${gacdir}/4.0
1623

17-
monolibdir35 := $(monodir)3.5/
18-
monolibdir4 := $(monodir)4.0/
1924
tooldir := $(topdir)lib/bootstrap/4.0/
2025

2126
MONO_OPTIONS += @mono_gc_options@
@@ -110,28 +115,28 @@ DEFINES_4_0 = \
110115
--define:FX_ATLEAST_LINQ
111116

112117
REFERENCES_2_0 = \
113-
-r:$(monolibdir)Microsoft.Build.Engine.dll \
114-
-r:$(monolibdir)Microsoft.Build.Framework.dll \
115-
-r:$(monolibdir35)Microsoft.Build.Tasks.v3.5.dll \
116-
-r:$(monolibdir35)Microsoft.Build.Utilities.v3.5.dll \
117-
-r:$(monolibdir)mscorlib.dll \
118-
-r:$(monolibdir)System.Core.dll \
119-
-r:$(monolibdir)System.dll
118+
-r:$(monogacdirXX)/Microsoft.Build.Engine.dll \
119+
-r:$(monogacdirXX)/Microsoft.Build.Framework.dll \
120+
-r:$(monogacdir35)/Microsoft.Build.Tasks.v3.5.dll \
121+
-r:$(monogacdir35)/Microsoft.Build.Utilities.v3.5.dll \
122+
-r:$(monogacdirXX)/mscorlib.dll \
123+
-r:$(monogacdirXX)/System.Core.dll \
124+
-r:$(monogacdirXX)/System.dll
120125

121126
REFERENCES_2_1 = \
122-
-r:$(monolibdir21)mscorlib.dll \
123-
-r:$(monolibdir21)System.Core.dll \
124-
-r:$(monolibdir21)System.dll
127+
-r:$(monogacdir21)/mscorlib.dll \
128+
-r:$(monogacdir21)/System.Core.dll \
129+
-r:$(monogacdir21)/System.dll
125130

126131
REFERENCES_4_0 = \
127-
-r:$(monolibdir)Microsoft.Build.Engine.dll \
128-
-r:$(monolibdir)Microsoft.Build.Framework.dll \
129-
-r:$(monolibdir)Microsoft.Build.Tasks.v4.0.dll \
130-
-r:$(monolibdir)Microsoft.Build.Utilities.v4.0.dll \
131-
-r:$(monolibdir)mscorlib.dll \
132-
-r:$(monolibdir)System.Core.dll \
133-
-r:$(monolibdir)System.dll \
134-
-r:$(monolibdir)System.Numerics.dll
132+
-r:$(monogacdirXX)/Microsoft.Build.Engine.dll \
133+
-r:$(monogacdirXX)/Microsoft.Build.Framework.dll \
134+
-r:$(monogacdirXX)/Microsoft.Build.Tasks.v4.0.dll \
135+
-r:$(monogacdirXX)/Microsoft.Build.Utilities.v4.0.dll \
136+
-r:$(monogacdirXX)/mscorlib.dll \
137+
-r:$(monogacdirXX)/System.Core.dll \
138+
-r:$(monogacdirXX)/System.dll \
139+
-r:$(monogacdirXX)/System.Numerics.dll
135140

136141
INSTALL = $(SHELL) $(topdir)install-sh
137142
INSTALL_DATA = $(INSTALL) -c -m 644

‎configure.ac‎

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,26 @@ AC_ARG_WITH([gacdir],
5454
)
5555

5656
MONOPREFIX=$(cd `$PKG_CONFIG --variable=prefix mono` && pwd)
57-
58-
if test "x$with_gacdir" = "xno"; then
59-
MONODIR="$MONOPREFIX"/lib/mono
60-
else
61-
MONODIR=$(cd "$with_gacdir/.." && pwd)
57+
MONOLIBDIR="$MONOPREFIX"/lib
58+
MONOGACDIR="$MONOLIBDIR"/mono
59+
if ! test "x$with_gacdir" = "xno"; then
60+
MONOGACDIR=$(cd "$with_gacdir/.." && pwd)
6261
fi
6362

64-
if ! test -e $MONODIR/2.0/mscorlib.dll; then
63+
MONOGACDIR20="$MONOGACDIR"/2.0
64+
MONOGACDIR35="$MONOGACDIR"/3.5
65+
MONOGACDIR40="$MONOGACDIR"/4.0
66+
67+
if ! test -e $MONOGACDIR20/mscorlib.dll; then
6568
AC_ERROR(Couldn't find the mono gac directory or mscorlib.dll in the usual places. Set --with-gacdir=<path>)
6669
fi
6770

68-
MONOROOTDIR=$(cd "$MONODIR/.." && pwd)
71+
AC_SUBST(MONOLIBDIR)
72+
AC_SUBST(MONOGACDIR)
6973

70-
AC_SUBST(MONODIR)
71-
AC_SUBST(MONOROOTDIR)
74+
AC_SUBST(MONOGACDIR20)
75+
AC_SUBST(MONOGACDIR35)
76+
AC_SUBST(MONOGACDIR40)
7277

7378
if test "x$MONO_SGEN" = "xno"; then
7479
mono_gc_options=

‎src/fsharp/FSharp.Compiler-proto/Makefile.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ DEFINES += \
2121

2222
REFERENCES +=\
2323
-r:$(bootstrapdir)FSharp.Core.dll\
24-
-r:$(monolibdir)System.Windows.Forms.dll
24+
-r:$(monogacdirXX)/System.Windows.Forms.dll
2525

2626

2727
sources =\

‎src/fsharp/FSharp.Compiler/Makefile.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ DEFINES_4_0 += \
2222

2323
REFERENCES +=\
2424
-r:$(outdir)FSharp.Core.dll\
25-
-r:$(monolibdir)System.Drawing.dll\
26-
-r:$(monolibdir)System.Windows.Forms.dll
25+
-r:$(monogacdirXX)/System.Drawing.dll\
26+
-r:$(monogacdirXX)/System.Windows.Forms.dll
2727

2828

2929
sources =\

‎src/fsharp/FSharp.Core/Makefile.in‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ FLAGS_2_0 += \
1414
--compiling-fslib\
1515
--nowarn:75,1204\
1616
--target:library\
17-
--compiling-fslib-20:$(monolibdir)../4.0/mscorlib.dll\
17+
--compiling-fslib-20:$(monogacdir40)/mscorlib.dll\
1818
--extraoptimizationloops:1
1919

2020
FLAGS_2_1 +=\

‎src/fsharp/Fsc-proto/Makefile.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ DEFINES += \
2020
REFERENCES +=\
2121
-r:$(bootstrapdir)FSharp.Core.dll\
2222
-r:$(outdir)FSharp.Compiler-proto.dll\
23-
-r:$(monolibdir)System.Runtime.Remoting.dll\
24-
-r:$(monolibdir)System.Windows.Forms.dll
23+
-r:$(monogacdirXX)/System.Runtime.Remoting.dll\
24+
-r:$(monogacdirXX)/System.Windows.Forms.dll
2525

2626
sources =\
2727
../fscmain.fs

‎src/fsharp/Fsc/Makefile.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ FLAGS += \
1515
REFERENCES +=\
1616
-r:$(outdir)FSharp.Core.dll\
1717
-r:$(outdir)FSharp.Compiler.dll\
18-
-r:$(monolibdir)System.Runtime.Remoting.dll\
19-
-r:$(monolibdir)System.Windows.Forms.dll
18+
-r:$(monogacdirXX)/System.Runtime.Remoting.dll\
19+
-r:$(monogacdirXX)/System.Windows.Forms.dll
2020

2121
sources =\
2222
../../assemblyinfo/assemblyinfo.fsc.exe.fs\

‎src/fsharp/fsi/Makefile.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ REFERENCES += \
1717
-r:$(outdir)FSharp.Compiler.dll\
1818
-r:$(outdir)FSharp.Compiler.Interactive.Settings.dll\
1919
-r:$(outdir)FSharp.Compiler.Server.Shared.dll\
20-
-r:$(monolibdir)System.Windows.Forms.dll\
21-
-r:$(monolibdir)System.Drawing.dll
20+
-r:$(monogacdirXX)/System.Windows.Forms.dll\
21+
-r:$(monogacdirXX)/System.Drawing.dll
2222

2323
sources =\
2424
$(tmpdir)FSIstrings.fs\

‎src/fsharp/fsiAnyCpu/Makefile.in‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ REFERENCES += \
1818
-r:$(outdir)FSharp.Compiler.dll\
1919
-r:$(outdir)FSharp.Compiler.Interactive.Settings.dll\
2020
-r:$(outdir)FSharp.Compiler.Server.Shared.dll\
21-
-r:$(monolibdir)System.Windows.Forms.dll\
22-
-r:$(monolibdir)System.Drawing.dll
21+
-r:$(monogacdirXX)/System.Windows.Forms.dll\
22+
-r:$(monogacdirXX)/System.Drawing.dll
2323

2424
sources =\
2525
$(tmpdir)FSIstrings.fs\

‎src/fsharp/targets.make‎

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ do-2-0: REFERENCES += $(REFERENCES_2_0)
3737
do-2-0: FLAGS +=$(FLAGS_2_0)
3838
do-2-0: TARGET :=$(TARGET_2_0)
3939
do-2-0: VERSION :=$(VERSION_2_0)
40-
do-2-0: monolibdir =$(monolibdir2)
40+
do-2-0: monogacdirXX =$(monogacdir20)
41+
do-2-0: gacdirXX =$(gacdir20)
4142
do-2-0:$(objdir)$(objdir)$(TARGET_2_0)$(objdir)$(TARGET_4_0)$(objdir)$(TARGET_2_0)/$(ASSEMBLY)
4243
@mkdir -p$(outdir)
4344
@cp$(objdir)$(ASSEMBLY)$(outdir)
@@ -65,7 +66,8 @@ do-2-1: REFERENCES += $(REFERENCES_2_1)
6566
do-2-1: FLAGS +=$(FLAGS_2_1)
6667
do-2-1: TARGET :=$(TARGET_2_1)
6768
do-2-1: VERSION :=$(VERSION_2_1)
68-
do-2-1: monolibdir =$(monolibdir2)
69+
do-2-1: monogacdirXX =$(monogacdir20)
70+
do-2-1: gacdirXX =$(gacdir20)
6971
do-2-1:$(objdir)$(objdir)$(TARGET_2_1)$(objdir)$(TARGET_4_0)$(objdir)$(TARGET_2_1)/$(ASSEMBLY)
7072
@mkdir -p$(outdir)
7173
@cp$(objdir)$(ASSEMBLY)$(outdir)
@@ -93,7 +95,8 @@ do-4-0: REFERENCES += $(REFERENCES_4_0)
9395
do-4-0: FLAGS +=$(FLAGS_4_0)
9496
do-4-0: TARGET :=$(TARGET_4_0)
9597
do-4-0: VERSION :=$(VERSION_4_0)
96-
do-4-0: monolibdir =$(monolibdir4)
98+
do-4-0: monogacdirXX =$(monogacdir40)
99+
do-4-0: gacdirXX =$(gacdir40)
97100
do-4-0:$(objdir)$(objdir)$(TARGET_2_0)$(objdir)$(TARGET_4_0)$(objdir)$(TARGET_4_0)/$(ASSEMBLY)
98101
@mkdir -p$(outdir)
99102
@cp$(objdir)$(ASSEMBLY)$(outdir)
@@ -144,55 +147,55 @@ install-bin-4: TARGET := $(TARGET_4_0)
144147
#
145148
install-lib-2install-lib-2-1install-lib-4:
146149
@echo"Installing$(ASSEMBLY)"
147-
@mkdir -p$(DESTDIR)$(monodir)/$(TARGET)
148-
gacutil -i$(outdir)$(ASSEMBLY) -root$(DESTDIR)$(monorootdir) -package$(TARGET)
150+
@mkdir -p$(DESTDIR)$(gacdir)/$(TARGET)
151+
gacutil -i$(outdir)$(ASSEMBLY) -root$(DESTDIR)$(libdir) -package$(TARGET)
149152
@iftest -e$(outdir)Microsoft.FSharp.Targets;then\
150-
mkdir -p$(DESTDIR)$(monodir)/Microsoft\F#/v$(TARGET)/;\
151-
mkdir -p$(DESTDIR)$(monodir)/Microsoft\SDKs/F#/3.0/Framework/v$(TARGET)/;\
152-
ln -fs ../../$(TARGET)/$(ASSEMBLY)$(DESTDIR)$(monodir)/Microsoft\F#/v$(TARGET)/$(ASSEMBLY);\
153-
ln -fs ../../../../../$(TARGET)/$(ASSEMBLY)$(DESTDIR)$(monodir)/Microsoft\SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY);\
154-
$(INSTALL_LIB)$(outdir)Microsoft.FSharp.Targets$(DESTDIR)$(monodir)/$(TARGET)/;\
155-
ln -fs ../../$(TARGET)/Microsoft.FSharp.Targets$(DESTDIR)$(monodir)/Microsoft\F#/v$(TARGET)/Microsoft.FSharp.Targets;\
156-
ln -fs ../../../../../$(TARGET)/Microsoft.FSharp.Targets$(DESTDIR)$(monodir)/Microsoft\SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.Targets;\
153+
mkdir -p$(DESTDIR)$(gacdir)/Microsoft\F#/v$(TARGET)/;\
154+
mkdir -p$(DESTDIR)$(gacdir)/Microsoft\SDKs/F#/3.0/Framework/v$(TARGET)/;\
155+
ln -fs ../../$(TARGET)/$(ASSEMBLY)$(DESTDIR)$(gacdir)/Microsoft\F#/v$(TARGET)/$(ASSEMBLY);\
156+
ln -fs ../../../../../$(TARGET)/$(ASSEMBLY)$(DESTDIR)$(gacdir)/Microsoft\SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY);\
157+
$(INSTALL_LIB)$(outdir)Microsoft.FSharp.Targets$(DESTDIR)$(gacdir)/$(TARGET)/;\
158+
ln -fs ../../$(TARGET)/Microsoft.FSharp.Targets$(DESTDIR)$(gacdir)/Microsoft\F#/v$(TARGET)/Microsoft.FSharp.Targets;\
159+
ln -fs ../../../../../$(TARGET)/Microsoft.FSharp.Targets$(DESTDIR)$(gacdir)/Microsoft\SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.Targets;\
157160
fi
158161
@iftest -e$(outdir)$(NAME).xml;then\
159-
$(INSTALL_LIB)$(outdir)$(NAME).xml$(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
160-
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml$(DESTDIR)$(monodir)/$(TARGET)/$(NAME).xml;\
162+
$(INSTALL_LIB)$(outdir)$(NAME).xml$(DESTDIR)$(gacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
163+
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml$(DESTDIR)$(gacdir)/$(TARGET)/$(NAME).xml;\
161164
fi
162165
@iftest -e$(outdir)$(NAME).sigdata;then\
163-
$(INSTALL_LIB)$(outdir)$(NAME).sigdata$(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
164-
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata$(DESTDIR)$(monodir)/$(TARGET)/$(NAME).sigdata;\
166+
$(INSTALL_LIB)$(outdir)$(NAME).sigdata$(DESTDIR)$(gacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
167+
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata$(DESTDIR)$(gacdir)/$(TARGET)/$(NAME).sigdata;\
165168
fi
166169
@iftest -e$(outdir)$(NAME).optdata;then\
167-
$(INSTALL_LIB)$(outdir)$(NAME).optdata$(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
168-
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata$(DESTDIR)$(monodir)/$(TARGET)/$(NAME).optdata;\
170+
$(INSTALL_LIB)$(outdir)$(NAME).optdata$(DESTDIR)$(gacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
171+
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata$(DESTDIR)$(gacdir)/$(TARGET)/$(NAME).optdata;\
169172
fi
170173

171174
install-lib-4-5: install-lib-4
172-
@iftest -e$(DESTDIR)$(monodir)/4.5/;then\
173-
ln -fs ../4.0/$(ASSEMBLY)$(DESTDIR)$(monodir)/4.5/$(ASSEMBLY);\
174-
iftest -e$(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config;then \
175-
ln -fs ../4.0/$(ASSEMBLY).config$(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config;\
175+
@iftest -e$(DESTDIR)$(gacdir)/4.5/;then\
176+
ln -fs ../4.0/$(ASSEMBLY)$(DESTDIR)$(gacdir)/4.5/$(ASSEMBLY);\
177+
iftest -e$(DESTDIR)$(gacdir)/4.0/$(ASSEMBLY).config;then \
178+
ln -fs ../4.0/$(ASSEMBLY).config$(DESTDIR)$(gacdir)/4.5/$(ASSEMBLY).config;\
176179
fi;\
177-
iftest -e$(DESTDIR)$(monodir)/4.0/$(NAME).sigdata;then \
178-
ln -fs ../4.0/$(NAME).sigdata$(DESTDIR)$(monodir)/4.5/$(NAME).sigdata;\
180+
iftest -e$(DESTDIR)$(gacdir)/4.0/$(NAME).sigdata;then \
181+
ln -fs ../4.0/$(NAME).sigdata$(DESTDIR)$(gacdir)/4.5/$(NAME).sigdata;\
179182
fi;\
180-
iftest -e$(DESTDIR)$(monodir)/4.0/$(NAME).xml;then \
181-
ln -fs ../4.0/$(NAME).xml$(DESTDIR)$(monodir)/4.5/$(NAME).xml;\
183+
iftest -e$(DESTDIR)$(gacdir)/4.0/$(NAME).xml;then \
184+
ln -fs ../4.0/$(NAME).xml$(DESTDIR)$(gacdir)/4.5/$(NAME).xml;\
182185
fi;\
183-
iftest -e$(DESTDIR)$(monodir)/4.0/$(NAME).optdata;then \
184-
ln -fs ../4.0/$(NAME).optdata$(DESTDIR)$(monodir)/4.5/$(NAME).optdata;\
186+
iftest -e$(DESTDIR)$(gacdir)/4.0/$(NAME).optdata;then \
187+
ln -fs ../4.0/$(NAME).optdata$(DESTDIR)$(gacdir)/4.5/$(NAME).optdata;\
185188
fi;\
186189
fi
187190

188191
# The binaries fsc.exe and fsi.exe only get installed for Mono 4.0 profile
189192
# This also installs 'fsharpc' and 'fsharpi'
190193
install-bin-4:
191-
sed -e's,[@]DIR[@],$(monodir)/$(TARGET),g' -e's,[@]TOOL[@],$(ASSEMBLY),g'<$(topdir)launcher>$(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
194+
sed -e's,[@]DIR[@],$(gacdir)/$(TARGET),g' -e's,[@]TOOL[@],$(ASSEMBLY),g'<$(topdir)launcher>$(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
192195
chmod +x$(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
193-
@mkdir -p$(DESTDIR)$(monodir)/$(TARGET)
196+
@mkdir -p$(DESTDIR)$(gacdir)/$(TARGET)
194197
@mkdir -p$(DESTDIR)$(bindir)
195-
$(INSTALL_LIB)$(outdir)$(ASSEMBLY)$(DESTDIR)$(monodir)/$(TARGET)
198+
$(INSTALL_LIB)$(outdir)$(ASSEMBLY)$(DESTDIR)$(gacdir)/$(TARGET)
196199
$(INSTALL_BIN)$(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)$(DESTDIR)$(bindir)
197200

198201

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp