The R Project SVN R

Rev

Rev 47538 | Rev 58676 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 47538 Rev 52400
Line 1... Line 1...
1
#
1
#
2
# ${R_HOME}/bin/COMPILE
2
# ${R_HOME}/bin/COMPILE
3
 
3
 
4
# @configure_input@
4
# @configure_input@
5
 
5
 
6
revision='$Rev: 47538 $'
6
revision='$Rev: 52400 $'
7
version=`set - ${revision}; echo ${2}`
7
version=`set - ${revision}; echo ${2}`
8
version="R compilation front end: ${R_VERSION} (r${version})
8
version="R compilation front end: ${R_VERSION} (r${version})
9
 
9
 
10
Copyright (C) 2000-2006 The R Core Development Team.
10
Copyright (C) 2000-2010 The R Core Development Team.
11
This is free software; see the GNU General Public License version 2 or
11
This is free software; see the GNU General Public License version 2 or
12
later for copying conditions.  There is NO warranty."
12
later for copying conditions.  There is NO warranty."
13
 
13
 
14
usage="Usage: R CMD COMPILE [options] files
14
usage="Usage: R CMD COMPILE [options] files
15
 
15
 
16
Compile the specified files for subsequent collection into a shared
16
Compile the specified files for subsequent collection into a shared
17
library using 'R CMD SHLIB'.  Currently, the following languages with
17
library using 'R CMD SHLIB'.  Currently, the following languages with
18
associated source file extensions are supported (provided that the
18
associated source file extensions are supported (provided that the
19
respective compilers are available and R was configured to use these):
19
respective compilers are available and R was configured to use these):
20
C ('.c'), C++ ('.cc' or '.cpp' or '.C'), FORTRAN 77 ('.f'), FORTRAN 90
20
C ('.c'), C++ ('.cc' or '.cpp'), FORTRAN 77 ('.f'), FORTRAN 90
21
('.f90'), FORTRAN 95 ('.f95'), Objective C ('.m'), and Objective C++
21
('.f90'), FORTRAN 95 ('.f95'), Objective C ('.m'), and Objective C++
22
('.M' or '.mm').
22
('.M' or '.mm').
23
 
23
 
24
Options:
24
Options:
25
  -h, --help		print short help message and exit
25
  -h, --help		print short help message and exit
Line 45... Line 45...
45
  case ${1} in
45
  case ${1} in
46
    -h|--help)
46
    -h|--help)
47
      echo "${usage}"; exit 0 ;;
47
      echo "${usage}"; exit 0 ;;
48
    -v|--version)
48
    -v|--version)
49
      echo "${version}"; exit 0 ;;
49
      echo "${version}"; exit 0 ;;
50
    *.[cfmCM]|*.cc|*.cpp|*.f90|*.f95|*.mm)
50
    *.[cfmM]|*.cc|*.cpp|*.f90|*.f95|*.mm)
51
      objs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`" ;;
51
      objs="${objs} `echo ${1} | sed 's/\.[^\.][^\.]*$/.o/'`" ;;
52
    -D*)
52
    -D*)
53
      MAKEFLAGS="${MAKEFLAGS} ${1}" ;;
53
      MAKEFLAGS="${MAKEFLAGS} ${1}" ;;
54
    *=*)
54
    *=*)
55
      argn=`echo "${1}" | sed -e 's/=.*//'`
55
      argn=`echo "${1}" | sed -e 's/=.*//'`