diff options
author | Wade Berrier <wade@mono-cvs.ximian.com> | 2005-10-29 05:43:49 +0400 |
---|---|---|
committer | Wade Berrier <wade@mono-cvs.ximian.com> | 2005-10-29 05:43:49 +0400 |
commit | fd922aabc2d91034533599122535e3de85712b6c (patch) | |
tree | 485b0640b1133357c775714ed6d434db68e58bba /scripts | |
parent | d4c9db7c6cd195096062420f7dc7fba7a766d4d4 (diff) |
* mono.pc.in, mint.pc.in, configure.in: Make these relocatable.
* scripts: Makefile.am mono-nunit.pc.in script.in mono-service.in
Make all the wrappers relocatable.
svn path=/trunk/mono/; revision=52364
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.am | 2 | ||||
-rw-r--r-- | scripts/mono-find-provides.in | 11 | ||||
-rw-r--r-- | scripts/mono-find-requires.in | 11 | ||||
-rw-r--r-- | scripts/mono-nunit.pc.in | 4 | ||||
-rw-r--r-- | scripts/mono-service.in | 5 | ||||
-rw-r--r-- | scripts/script.in | 6 |
6 files changed, 26 insertions, 13 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 74cc72969d3..79bc1b50ab0 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -65,7 +65,7 @@ plat_bindir = $(shell cygpath -m $(libdir)) mono_instdir = $(shell cygpath -m $(libdir))/mono else plat_bindir = $(bindir) -mono_instdir = $(prefix)/lib/mono +mono_instdir = $$d/../lib/mono endif REWRITE = sed \ diff --git a/scripts/mono-find-provides.in b/scripts/mono-find-provides.in index b144b34e9de..7f677202006 100644 --- a/scripts/mono-find-provides.in +++ b/scripts/mono-find-provides.in @@ -12,12 +12,15 @@ IFS=$'\n' filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/')) monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) +a=`which "$0"` +d=`dirname "$a"` + # Set the prefix, unless it is overriden (used when building mono rpms) -: ${prefix=@prefix@} +: ${prefix=$d/..} -exec_prefix=@exec_prefix@ -libdir=@libdir@ -bindir=@bindir@ +exec_prefix=$d/.. +libdir=$prefix/@reloc_libdir@ +bindir=$d [ -x $bindir/monodis ] || exit 0; [ -f $libdir/libmono.so ] || exit 0; diff --git a/scripts/mono-find-requires.in b/scripts/mono-find-requires.in index 46c939ef970..446d9fcfd2d 100644 --- a/scripts/mono-find-requires.in +++ b/scripts/mono-find-requires.in @@ -12,12 +12,15 @@ IFS=$'\n' filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/')) monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) +a=`which "$0"` +d=`dirname "$a"` + # Set the prefix, unless it is overriden (used when building mono rpms) -: ${prefix=@prefix@} +: ${prefix=$d/..} -exec_prefix=@exec_prefix@ -libdir=@libdir@ -bindir=@bindir@ +exec_prefix=$d/.. +libdir=$prefix/@reloc_libdir@ +bindir=$d [ -x $bindir/monodis ] || exit 0; [ -f $libdir/libmono.so ] || exit 0; diff --git a/scripts/mono-nunit.pc.in b/scripts/mono-nunit.pc.in index fe9f41c0a6f..54479172eac 100644 --- a/scripts/mono-nunit.pc.in +++ b/scripts/mono-nunit.pc.in @@ -1,4 +1,4 @@ -prefix=@prefix@ +prefix=${pcfiledir}/../.. exec_prefix=${prefix} libdir=${exec_prefix}/lib @@ -6,4 +6,4 @@ libdir=${exec_prefix}/lib Name: Mono NUnit Description: Mono's version of NUnit Version: @VERSION@ -Libs: -r:${libdir}/mono/1.0/nunit.core.dll -r:${libdir}/mono/1.0/nunit.framework.dll -r:${libdir}/mono/1.0/nunit.util.dll
\ No newline at end of file +Libs: -r:${libdir}/mono/1.0/nunit.core.dll -r:${libdir}/mono/1.0/nunit.framework.dll -r:${libdir}/mono/1.0/nunit.util.dll diff --git a/scripts/mono-service.in b/scripts/mono-service.in index 25b789902c4..950c2f66cb4 100644 --- a/scripts/mono-service.in +++ b/scripts/mono-service.in @@ -1,4 +1,7 @@ #!/bin/sh +a=`which "$0"` +d=`dirname "$a"` + args="$@" assembly= while test x$1 != x; do @@ -29,4 +32,4 @@ if test x$assembly = x; then fi export MONO_DISABLE_SHM=1 -exec @bindir@/@mono_interp@ @mono_instdir@/@framework_version@/@exe_name@.exe $args </dev/null >& /dev/null & +exec $d/@mono_interp@ @mono_instdir@/@framework_version@/@exe_name@.exe $args </dev/null >& /dev/null & diff --git a/scripts/script.in b/scripts/script.in index ef0e2bcffea..8952ac6d6ea 100644 --- a/scripts/script.in +++ b/scripts/script.in @@ -1,2 +1,6 @@ #!/bin/sh -exec @bindir@/@mono_interp@ @mono_instdir@/@framework_version@/@exe_name@.exe "$@" + +a=`which "$0"` +d=`dirname "$a"` + +exec $d/@mono_interp@ @mono_instdir@/@framework_version@/@exe_name@.exe "$@" |