Skip to content
This repository was archived by the owner on Feb 19, 2020. It is now read-only.

Commit 3bd3d21

Browse files
committed
build: rename some build-time variables, for consistency
Before this change, the variables used for a build configured with the prefix "/usr/local", and where Mono was installed in "/usr" were: * $prefix => /usr/local * $libdir => /usr/local/lib * $monoprefix => /usr * $monorootdir => /usr/lib * $monodir => /usr/lib/mono * $monolibdir2 => /usr/lib/mono/2.0 * $monolibdir35 => /usr/lib/mono/3.5 * $monolibdir4 => /usr/lib/mono/4.0 * $monolibdir => $monolibdir{2|35|4} From now on, we'll have this naming which is a bit more consistent, and allows to target the /mono/ subdirectory in the targeted prefix (as opposed to the /mono/ directory in the prefix of the currently installed Mono): * $prefix => /usr/local * $libdir => /usr/local/lib * $monoprefix => /usr * $monolibdir => /usr/lib * $monogacdir => /usr/lib/mono * $monogacdir20 => /usr/lib/mono/2.0 * $monogacdir35 => /usr/lib/mono/3.5 * $monogacdir40 => /usr/lib/mono/4.0 * $monogacdirXX => $monogacdir{20|35|40} * $gacdir => /usr/local/lib/mono * $gacdir20 => /usr/local/lib/mono/2.0 * $gacdir35 => /usr/local/lib/mono/3.5 * $gacdir40 => /usr/local/lib/mono/4.0 * $gacdirXX => $gacdir{20|35|40} This cleanup doesn't change behaviour, but improves the field, in preparation for fixage of issue fsharp#154 "DESTDIR to be respected" (next commit).
1 parent 26520a0 commit 3bd3d21

File tree

10 files changed

+82
-76
lines changed

10 files changed

+82
-76
lines changed

config.make.in

+25-24
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@ 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
1516

17+
monogacdir35 := @MONOGACDIR35@
18+
monogacdir40 := @MONOGACDIR40@
1619

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

2122
MONO_OPTIONS += @mono_gc_options@
@@ -110,28 +111,28 @@ DEFINES_4_0 = \
110111
--define:FX_ATLEAST_LINQ
111112

112113
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
114+
-r:$(monogacdirXX)/Microsoft.Build.Engine.dll \
115+
-r:$(monogacdirXX)/Microsoft.Build.Framework.dll \
116+
-r:$(monogacdir35)/Microsoft.Build.Tasks.v3.5.dll \
117+
-r:$(monogacdir35)/Microsoft.Build.Utilities.v3.5.dll \
118+
-r:$(monogacdirXX)/mscorlib.dll \
119+
-r:$(monogacdirXX)/System.Core.dll \
120+
-r:$(monogacdirXX)/System.dll
120121

121122
REFERENCES_2_1 = \
122-
-r:$(monolibdir21)mscorlib.dll \
123-
-r:$(monolibdir21)System.Core.dll \
124-
-r:$(monolibdir21)System.dll
123+
-r:$(monogacdir21)/mscorlib.dll \
124+
-r:$(monogacdir21)/System.Core.dll \
125+
-r:$(monogacdir21)/System.dll
125126

126127
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
128+
-r:$(monogacdirXX)/Microsoft.Build.Engine.dll \
129+
-r:$(monogacdirXX)/Microsoft.Build.Framework.dll \
130+
-r:$(monogacdirXX)/Microsoft.Build.Tasks.v4.0.dll \
131+
-r:$(monogacdirXX)/Microsoft.Build.Utilities.v4.0.dll \
132+
-r:$(monogacdirXX)/mscorlib.dll \
133+
-r:$(monogacdirXX)/System.Core.dll \
134+
-r:$(monogacdirXX)/System.dll \
135+
-r:$(monogacdirXX)/System.Numerics.dll
135136

136137
INSTALL = $(SHELL) $(topdir)install-sh
137138
INSTALL_DATA = $(INSTALL) -c -m 644

configure.ac

+14-9
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

+1-1
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

+2-2
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

