The R Project SVN R

Rev

Rev 74000 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11515 hornik 1
##
2
## ${R_HOME}/bin/LINK
11144 hornik 3
 
37351 ripley 4
revision='$Rev: 75653 $'
11515 hornik 5
version=`set - ${revision}; echo ${2}`
47522 ripley 6
version="R linker front end: ${R_VERSION} (r${version})
11515 hornik 7
 
74000 ripley 8
Copyright (C) 2000-2018 The R Core Team.
42192 ripley 9
This is free software; see the GNU General Public License version 2
11515 hornik 10
or later for copying conditions.  There is NO warranty."
11
 
12
usage="Usage: R CMD LINK [options] linkcmd
13
 
14
Perform the specified linkcmd by passing it through GNU libtool and
15
setting a few useful R-related options.  Use in particular when creating
63539 ripley 16
executables linked against the R shared library.
11515 hornik 17
 
18
Options:
19
  -h, --help            print short help message and exit
47442 hornik 20
  -v, --version         print version info and exit
11515 hornik 21
 
63539 ripley 22
Currently only is useful when creating executables, using the C or C++
75653 ripley 23
compiler for linking.
11515 hornik 24
 
71736 hornik 25
Report bugs at <https://bugs.R-project.org>."
11515 hornik 26
 
27
args=
28
while test -n "${1}"; do
29
  case ${1} in
30
    -h|--help)
31
      echo "${usage}"; exit 0 ;;
32
    -v|--version)
33
      echo "${version}"; exit 0 ;;
34
    *)
35
      args="${args} ${1}" ;;
36
  esac
37
  shift
38
done
39
 
11204 hornik 40
if test -z "${R_HOME}"; then
41
  echo "Fatal error: R_HOME was not set"
42
  exit 1
43
fi
11144 hornik 44
 
63537 ripley 45
Rexeclibdir="${R_HOME}/lib${R_ARCH}"
11204 hornik 46
linkopts="-avoid-version -rpath ${Rexeclibdir}"
11144 hornik 47
 
11515 hornik 48
exec ${R_HOME}/bin/libtool --mode=link ${args} ${linkopts}
11204 hornik 49
 
50
### Local Variables: ***
51
### mode: sh ***
52
### sh-indentation: 2 ***
53
### End: ***