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

Commit2ef3ea5

Browse files
committed
install: stop using current mono prefix to install, respect --prefix arg
Even if the $prefix arg seems completely wrong (as in, there is no monoinstallation in that prefix):- The scripts should respect it (because creating .deb packages involvesinstalling in sandboxed filesystem paths to extract only the relevant bitsinstalled by a tarball).- Anyway there is already a warning printed by the configure.ac, just incase who is compiling is a person instead of a buildbot.- When compiling, proper mono libs of the existing current installationwill still be properly referenced, so building will still work.This is done by using $gacdir variables instead of the $monogacdir onesfor the install Makefile targets (which reference /usr/local/lib/monoinstead of /usr/lib/mono, for the case of having mono installed in /usrbut choosing the /usr/local prefix).This commit finishes DESTDIR support, to work outside of the box, for examplewith a .deb package creator like fpm (see a sample script athttps://github.com/knocte/7digital-mono/blob/master/build-fsharp-package.bash ).
1 parent3bd3d21 commit2ef3ea5

File tree

2 files changed

+35
-28
lines changed

2 files changed

+35
-28
lines changed

‎config.make.in‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ monogacdir21 := @abs_top_srcdir@/dependencies/mono/2.1
1717
monogacdir35 := @MONOGACDIR35@
1818
monogacdir40 := @MONOGACDIR40@
1919

20+
gacdir := ${libdir}mono
21+
gacdir20 := ${gacdir}/2.0
22+
gacdir40 := ${gacdir}/4.0
23+
2024
tooldir := $(topdir)lib/bootstrap/4.0/
2125

2226
MONO_OPTIONS += @mono_gc_options@

‎src/fsharp/targets.make‎

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ do-2-0: FLAGS += $(FLAGS_2_0)
3838
do-2-0: TARGET :=$(TARGET_2_0)
3939
do-2-0: VERSION :=$(VERSION_2_0)
4040
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)
@@ -66,6 +67,7 @@ do-2-1: FLAGS += $(FLAGS_2_1)
6667
do-2-1: TARGET :=$(TARGET_2_1)
6768
do-2-1: VERSION :=$(VERSION_2_1)
6869
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)
@@ -94,6 +96,7 @@ do-4-0: FLAGS += $(FLAGS_4_0)
9496
do-4-0: TARGET :=$(TARGET_4_0)
9597
do-4-0: VERSION :=$(VERSION_4_0)
9698
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)$(monogacdir)/$(TARGET)
148-
gacutil -i$(outdir)$(ASSEMBLY) -root$(DESTDIR)$(monolibdir) -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)$(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;\
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)$(monogacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
160-
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml$(DESTDIR)$(monogacdir)/$(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)$(monogacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
164-
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata$(DESTDIR)$(monogacdir)/$(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)$(monogacdir)/gac/$(NAME)/$(VERSION)__$(TOKEN);\
168-
ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata$(DESTDIR)$(monogacdir)/$(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)$(monogacdir)/4.5/;then\
173-
ln -fs ../4.0/$(ASSEMBLY)$(DESTDIR)$(monogacdir)/4.5/$(ASSEMBLY);\
174-
iftest -e$(DESTDIR)$(monogacdir)/4.0/$(ASSEMBLY).config;then \
175-
ln -fs ../4.0/$(ASSEMBLY).config$(DESTDIR)$(monogacdir)/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)$(monogacdir)/4.0/$(NAME).sigdata;then \
178-
ln -fs ../4.0/$(NAME).sigdata$(DESTDIR)$(monogacdir)/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)$(monogacdir)/4.0/$(NAME).xml;then \
181-
ln -fs ../4.0/$(NAME).xml$(DESTDIR)$(monogacdir)/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)$(monogacdir)/4.0/$(NAME).optdata;then \
184-
ln -fs ../4.0/$(NAME).optdata$(DESTDIR)$(monogacdir)/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[@],$(monogacdir)/$(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)$(monogacdir)/$(TARGET)
196+
@mkdir -p$(DESTDIR)$(gacdir)/$(TARGET)
194197
@mkdir -p$(DESTDIR)$(bindir)
195-
$(INSTALL_LIB)$(outdir)$(ASSEMBLY)$(DESTDIR)$(monogacdir)/$(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