+1-1
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+31-31
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ 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)
4141
do-2-0: $(objdir) $(objdir)$(TARGET_2_0) $(objdir)$(TARGET_4_0) $(objdir)$(TARGET_2_0)/$(ASSEMBLY)
4242
@mkdir -p $(outdir)
4343
@cp $(objdir)$(ASSEMBLY) $(outdir)
@@ -65,7 +65,7 @@ do-2-1: REFERENCES += $(REFERENCES_2_1)
6565
do-2-1: FLAGS += $(FLAGS_2_1)
6666
do-2-1: TARGET := $(TARGET_2_1)
6767
do-2-1: VERSION := $(VERSION_2_1)
68-
do-2-1: monolibdir = $(monolibdir2)
68+
do-2-1: monogacdirXX = $(monogacdir20)
6969
do-2-1: $(objdir) $(objdir)$(TARGET_2_1) $(objdir)$(TARGET_4_0) $(objdir)$(TARGET_2_1)/$(ASSEMBLY)
7070
@mkdir -p $(outdir)
7171
@cp $(objdir)$(ASSEMBLY) $(outdir)
@@ -93,7 +93,7 @@ do-4-0: REFERENCES += $(REFERENCES_4_0)
9393
do-4-0: FLAGS += $(FLAGS_4_0)
9494
do-4-0: TARGET := $(TARGET_4_0)
9595
do-4-0: VERSION := $(VERSION_4_0)
96-
do-4-0: monolibdir = $(monolibdir4)
96+
do-4-0: monogacdirXX = $(monogacdir40)
9797
do-4-0: $(objdir) $(objdir)$(TARGET_2_0) $(objdir)$(TARGET_4_0) $(objdir)$(TARGET_4_0)/$(ASSEMBLY)
9898
@mkdir -p $(outdir)
9999
@cp $(objdir)$(ASSEMBLY) $(outdir)
@@ -144,55 +144,55 @@ install-bin-4: TARGET := $(TARGET_4_0)
144144
#
145145
install-lib-2 install-lib-2-1 install-lib-4:
146146
@echo "Installing $(ASSEMBLY)"
147-
@mkdir -p $(DESTDIR)$(monodir)/$(TARGET)
148-
gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)$(monorootdir) -package $(TARGET)
147+
@mkdir -p $(DESTDIR)$(monogacdir)/$(TARGET)
148+
gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)$(monolibdir) -package $(TARGET)
149149
@if test -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; \
150+
mkdir -p $(DESTDIR)$(monogacdir)/Microsoft\ F#/v$(TARGET)/; \
151+
mkdir -p $(DESTDIR)$(monogacdir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \
152+
ln -fs ../../$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monogacdir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \
153+
ln -fs ../../../../../$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monogacdir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \
154+
$(INSTALL_LIB) $(outdir)Microsoft.FSharp.Targets $(DESTDIR)$(monogacdir)/$(TARGET)/; \
155+
ln -fs ../../$(TARGET)/Microsoft.FSharp.Targets $(DESTDIR)$(monogacdir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.Targets; \
156+
ln -fs ../../../../../$(TARGET)/Microsoft.FSharp.Targets $(DESTDIR)$(monogacdir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.Targets; \
157157
fi
158158
@if test -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; \
159+
$(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monogacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \
160+
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)$(monogacdir)/$(TARGET)/$(NAME).xml; \
161161
fi
162162
@if test -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; \
163+
$(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monogacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \
164+
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)$(monogacdir)/$(TARGET)/$(NAME).sigdata; \
165165
fi
166166
@if test -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; \
167+
$(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monogacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \
168+
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)$(monogacdir)/$(TARGET)/$(NAME).optdata; \
169169
fi
170170

171171
install-lib-4-5: install-lib-4
172-
@if test -e $(DESTDIR)$(monodir)/4.5/; then \
173-
ln -fs ../4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \
174-
if test -e $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config; then \
175-
ln -fs ../4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \
172+
@if test -e $(DESTDIR)$(monogacdir)/4.5/; then \
173+
ln -fs ../4.0/$(ASSEMBLY) $(DESTDIR)$(monogacdir)/4.5/$(ASSEMBLY); \
174+
if test -e $(DESTDIR)$(monogacdir)/4.0/$(ASSEMBLY).config; then \
175+
ln -fs ../4.0/$(ASSEMBLY).config $(DESTDIR)$(monogacdir)/4.5/$(ASSEMBLY).config; \
176176
fi; \
177-
if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata; then \
178-
ln -fs ../4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \
177+
if test -e $(DESTDIR)$(monogacdir)/4.0/$(NAME).sigdata; then \
178+
ln -fs ../4.0/$(NAME).sigdata $(DESTDIR)$(monogacdir)/4.5/$(NAME).sigdata; \
179179
fi; \
180-
if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).xml; then \
181-
ln -fs ../4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \
180+
if test -e $(DESTDIR)$(monogacdir)/4.0/$(NAME).xml; then \
181+
ln -fs ../4.0/$(NAME).xml $(DESTDIR)$(monogacdir)/4.5/$(NAME).xml; \
182182
fi; \
183-
if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).optdata; then \
184-
ln -fs ../4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \
183+
if test -e $(DESTDIR)$(monogacdir)/4.0/$(NAME).optdata; then \
184+
ln -fs ../4.0/$(NAME).optdata $(DESTDIR)$(monogacdir)/4.5/$(NAME).optdata; \
185185
fi; \
186186
fi
187187

188188
# The binaries fsc.exe and fsi.exe only get installed for Mono 4.0 profile
189189
# This also installs 'fsharpc' and 'fsharpi'
190190
install-bin-4:
191-
sed -e 's,[@]DIR[@],$(monodir)/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
191+
sed -e 's,[@]DIR[@],$(monogacdir)/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
192192
chmod +x $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
193-
@mkdir -p $(DESTDIR)$(monodir)/$(TARGET)
193+
@mkdir -p $(DESTDIR)$(monogacdir)/$(TARGET)
194194
@mkdir -p $(DESTDIR)$(bindir)
195-
$(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/$(TARGET)
195+
$(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monogacdir)/$(TARGET)
196196
$(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) $(DESTDIR)$(bindir)
197197

198198

0 commit comments

Comments
 (0)