Permalink
Browse files

Respect --with-gacdir=/path/to/gac

Use parameter of --with-gacdir and MONODIR as a source for ROOTDIR in
gacutil.
  • Loading branch information...
1 parent 16c853f commit 83ba0fca8665e3c1c8d7ac36d3406b638576f964 @ony ony committed Nov 28, 2012
Showing with 35 additions and 31 deletions.
  1. +1 −0 config.make.in
  2. +4 −0 configure.ac
  3. +30 −31 src/fsharp/targets.make
View
1 config.make.in
@@ -4,6 +4,7 @@ topdir := @abs_top_srcdir@/
builddir := @abs_top_builddir@/
libdir := ${prefix}/lib/
bindir := ${prefix}/bin/
+monorootdir := @MONOROOTDIR@/
monodir := @MONODIR@/
monolibdir2 := $(monodir)2.0/
View
4 configure.ac
@@ -57,7 +57,11 @@ fi
if ! test -e $MONODIR/2.0/mscorlib.dll; then
AC_ERROR(Couldn't find the mono gac directory or mscorlib.dll in the usual places. Set --with-gacdir=<path>)
fi
+
+MONOROOTDIR=$(cd "$MONODIR/.." && pwd)
+
AC_SUBST(MONODIR)
+AC_SUBST(MONOROOTDIR)
if test "x$MONO_SGEN" = "xno"; then
mono_gc_options=
View
61 src/fsharp/targets.make
@@ -144,57 +144,56 @@ install-bin-4: TARGET := $(TARGET_4_0)
#
install-lib-2 install-lib-2-1 install-lib-4:
@echo "Installing $(ASSEMBLY)"
- @mkdir -p $(DESTDIR)/$(libdir)
- @mkdir -p $(DESTDIR)/$(libdir)mono/$(TARGET)
- gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)/$(libdir) -package $(TARGET)
+ @mkdir -p $(DESTDIR)$(monodir)/$(TARGET)
+ gacutil -i $(outdir)$(ASSEMBLY) -root $(DESTDIR)$(monorootdir) -package $(TARGET)
@if test -e $(outdir)Microsoft.FSharp.targets; then \
- mkdir -p $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/; \
- mkdir -p $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \
- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/$(ASSEMBLY) $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \
- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/$(ASSEMBLY) $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \
- $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/$(TARGET)/; \
- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \
- ln -fs $(DESTDIR)/$(libdir)mono/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)/$(libdir)mono/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \
+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/; \
+ mkdir -p $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/; \
+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/$(ASSEMBLY); \
+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/$(ASSEMBLY) $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/$(ASSEMBLY); \
+ $(INSTALL_LIB) $(outdir)Microsoft.FSharp.targets $(DESTDIR)$(monodir)/$(TARGET)/; \
+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ F#/v$(TARGET)/Microsoft.FSharp.targets; \
+ ln -fs $(DESTDIR)$(monodir)/$(TARGET)/Microsoft.FSharp.targets $(DESTDIR)$(monodir)/Microsoft\ SDKs/F#/3.0/Framework/v$(TARGET)/Microsoft.FSharp.targets; \
fi
@if test -e $(outdir)$(NAME).xml; then \
- $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \
- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).xml; \
+ $(INSTALL_LIB) $(outdir)$(NAME).xml $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \
+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).xml $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).xml; \
fi
@if test -e $(outdir)$(NAME).sigdata; then \
- $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \
- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).sigdata; \
+ $(INSTALL_LIB) $(outdir)$(NAME).sigdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \
+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).sigdata $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).sigdata; \
fi
@if test -e $(outdir)$(NAME).optdata; then \
- $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)/$(libdir)mono/gac/$(NAME)/$(VERSION)__$(TOKEN); \
- ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)/$(libdir)mono/$(TARGET)/$(NAME).optdata; \
+ $(INSTALL_LIB) $(outdir)$(NAME).optdata $(DESTDIR)$(monodir)/gac/$(NAME)/$(VERSION)__$(TOKEN); \
+ ln -fs ../gac/$(NAME)/$(VERSION)__$(TOKEN)/$(NAME).optdata $(DESTDIR)$(monodir)/$(TARGET)/$(NAME).optdata; \
fi
install-lib-4-5: install-lib-4
- @if test -e $(DESTDIR)$(libdir)mono/4.5/; then \
- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY) $(DESTDIR)$(libdir)mono/4.5/$(ASSEMBLY); \
- if test -e $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY).config; then \
- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(ASSEMBLY).config $(DESTDIR)$(libdir)mono/4.5/$(ASSEMBLY).config; \
+ @if test -e $(DESTDIR)$(monodir)/4.5/; then \
+ ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY) $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY); \
+ if test -e $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config; then \
+ ln -fs $(DESTDIR)$(monodir)/4.0/$(ASSEMBLY).config $(DESTDIR)$(monodir)/4.5/$(ASSEMBLY).config; \
fi; \
- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).sigdata; then \
- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).sigdata $(DESTDIR)$(libdir)mono/4.5/$(NAME).sigdata; \
+ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata; then \
+ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).sigdata $(DESTDIR)$(monodir)/4.5/$(NAME).sigdata; \
fi; \
- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).xml; then \
- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).xml $(DESTDIR)$(libdir)mono/4.5/$(NAME).xml; \
+ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).xml; then \
+ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).xml $(DESTDIR)$(monodir)/4.5/$(NAME).xml; \
fi; \
- if test -e $(DESTDIR)$(libdir)mono/4.0/$(NAME).optdata; then \
- ln -fs $(DESTDIR)$(libdir)mono/4.0/$(NAME).optdata $(DESTDIR)$(libdir)mono/4.5/$(NAME).optdata; \
+ if test -e $(DESTDIR)$(monodir)/4.0/$(NAME).optdata; then \
+ ln -fs $(DESTDIR)$(monodir)/4.0/$(NAME).optdata $(DESTDIR)$(monodir)/4.5/$(NAME).optdata; \
fi; \
fi
# The binaries fsc.exe and fsi.exe only get installed for Mono 4.0 profile
# This also installs 'fsharpc' and 'fsharpi'
install-bin-4:
- sed -e 's,[@]DIR[@],$(libdir)mono/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
+ sed -e 's,[@]DIR[@],$(monodir)/$(TARGET),g' -e 's,[@]TOOL[@],$(ASSEMBLY),g' < $(topdir)launcher > $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
chmod +x $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION)
- @mkdir -p $(DESTDIR)/$(libdir)
- @mkdir -p $(DESTDIR)/$(bindir)
- $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(libdir)mono/$(TARGET)
- $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) $(DESTDIR)/$(bindir)
+ @mkdir -p $(DESTDIR)$(monodir)/$(TARGET)
+ @mkdir -p $(DESTDIR)$(bindir)
+ $(INSTALL_LIB) $(outdir)$(ASSEMBLY) $(DESTDIR)$(monodir)/$(TARGET)
+ $(INSTALL_BIN) $(outdir)$(subst fs,fsharp,$(NAME))$(VERSION) $(DESTDIR)$(bindir)
$(objdir) $(objdir)$(TARGET_2_0) $(objdir)$(TARGET_2_1) $(objdir)$(TARGET_4_0):

0 comments on commit 83ba0fc

Please sign in to comment.